diff --git a/.travis_build.sh b/.travis_build.sh index 5e2729cde..fdf649969 100755 --- a/.travis_build.sh +++ b/.travis_build.sh @@ -108,18 +108,31 @@ build_osx() { } build_windows() { + echo "Building for Windows" + + echo $ARCH + echo $FLAVOR + build_directory="./build.${ARCH}/${FLAVOR}/" + echo "${build_directory}" + [[ ! -d "${build_directory}" ]] && exit 100 pushd "${build_directory}" - # remove bochs plugins + echo "remove bochs plugins" sed -i 's/Bochs.* //g' plugins.ext + + echo "Let's build" + # We cannot zip dbg and ast if we pass -f to just to the full thing... + # Once this builds, let's pass -A instead of -f and put the full zip (but we should do several zips in the future) bash -e ./mvm -f || exit 1 - zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" + zip -r "${output_file}.zip" "./build/vm/" + # zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/" popd } + if [[ ! $(type -t build_$PLATFORM) ]]; then echo "Unsupported platform '$(uname -s)'." 1>&2 exit 99 diff --git a/build.linux32ARMv6/editpharoinstall.sh b/build.linux32ARMv6/editpharoinstall.sh index b52485655..2000be28f 100755 --- a/build.linux32ARMv6/editpharoinstall.sh +++ b/build.linux32ARMv6/editpharoinstall.sh @@ -15,11 +15,11 @@ SOURCE=../../sources/$SourceFile.sources test -f $SOURCE || SOURCE=../../../sources/$SourceFile.sources if [ -f squeak ]; then mv squeak pharo - sed -i.bak 's/squeak/pharo/g' pharo + sed -i 's/squeak/pharo/g' pharo fi if [ -f bin/squeak ]; then mv bin/squeak bin/pharo - sed -i.bak 's/squeak/pharo/g' bin/pharo + sed -i 's/squeak/pharo/g' bin/pharo fi rm -rf man doc LIBDIR="`echo lib/squeak/[0-9.-]*`" diff --git a/build.linux32ARMv6/mkNamedPrims.sh b/build.linux32ARMv6/mkNamedPrims.sh deleted file mode 100755 index 7c707b88f..000000000 --- a/build.linux32ARMv6/mkNamedPrims.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -e -# Generate a sqNamedPrims.h file from plugins.int. The plugins.int used should -# be the one and only argument. -if [ $# != 1 -o ! -f "$1" ]; then - echo usage $0 plugins.int ">sqNamedPrims.h" 1>&2 - exit 1 -fi -echo "/* Automatically generated on "`date`" */" -echo "extern sqExport vm_exports[];"; -echo "extern sqExport os_exports[];"; -for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'` -do - echo "extern sqExport "$p"_exports[];" -done -echo -echo "sqExport *pluginExports[] = {" -echo " vm_exports," -echo " os_exports," -for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'` -do - echo " "$p"_exports," -done -echo " NULL" -echo "};" diff --git a/build.linux32ARMv6/pharo.cog.spur/build.assert/mvm b/build.linux32ARMv6/pharo.cog.spur/build.assert/mvm index e8f205d5f..10fd05934 100755 --- a/build.linux32ARMv6/pharo.cog.spur/build.assert/mvm +++ b/build.linux32ARMv6/pharo.cog.spur/build.assert/mvm @@ -25,7 +25,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CXX=g++ \ CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" \ - LIBS="-lpthread -luuid -lasound" \ + LIBS="-lpthread -luuid -lasound -Wl,-rpath,'\$\$ORIGIN'" \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux32ARMv6/pharo.cog.spur/build.debug/mvm b/build.linux32ARMv6/pharo.cog.spur/build.debug/mvm index fd5e702f4..e42ce9ef9 100755 --- a/build.linux32ARMv6/pharo.cog.spur/build.debug/mvm +++ b/build.linux32ARMv6/pharo.cog.spur/build.debug/mvm @@ -25,7 +25,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CXX=g++ \ CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" \ - LIBS="-lpthread -luuid -lasound" \ + LIBS="-lpthread -luuid -lasound -Wl,-rpath,'\$\$ORIGIN'" \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux32ARMv6/pharo.cog.spur/build/mvm b/build.linux32ARMv6/pharo.cog.spur/build/mvm index 259492119..ab697771d 100755 --- a/build.linux32ARMv6/pharo.cog.spur/build/mvm +++ b/build.linux32ARMv6/pharo.cog.spur/build/mvm @@ -43,7 +43,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard" \ CXX=g++ \ CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" \ - LIBS="-lpthread -luuid -lasound" \ + LIBS="-lpthread -luuid -lasound -Wl,-rpath,'\$\$ORIGIN'" \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux32ARMv7/mkNamedPrims.sh b/build.linux32ARMv7/mkNamedPrims.sh deleted file mode 100755 index 7c707b88f..000000000 --- a/build.linux32ARMv7/mkNamedPrims.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -e -# Generate a sqNamedPrims.h file from plugins.int. The plugins.int used should -# be the one and only argument. -if [ $# != 1 -o ! -f "$1" ]; then - echo usage $0 plugins.int ">sqNamedPrims.h" 1>&2 - exit 1 -fi -echo "/* Automatically generated on "`date`" */" -echo "extern sqExport vm_exports[];"; -echo "extern sqExport os_exports[];"; -for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'` -do - echo "extern sqExport "$p"_exports[];" -done -echo -echo "sqExport *pluginExports[] = {" -echo " vm_exports," -echo " os_exports," -for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'` -do - echo " "$p"_exports," -done -echo " NULL" -echo "};" diff --git a/build.linux32x86/editpharoinstall.sh b/build.linux32x86/editpharoinstall.sh index b52485655..2000be28f 100755 --- a/build.linux32x86/editpharoinstall.sh +++ b/build.linux32x86/editpharoinstall.sh @@ -15,11 +15,11 @@ SOURCE=../../sources/$SourceFile.sources test -f $SOURCE || SOURCE=../../../sources/$SourceFile.sources if [ -f squeak ]; then mv squeak pharo - sed -i.bak 's/squeak/pharo/g' pharo + sed -i 's/squeak/pharo/g' pharo fi if [ -f bin/squeak ]; then mv bin/squeak bin/pharo - sed -i.bak 's/squeak/pharo/g' bin/pharo + sed -i 's/squeak/pharo/g' bin/pharo fi rm -rf man doc LIBDIR="`echo lib/squeak/[0-9.-]*`" diff --git a/build.linux32x86/mkNamedPrims.sh b/build.linux32x86/mkNamedPrims.sh deleted file mode 100755 index 7c707b88f..000000000 --- a/build.linux32x86/mkNamedPrims.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -e -# Generate a sqNamedPrims.h file from plugins.int. The plugins.int used should -# be the one and only argument. -if [ $# != 1 -o ! -f "$1" ]; then - echo usage $0 plugins.int ">sqNamedPrims.h" 1>&2 - exit 1 -fi -echo "/* Automatically generated on "`date`" */" -echo "extern sqExport vm_exports[];"; -echo "extern sqExport os_exports[];"; -for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'` -do - echo "extern sqExport "$p"_exports[];" -done -echo -echo "sqExport *pluginExports[] = {" -echo " vm_exports," -echo " os_exports," -for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'` -do - echo " "$p"_exports," -done -echo " NULL" -echo "};" diff --git a/build.linux32x86/pharo.cog.spur/build.assert.itimerheartbeat/mvm b/build.linux32x86/pharo.cog.spur/build.assert.itimerheartbeat/mvm index d9248abc4..e27ab917c 100755 --- a/build.linux32x86/pharo.cog.spur/build.assert.itimerheartbeat/mvm +++ b/build.linux32x86/pharo.cog.spur/build.assert.itimerheartbeat/mvm @@ -28,7 +28,7 @@ test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak CC="gcc -m32" \ CXX="g++ -m32" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux32x86/pharo.cog.spur/build.assert/mvm b/build.linux32x86/pharo.cog.spur/build.assert/mvm index 470002509..9fb92dbfd 100755 --- a/build.linux32x86/pharo.cog.spur/build.assert/mvm +++ b/build.linux32x86/pharo.cog.spur/build.assert/mvm @@ -30,7 +30,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -m32" \ CXX="g++ -m32" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux32x86/pharo.cog.spur/build.debug.itimerheartbeat/mvm b/build.linux32x86/pharo.cog.spur/build.debug.itimerheartbeat/mvm index 6c828ca1a..382457c99 100755 --- a/build.linux32x86/pharo.cog.spur/build.debug.itimerheartbeat/mvm +++ b/build.linux32x86/pharo.cog.spur/build.debug.itimerheartbeat/mvm @@ -28,7 +28,7 @@ test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak CC="gcc -m32" \ CXX="g++ -m32" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux32x86/pharo.cog.spur/build.debug/mvm b/build.linux32x86/pharo.cog.spur/build.debug/mvm index 126991edc..a17107b1f 100755 --- a/build.linux32x86/pharo.cog.spur/build.debug/mvm +++ b/build.linux32x86/pharo.cog.spur/build.debug/mvm @@ -30,7 +30,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -m32" \ CXX="g++ -m32" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux32x86/pharo.cog.spur/build.itimerheartbeat/mvm b/build.linux32x86/pharo.cog.spur/build.itimerheartbeat/mvm index 5de7fa0c8..7776819e2 100755 --- a/build.linux32x86/pharo.cog.spur/build.itimerheartbeat/mvm +++ b/build.linux32x86/pharo.cog.spur/build.itimerheartbeat/mvm @@ -9,7 +9,7 @@ i*86) ;; # we're good fi ;; esac -THIRDPARTYLIBS="libsdl2 libssh2 libgit2" +THIRDPARTYLIBS="libsdl2 openssl libssh2 libgit2" INSTALLDIR=phcogspurlinux # Some gcc versions create a broken VM using -O2 @@ -45,7 +45,7 @@ test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak CC="gcc -m32" \ CXX="g++ -m32" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux32x86/pharo.cog.spur/build/mvm b/build.linux32x86/pharo.cog.spur/build/mvm index 415982e4b..7db3be18f 100755 --- a/build.linux32x86/pharo.cog.spur/build/mvm +++ b/build.linux32x86/pharo.cog.spur/build/mvm @@ -1,6 +1,6 @@ #!/bin/bash -e # PharoVM with VM profiler and threaded heartbeat -THIRDPARTYLIBS="libsdl2 libssh2 libgit2" +THIRDPARTYLIBS="libsdl2 openssl libssh2 libgit2" case "`uname -m`" in # ensure we see x86 as machine type i*86) ;; # we're good @@ -47,7 +47,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -m32" \ CXX="g++ -m32" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux32x86/third-party/Makefile.libgit2 b/build.linux32x86/third-party/Makefile.libgit2 index 84c35baa3..530d199ba 100644 --- a/build.linux32x86/third-party/Makefile.libgit2 +++ b/build.linux32x86/third-party/Makefile.libgit2 @@ -22,6 +22,8 @@ $(LIBGIT2ARCHIVE): # NOTE: I'm adding this ugly hack of "sed..." because CMake does not find properly libssl and libcrypto # on 64bits envirenments (it always find the 64bits version, regardless the architecture). # this is ugly, but the only way I fond :( +# NOTE: We also need to edit the RPATH as CMAKE likes (because it ignores the -Wl line), that's why we +# need to add special flags as you can see here: https://cmake.org/Wiki/CMake_RPATH_handling $(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME): $(LIBGIT2ARCHIVE) tar x -f $(LIBGIT2ARCHIVE) -C $(THIRDPARTYDIR) cd $(LIBGIT2DIR) \ @@ -31,11 +33,13 @@ $(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME): $(LIBGIT2ARCHIVE) -DBUILD_CLAR=OFF \ -DCMAKE_C_FLAGS="-m32" \ -DOPENSSL_FOUND=ON \ + -DOPENSSL_INCLUDE_DIRS=$(THIRDPARTYINCLUDEDIR) \ + -DOPENSSL_LIBRARY_DIRS=$(THIRDPARTYLIBDIR) \ + -DOPENSSL_LIBRARIES=$(THIRDPARTYLIBDIR)/libssl.so \ -DLIBSSH2_FOUND=ON \ -DLIBSSH2_INCLUDE_DIRS=$(THIRDPARTYINCLUDEDIR) \ -DLIBSSH2_LIBRARY_DIRS=$(THIRDPARTYLIBDIR) \ -DLIBSSH2_LIBRARIES=$(THIRDPARTYLIBDIR)/libssh2.so.1.0.1 \ - -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=$(THIRDPARTYLIBDIR) \ && sed -i.bak 's/x86_64-linux-gnu/i386-linux-gnu/g' CMakeCache.txt \ && make \ && make install diff --git a/build.linux32x86/third-party/Makefile.libssh2 b/build.linux32x86/third-party/Makefile.libssh2 index e8c1556af..de0ad3599 100644 --- a/build.linux32x86/third-party/Makefile.libssh2 +++ b/build.linux32x86/third-party/Makefile.libssh2 @@ -24,8 +24,10 @@ $(THIRDPARTYLIBDIR)/$(LIBSSH2LIBNAME): $(LIBSSH2ARCHIVE) cd $(LIBSSH2DIR) \ && ./configure \ --prefix='$(THIRDPARTYOUTDIR)' \ - CFLAGS='-m32' \ - LDFLAGS='-m32' \ + --with-openssl \ + --with-libssl-prefix=$(THIRDPARTYLIBDIR) \ + CFLAGS='-m32 -L$(THIRDPARTYLIBDIR)' \ + LDFLAGS='-m32 -L$(THIRDPARTYLIBDIR)' \ && make \ && make install diff --git a/build.linux32x86/third-party/Makefile.openssl b/build.linux32x86/third-party/Makefile.openssl new file mode 100644 index 000000000..e80077bdc --- /dev/null +++ b/build.linux32x86/third-party/Makefile.openssl @@ -0,0 +1,48 @@ +ifndef THIRDPARTYDIR + include Makefile.lib.extra +endif +include ../../third-party/openssl.spec + +# plugin definitions +OPENSSLURL:=$(openssl_spec_download_url) +OPENSSLLIBNAME:=$(openssl_spec_product1_name_linux) +OPENSSLALLLIBNAMES:=$(openssl_spec_product2_name_linux) $(OPENSSLLIBNAME) +OPENSSLDIR:=$(THIRDPARTYDIR)/$(openssl_spec_unpack_dir_name) +OPENSSLARCHIVE:=$(THIRDPARTYCACHEDIR)/$(openssl_spec_archive_name) +OPENSSLLIB:=$(THIRDPARTYINSTALLDIR)/$(OPENSSLLIBNAME) +OPENSSLSYMLINKS:=$(openssl_spec_symlinks_linux) + +# ensure third-party library is built and recognised by plugins +INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR) +EXTRALIBS:=$(EXTRALIBS) $(OPENSSLLIB) +PLUGINREQS:=$(THIRDPARTYLIBS) + +$(OPENSSLARCHIVE): + curl -o $(OPENSSLARCHIVE) -L $(OPENSSLURL) + +$(THIRDPARTYLIBDIR)/$(OPENSSLLIBNAME): $(OPENSSLARCHIVE) + tar x -f $(OPENSSLARCHIVE) -C $(THIRDPARTYDIR) + cd $(OPENSSLDIR) \ + && setarch i386 ./config -m32 --prefix='$(THIRDPARTYOUTDIR)' shared \ + && make install + +# Assuming building libssl will also build libcrypto +$(OPENSSLLIB): $(THIRDPARTYLIBDIR)/$(OPENSSLLIBNAME) + +openssl: $(OPENSSLLIB) + +install: + @for each in $(OPENSSLALLLIBNAMES); do \ + cp -f $(THIRDPARTYLIBDIR)/$$each $(THIRDPARTYINSTALLDIR); \ + done + @echo "Installing links" + @for each in $(THIRDPARTYLIBDIR)/$(OPENSSLSYMLINKS); do \ + if [ -L $$each ]; then \ + cp -a $$each $(THIRDPARTYINSTALLDIR); \ + fi \ + done + +all: $(THIRDPARTYOUTDIR) $(THIRDPARTYINSTALLDIR) $(THIRDPARTYCACHEDIR) openssl + +clean: + rm -Rf $(OPENSSLDIR) diff --git a/build.linux64x64/editpharoinstall.sh b/build.linux64x64/editpharoinstall.sh index b52485655..2000be28f 100755 --- a/build.linux64x64/editpharoinstall.sh +++ b/build.linux64x64/editpharoinstall.sh @@ -15,11 +15,11 @@ SOURCE=../../sources/$SourceFile.sources test -f $SOURCE || SOURCE=../../../sources/$SourceFile.sources if [ -f squeak ]; then mv squeak pharo - sed -i.bak 's/squeak/pharo/g' pharo + sed -i 's/squeak/pharo/g' pharo fi if [ -f bin/squeak ]; then mv bin/squeak bin/pharo - sed -i.bak 's/squeak/pharo/g' bin/pharo + sed -i 's/squeak/pharo/g' bin/pharo fi rm -rf man doc LIBDIR="`echo lib/squeak/[0-9.-]*`" diff --git a/build.linux64x64/mkNamedPrims.sh b/build.linux64x64/mkNamedPrims.sh deleted file mode 100755 index 13aa354a1..000000000 --- a/build.linux64x64/mkNamedPrims.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Generate a sqNamedPrims.h file from plugins.int. The plugins.int used should -# be the one and only argument. -if [ $# != 1 -o ! -f "$1" ]; then - echo usage $0 plugins.int ">sqNamedPrims.h" 1>&2 - exit 1 -fi -echo "/* Automatically generated on "`date`" */" -echo "extern sqExport vm_exports[];"; -echo "extern sqExport os_exports[];"; -for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'` -do - echo "extern sqExport "$p"_exports[];" -done -echo -echo "sqExport *pluginExports[] = {" -echo " vm_exports," -echo " os_exports," -for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'` -do - echo " "$p"_exports," -done -echo " NULL" -echo "};" diff --git a/build.linux64x64/pharo.cog.spur/build.assert.itimerheartbeat/mvm b/build.linux64x64/pharo.cog.spur/build.assert.itimerheartbeat/mvm index 2455344a5..ee5fa4ec3 100755 --- a/build.linux64x64/pharo.cog.spur/build.assert.itimerheartbeat/mvm +++ b/build.linux64x64/pharo.cog.spur/build.assert.itimerheartbeat/mvm @@ -22,7 +22,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -m64" \ CXX="g++ -m64" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux64x64/pharo.cog.spur/build.assert/mvm b/build.linux64x64/pharo.cog.spur/build.assert/mvm index 9c7551288..275d30281 100755 --- a/build.linux64x64/pharo.cog.spur/build.assert/mvm +++ b/build.linux64x64/pharo.cog.spur/build.assert/mvm @@ -22,7 +22,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -m64" \ CXX="g++ -m64" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux64x64/pharo.cog.spur/build.debug.itimerheartbeat/mvm b/build.linux64x64/pharo.cog.spur/build.debug.itimerheartbeat/mvm index 5fd1f5035..541a12894 100755 --- a/build.linux64x64/pharo.cog.spur/build.debug.itimerheartbeat/mvm +++ b/build.linux64x64/pharo.cog.spur/build.debug.itimerheartbeat/mvm @@ -22,7 +22,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -m64" \ CXX="g++ -m64" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux64x64/pharo.cog.spur/build.debug/mvm b/build.linux64x64/pharo.cog.spur/build.debug/mvm index fa06855e2..3b1f12771 100755 --- a/build.linux64x64/pharo.cog.spur/build.debug/mvm +++ b/build.linux64x64/pharo.cog.spur/build.debug/mvm @@ -22,7 +22,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -m64" \ CXX="g++ -m64" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux64x64/pharo.cog.spur/build.itimerheartbeat/mvm b/build.linux64x64/pharo.cog.spur/build.itimerheartbeat/mvm index fb33ff153..0e3b98ea3 100755 --- a/build.linux64x64/pharo.cog.spur/build.itimerheartbeat/mvm +++ b/build.linux64x64/pharo.cog.spur/build.itimerheartbeat/mvm @@ -1,6 +1,6 @@ #!/bin/bash -e # PharoVM with VM profiler and itimer heartbeat -THIRDPARTYLIBS="libsdl2 libssh2 libgit2" +THIRDPARTYLIBS="libsdl2 openssl libssh2 libgit2" INSTALLDIR=cogspur64linux # Some gcc versions create a broken VM using -O2 case `gcc -v 2>&1 | grep version | sed 's/gcc version *//'` in @@ -36,7 +36,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -m64" \ CXX="g++ -m64" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux64x64/pharo.cog.spur/build/mvm b/build.linux64x64/pharo.cog.spur/build/mvm index 207e4a880..81aa710f5 100755 --- a/build.linux64x64/pharo.cog.spur/build/mvm +++ b/build.linux64x64/pharo.cog.spur/build/mvm @@ -1,6 +1,6 @@ #!/bin/bash -ex # PharoVM with VM profiler and threaded heartbeat -THIRDPARTYLIBS="libsdl2 libssh2 libgit2" +THIRDPARTYLIBS="libsdl2 openssl libssh2 libgit2" INSTALLDIR=cogspur64linuxht # Some gcc versions create a broken VM using -O2 @@ -37,7 +37,7 @@ test -f config.h || ../../../platforms/unix/config/configure \ CC="gcc -m64" \ CXX="g++ -m64" \ CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0" \ - LIBS="-lpthread -luuid" \ + LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \ LDFLAGS=-Wl,-z,now rm -f vm/sqUnixMain.o # nuke version info rm -rf ../../../products/$INSTALLDIR diff --git a/build.linux64x64/third-party/Makefile.openssl b/build.linux64x64/third-party/Makefile.openssl new file mode 100644 index 000000000..e7a83a5bf --- /dev/null +++ b/build.linux64x64/third-party/Makefile.openssl @@ -0,0 +1,48 @@ +ifndef THIRDPARTYDIR + include Makefile.lib.extra +endif +include ../../third-party/openssl.spec + +# plugin definitions +OPENSSLURL:=$(openssl_spec_download_url) +OPENSSLLIBNAME:=$(openssl_spec_product1_name_linux) +OPENSSLALLLIBNAMES:=$(openssl_spec_product2_name_linux) $(OPENSSLLIBNAME) +OPENSSLDIR:=$(THIRDPARTYDIR)/$(openssl_spec_unpack_dir_name) +OPENSSLARCHIVE:=$(THIRDPARTYCACHEDIR)/$(openssl_spec_archive_name) +OPENSSLLIB:=$(THIRDPARTYINSTALLDIR)/$(OPENSSLLIBNAME) +OPENSSLSYMLINKS:=$(openssl_spec_symlinks_linux) + +# ensure third-party library is built and recognised by plugins +INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR) +EXTRALIBS:=$(EXTRALIBS) $(OPENSSLLIB) +PLUGINREQS:=$(THIRDPARTYLIBS) + +$(OPENSSLARCHIVE): + curl -o $(OPENSSLARCHIVE) -L $(OPENSSLURL) + +$(THIRDPARTYLIBDIR)/$(OPENSSLLIBNAME): $(OPENSSLARCHIVE) + tar x -f $(OPENSSLARCHIVE) -C $(THIRDPARTYDIR) + cd $(OPENSSLDIR) \ + && ./Configure linux-generic32 --prefix='$(THIRDPARTYOUTDIR)' shared \ + && make install + +# Assuming building libssl will also build libcrypto +$(OPENSSLLIB): $(THIRDPARTYLIBDIR)/$(OPENSSLLIBNAME) + +openssl: $(OPENSSLLIB) + +install: + @for each in $(OPENSSLALLLIBNAMES); do \ + cp -f $(THIRDPARTYLIBDIR)/$$each $(THIRDPARTYINSTALLDIR); \ + done + @echo "Installing links" + @for each in $(THIRDPARTYLIBDIR)/$(OPENSSLSYMLINKS); do \ + if [ -L $$each ]; then \ + cp -a $$each $(THIRDPARTYINSTALLDIR); \ + fi \ + done + +all: $(THIRDPARTYOUTDIR) $(THIRDPARTYINSTALLDIR) $(THIRDPARTYCACHEDIR) openssl + +clean: + rm -Rf $(OPENSSLDIR) diff --git a/nsspur64src/vm/cogit.h b/nsspur64src/vm/cogit.h index f6817dadf..20f6166cd 100644 --- a/nsspur64src/vm/cogit.h +++ b/nsspur64src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ @@ -146,6 +146,7 @@ VM_EXPORT sqInt traceStores; #define getCFramePointer() CFramePointer #define getCStackPointer() CStackPointer #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define noCheckEntryOffset() cmNoCheckEntryOffset #define noContextSwitchBlockEntryOffset() blockNoContextSwitchOffset #define printOnTrace() (traceFlags & 1) diff --git a/nsspur64src/vm/cogitX64.c b/nsspur64src/vm/cogitX64.c index 317e0d26a..21cae8d1b 100644 --- a/nsspur64src/vm/cogitX64.c +++ b/nsspur64src/vm/cogitX64.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -263,7 +263,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 80 : 75) +#define NumTrampolines (IMMUTABILITY ? 81 : 76) #define OrCqR 108 #define OrCwR 116 #define OrRR 102 @@ -354,8 +354,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; unsigned char machineCode [14]; } AbstractInstruction; @@ -426,10 +426,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -570,7 +572,7 @@ static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static usqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -589,7 +591,7 @@ static void NoDbgRegParms genEnilopmartReturn(sqInt forCall); static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointer); static void generateClosedPICPrototype(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateNewspeakRuntime(void); static void generateNewspeakSendTrampolines(void); static void generateOpenPICPrototype(void); @@ -726,7 +728,7 @@ extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToUnpairedMethodList(CogMethod *aCogMethod); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void compactCompiledCode(void); static void NoDbgRegParms ensureInYoungReferrers(CogMethod *cogMethod); @@ -994,7 +996,7 @@ static AbstractInstruction * NoDbgRegParms relocateCallBeforeReturnPCby(Abstract static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta); static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); static sqInt NoDbgRegParms rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); -static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress); +static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr); static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms rewriteJumpFullAttarget(AbstractInstruction * self_in_rewriteJumpFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -1191,7 +1193,7 @@ static sqInt NoDbgRegParms genStorePopReceiverVariableneedsStoreCheckneedsImmuta static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1220,7 +1222,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1252,7 +1253,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt breakBlock; static sqInt breakMethod; @@ -1292,6 +1292,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1332,6 +1333,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt cPICCaseSize; static sqInt cPICEndOfCodeOffset; @@ -1983,6 +1985,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -2313,9 +2316,9 @@ computeSizeOfArithCwR(AbstractInstruction * self_in_computeSizeOfArithCwR) static usqInt NoDbgRegParms concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64opcode) { - usqIntptr_t reg; + usqInt reg; sqInt reverse; - usqIntptr_t value; + usqInt value; value = ((self_in_concretizeArithCwR->operands))[0]; reg = ((self_in_concretizeArithCwR->operands))[1]; @@ -2351,9 +2354,9 @@ concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64op static usqInt NoDbgRegParms concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { - usqIntptr_t offset; - usqIntptr_t reg; - usqIntptr_t value; + sqInt offset; + usqInt reg; + usqInt value; value = ((self_in_concretizeMoveCwR->operands))[0]; reg = ((self_in_concretizeMoveCwR->operands))[1]; @@ -2470,9 +2473,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - usqIntptr_t alignment; - usqIntptr_t maximumSpan; - usqIntptr_t target; + usqInt alignment; + sqInt maximumSpan; + usqInt target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -2856,7 +2859,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -3778,7 +3781,7 @@ static sqInt NoDbgRegParms closedPICRefersToUnmarkedObject(CogMethod *cPIC) { sqInt i; - sqInt object; + usqInt object; sqInt pc; if (!((isImmediate((cPIC->selector))) @@ -4086,7 +4089,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -4144,7 +4147,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -4211,7 +4214,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -4825,7 +4828,7 @@ static sqInt NoDbgRegParms configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs, sqInt addrDelta) { sqInt caseEndAddress; - sqInt jumpTargetAddress; + sqInt jumpTargetAddr; sqInt operand; sqInt pc; usqIntptr_t targetEntry; @@ -4864,8 +4867,8 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod && (((byteAt(pc - 7)) | (modRMRO(((AbstractInstruction *) backEnd), 0, 0, 7))) == (modRMRO(((AbstractInstruction *) backEnd), ModRegInd, 5, 7))))); ((AbstractInstruction *) backEnd); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress = cPICMissTrampolineFor(numArgs); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddress); + jumpTargetAddr = cPICMissTrampolineFor(numArgs); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddr); return 0; } @@ -4883,8 +4886,8 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod static sqInt NoDbgRegParms configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, sqInt numArgs, sqInt addrDelta) { - sqInt jumpTargetAddress; - sqInt jumpTargetAddress1; + sqInt jumpTargetAddr; + sqInt jumpTargetAddr1; sqInt operand; sqInt pc; sqInt target; @@ -4897,12 +4900,12 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, ? 0 : methodOperand); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress = (((sqInt)cPIC)) + (sizeof(CogMethod)); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + firstCPICCaseOffset, jumpTargetAddress); + jumpTargetAddr = (((sqInt)cPIC)) + (sizeof(CogMethod)); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + firstCPICCaseOffset, jumpTargetAddr); storeLiteralbeforeFollowingAddress(backEnd, operand, ((((sqInt)cPIC)) + firstCPICCaseOffset) - 5); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress1 = cPICMissTrampolineFor(numArgs); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddress1); + jumpTargetAddr1 = cPICMissTrampolineFor(numArgs); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddr1); /* begin relocateMethodReferenceBeforeAddress:by: */ pc = ((((sqInt)cPIC)) + cPICEndOfCodeOffset) - 5; assert((((byteAt(pc - 6)) == 141) @@ -5142,7 +5145,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -5228,11 +5231,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { usqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -5431,8 +5434,8 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) } /* Cogit>>#findMapLocationForMcpc:inMethod: */ -static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +static usqInt NoDbgRegParms +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -5962,7 +5965,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -5978,7 +5981,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, 3133021973U + h, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -6024,7 +6027,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -6070,17 +6073,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; + usqInt location; sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -8324,7 +8327,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -9396,7 +9399,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -10368,7 +10371,7 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; @@ -10597,12 +10600,12 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; zoneSize = limitAddress - baseAddress; initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; @@ -13376,6 +13379,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *jumpImm; @@ -13419,7 +13423,17 @@ genPrimitiveIdentityHash(void) genoperand(RetN, 0); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } /* CogObjectRepresentationFor64BitSpur>>#genPrimitiveImmediateAsInteger */ @@ -15375,6 +15389,8 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { zeroOpcodeIndex(); @@ -17886,7 +17902,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - usqIntptr_t shiftCountReg; + usqInt shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == RCX @@ -17913,8 +17929,8 @@ computeSizeOfPushCw(AbstractInstruction * self_in_computeSizeOfPushCw) static usqInt NoDbgRegParms concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithCqRWithROraxOpcode, sqInt regOpcode, sqInt raxOpcode) { - usqIntptr_t reg; - usqIntptr_t value; + usqInt reg; + usqInt value; value = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[0]; reg = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[1]; @@ -17965,10 +17981,10 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) { - usqIntptr_t base; - usqIntptr_t index; + usqInt base; + usqInt index; sqInt offset; - usqIntptr_t src; + usqInt src; src = ((self_in_concretizeMoveRX32rR->operands))[0]; index = ((self_in_concretizeMoveRX32rR->operands))[1]; @@ -18002,9 +18018,9 @@ concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) static usqInt NoDbgRegParms concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) { - usqIntptr_t base; - usqIntptr_t dest; - usqIntptr_t index; + usqInt base; + usqInt dest; + usqInt index; sqInt offset; index = ((self_in_concretizeMoveX32rRR->operands))[0]; @@ -18039,8 +18055,8 @@ concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -18059,8 +18075,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - usqIntptr_t offset; - usqIntptr_t operand; + sqInt offset; + usqInt operand; operand = ((self_in_concretizePrefetchAw->operands))[0]; if (!((operand != null) @@ -18087,8 +18103,8 @@ concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x64opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -18102,8 +18118,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) { - usqIntptr_t r1; - usqIntptr_t r2; + usqInt r1; + usqInt r2; r1 = ((self_in_concretizeXCHGRR->operands))[0]; r2 = ((self_in_concretizeXCHGRR->operands))[1]; @@ -18132,64 +18148,64 @@ concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt addressOperand2; + usqInt addressOperand3; + usqInt addressOperand4; + usqInt addressOperand5; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; + usqInt baseReg; + usqInt baseReg1; AbstractInstruction *dependentChain; - 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 destReg16; - usqIntptr_t destReg17; - usqIntptr_t destReg18; - usqIntptr_t destReg19; - usqIntptr_t destReg2; - usqIntptr_t destReg20; - usqIntptr_t destReg21; - usqIntptr_t destReg22; - usqIntptr_t destReg23; - usqIntptr_t destReg24; - usqIntptr_t destReg25; - usqIntptr_t destReg26; - usqIntptr_t destReg27; - usqIntptr_t destReg28; - usqIntptr_t destReg29; - usqIntptr_t destReg3; - usqIntptr_t destReg30; - usqIntptr_t destReg31; - usqIntptr_t destReg32; - 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; + usqInt dest; + usqInt dest1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg13; + usqInt destReg14; + usqInt destReg15; + usqInt destReg16; + usqInt destReg17; + usqInt destReg18; + usqInt destReg19; + usqInt destReg2; + usqInt destReg20; + usqInt destReg21; + usqInt destReg22; + usqInt destReg23; + usqInt destReg24; + usqInt destReg25; + usqInt destReg26; + usqInt destReg27; + usqInt destReg28; + usqInt destReg29; + usqInt destReg3; + usqInt destReg30; + usqInt destReg31; + usqInt destReg32; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; + usqInt distance; + usqInt distance1; + usqInt distance2; + usqInt distance3; + usqInt distance4; sqInt i; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -18258,8 +18274,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget9; sqInt offset; sqInt offset1; - usqIntptr_t offset10; - usqIntptr_t offset11; + usqInt offset10; + usqInt offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -18270,28 +18286,28 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - usqIntptr_t offset12; + usqInt offset12; sqInt offset120; sqInt offset121; sqInt offset122; sqInt offset123; sqInt offset124; sqInt offset125; - usqIntptr_t offset126; - usqIntptr_t offset127; - usqIntptr_t offset128; - usqIntptr_t offset129; - usqIntptr_t offset13; - usqIntptr_t offset14; - usqIntptr_t offset15; + usqInt offset126; + usqInt offset127; + usqInt offset128; + usqInt offset129; + usqInt offset13; + usqInt offset14; + usqInt offset15; sqInt offset16; - usqIntptr_t offset17; - usqIntptr_t offset18; - usqIntptr_t offset19; + usqInt offset17; + usqInt offset18; + usqInt offset19; sqInt offset2; - usqIntptr_t offset20; - usqIntptr_t offset21; - usqIntptr_t offset22; + usqInt offset20; + sqInt offset21; + sqInt offset22; sqInt offset23; sqInt offset24; sqInt offset25; @@ -18299,7 +18315,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - usqIntptr_t offset3; + usqInt offset3; sqInt offset30; sqInt offset31; sqInt offset32; @@ -18310,74 +18326,74 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset37; sqInt offset38; sqInt offset39; - usqIntptr_t offset4; + usqInt offset4; sqInt offset40; sqInt offset41; sqInt offset42; - usqIntptr_t offset5; + sqInt offset5; sqInt offset6; sqInt offset7; - usqIntptr_t offset8; - usqIntptr_t offset9; - 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 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 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 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; - usqIntptr_t save0; - usqIntptr_t save01; - usqIntptr_t save1; - usqIntptr_t save11; - usqIntptr_t save12; - usqIntptr_t save13; - usqIntptr_t shiftCountReg; - usqIntptr_t shiftCountReg1; + usqInt offset8; + usqInt offset9; + usqInt operand; + usqInt operand1; + usqInt reg; + usqInt reg1; + usqInt reg10; + usqInt reg11; + usqInt reg12; + usqInt reg13; + usqInt reg14; + usqInt reg15; + usqInt reg16; + usqInt reg17; + usqInt reg18; + usqInt reg19; + usqInt reg2; + usqInt reg20; + usqInt reg21; + usqInt reg22; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt reg8; + usqInt reg9; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS10; + usqInt regLHS11; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regLHS5; + usqInt regLHS6; + usqInt regLHS7; + usqInt regLHS8; + usqInt regLHS9; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS10; + usqInt regRHS11; + usqInt regRHS2; + usqInt regRHS3; + usqInt regRHS4; + usqInt regRHS5; + usqInt regRHS6; + usqInt regRHS7; + usqInt regRHS8; + usqInt regRHS9; + usqInt regToShift; + usqInt regToShift1; + usqInt save0; + usqInt save01; + usqInt save1; + usqInt save11; + usqInt save12; + usqInt save13; + usqInt shiftCountReg; + usqInt shiftCountReg1; sqInt skip; sqInt skip1; sqInt skip10; @@ -18407,49 +18423,49 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt skip7; sqInt skip8; sqInt skip9; - 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 srcReg16; - usqIntptr_t srcReg17; - usqIntptr_t srcReg18; - usqIntptr_t srcReg19; - usqIntptr_t srcReg2; - usqIntptr_t srcReg20; - usqIntptr_t srcReg21; - usqIntptr_t srcReg22; - usqIntptr_t srcReg23; - usqIntptr_t srcReg24; - usqIntptr_t srcReg25; - usqIntptr_t srcReg26; - usqIntptr_t srcReg27; - usqIntptr_t srcReg28; - usqIntptr_t srcReg29; - usqIntptr_t srcReg3; - usqIntptr_t srcReg30; - usqIntptr_t srcReg31; - usqIntptr_t srcReg32; - 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 value11; - usqIntptr_t value2; - usqIntptr_t value3; - usqIntptr_t value4; - usqIntptr_t value5; - usqIntptr_t value6; + usqInt src; + usqInt src1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg20; + usqInt srcReg21; + usqInt srcReg22; + usqInt srcReg23; + usqInt srcReg24; + usqInt srcReg25; + usqInt srcReg26; + usqInt srcReg27; + usqInt srcReg28; + usqInt srcReg29; + usqInt srcReg3; + usqInt srcReg30; + usqInt srcReg31; + usqInt srcReg32; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; + usqInt value; + usqInt value1; + usqInt value11; + usqInt value2; + usqInt value3; + usqInt value4; + usqInt value5; + usqInt value6; usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { @@ -21538,9 +21554,9 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - usqIntptr_t reg1; - usqIntptr_t reg2; - usqIntptr_t regDivisor; + usqInt reg1; + usqInt reg2; + usqInt regDivisor; switch ((self_in_dispatchConcretizeProcessorSpecific->opcode)) { @@ -22668,15 +22684,15 @@ rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, s /* prevent type inference for avoiding warning on abs */ /* CogX64Compiler>>#rewriteCPICJumpAt:target: */ -static sqInt NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +static AbstractInstruction * NoDbgRegParms +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { sqInt callDistance; - callDistance = jumpTargetAddress - addressFollowingJump; + callDistance = jumpTargetAddr - addressFollowingJump; assert((SQABS(callDistance)) < 128); byteAtput(addressFollowingJump - 1, callDistance & 0xFF); - return 2; + return self_in_rewriteCPICJumpAttarget; } @@ -24844,7 +24860,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -25106,7 +25122,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -25128,7 +25144,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 3) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 3) | 1)); introspectionDataIndex += 2; } return 0; @@ -25719,7 +25735,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -26272,7 +26288,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -26293,8 +26309,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -26502,7 +26518,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -27690,7 +27710,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -27924,7 +27945,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -27965,7 +27987,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc = ssTop(); ssPop(1); if ((((desc->type)) == SSConstant) @@ -28036,7 +28059,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -28462,7 +28486,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -28729,7 +28754,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -28918,7 +28944,8 @@ genSpecialSelectorComparison(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((((argInt = ((ssTop())->constant)))) & 7) == 1)); @@ -29112,7 +29139,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -29183,7 +29211,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -29220,7 +29249,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -29359,19 +29389,18 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; - return fixup; -} + } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ static void NoDbgRegParms @@ -29547,7 +29576,8 @@ marshallAbsentReceiverSendArguments(sqInt numArgs) ssAllocateCallReg(ReceiverResultReg); /* begin putSelfInReceiverResultReg */ storeToReg((&simSelf), ReceiverResultReg); - ssFlushTo(simStackPtr - numArgs); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - numArgs, simNativeStackPtr); if (numArgs > 2) { /* The arguments must be pushed to the stack, and hence the receiver @@ -29575,7 +29605,8 @@ marshallAbsentReceiverSendArguments(sqInt numArgs) /* begin PushR: */ genoperand(PushR, ReceiverResultReg); } - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { if (numArgs > 0) { @@ -29613,7 +29644,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -29623,7 +29655,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -29631,7 +29664,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -29670,7 +29704,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -29735,7 +29769,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -29876,8 +29911,7 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); if ((isBranch(descriptor)) @@ -30207,13 +30241,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1ULL << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -30255,7 +30282,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -30279,7 +30307,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -30599,6 +30628,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/nsspur64src/vm/cointerp.c b/nsspur64src/vm/cointerp.c index add85dbed..d931b29ba 100644 --- a/nsspur64src/vm/cointerp.c +++ b/nsspur64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -464,6 +464,7 @@ extern sqInt ceEnclosingObjectAt(sqInt level); extern void ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceInterpretMethodFromPICreceiver(sqInt aMethodObj, sqInt rcvr); extern sqInt ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr); +extern sqInt ceNewHashOf(sqInt anObject); extern sqInt ceNonLocalReturn(sqInt returnValue); extern void ceOuterSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceReturnToInterpreter(sqInt anOop); @@ -737,6 +738,7 @@ static void primitiveForceDisplayUpdate(void); static void primitiveFormPrint(void); static void primitiveFractionalPart(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -905,6 +907,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -930,9 +933,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1181,6 +1184,7 @@ static void NoDbgRegParms markLoopFrom(sqInt objOop); static void NoDbgRegParms NeverInline markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged); static void markWeaklingsAndMarkAndFireEphemerons(void); extern sqInt maybeSplObj(sqInt index); +static sqInt NoDbgRegParms newHashBitsOf(sqInt objOop); static sqInt newObjectHash(void); static sqInt newSpaceIsEmpty(void); extern sqInt nilObject(void); @@ -1192,8 +1196,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1260,6 +1264,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1356,14 +1361,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1493,6 +1499,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1669,8 +1676,8 @@ _iss sqInt specialObjectsOop; _iss usqInt freeStart; _iss usqInt newMethod; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt lkupClassTag; @@ -1739,6 +1746,7 @@ _iss sqInt classNameIndex; _iss sqInt gcPhaseInProgress; _iss sqInt methodDictLinearSearchLimit; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt lastCoggableInterpretedBlockMethod; _iss sqInt lastUncoggableInterpretedBlockMethod; _iss sqInt metaclassNumSlots; @@ -1750,7 +1758,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1777,6 +1784,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1790,11 +1799,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1829,6 +1836,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; @@ -1851,7 +1859,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1882,6 +1889,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1897,6 +1905,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2509,7 +2520,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.2142"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.2165"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5112,7 +5123,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l755; + goto l753; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5160,10 +5171,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l782; + goto l780; } ourContext = marryFrameSP(localFP, localSP); - l782: /* end ensureFrameIsMarried:SP: */; + l780: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5172,7 +5183,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l755; + goto l753; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5181,10 +5192,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l775; + goto l773; } ourContext1 = marryFrameSP(localFP, localSP); - l775: /* end ensureFrameIsMarried:SP: */; + l773: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5195,7 +5206,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l755; + goto l753; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5247,10 +5258,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l768; + goto l766; } ourContext2 = marryFrameSP(localFP, localSP); - l768: /* end ensureFrameIsMarried:SP: */; + l766: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5259,7 +5270,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l755; + goto l753; } } assert(pageListIsWellFormed()); @@ -5364,11 +5375,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l765; + goto l763; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l765: /* end maybeReturnToMachineCodeFrame */; + l763: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5383,7 +5394,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l755: /* end case */; + l753: /* end case */; break; case 121: /* returnTrue */ @@ -5499,27 +5510,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l793; + goto l791; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l793; + goto l791; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l793: /* end findFrameAbove:inPage: */; + l791: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l788; + goto l786; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l788: /* end newStackPage */; + l786: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5542,7 +5553,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l784; + goto l782; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5578,7 +5589,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l784; + goto l782; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5596,7 +5607,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l784; + goto l782; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5621,7 +5632,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l784; + goto l782; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5639,7 +5650,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l784: /* end case */; + l782: /* end case */; break; case 126: case 127: @@ -5673,10 +5684,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l794; + goto l792; } ourContext = marryFrameSP(theFP, theSP); - l794: /* end ensureFrameIsMarried:SP: */; + l792: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6118,12 +6129,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l812; + goto l810; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l812: /* end classAtIndex: */; + l810: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6144,7 +6155,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l796; + goto l794; } /* second probe */ @@ -6154,7 +6165,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l796; + goto l794; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6162,10 +6173,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l796; + goto l794; } ok = 0; - l796: /* end inlineLookupInMethodCacheSel:classTag: */; + l794: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6235,7 +6246,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l813; + goto l811; } } /* begin classAtIndex: */ @@ -6248,12 +6259,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l809; + goto l807; } /* begin fetchPointer:ofObject: */ fieldIndex11 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l809: /* end classAtIndex: */; + l807: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupOrdinarySend(); @@ -6265,7 +6276,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l813: /* end internalFindNewMethodOrdinary */; + l811: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6278,28 +6289,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l817; + goto l815; } if (localPrimIndex == 256) { - goto l817; + goto l815; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l817; + goto l815; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l817; + goto l815; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l817; + goto l815; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l817; + goto l815; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6361,7 +6372,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l817; + goto l815; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6441,11 +6452,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l811; + goto l809; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l811: /* end getErrorObjectFromPrimFailCode */; + l809: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6469,7 +6480,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l817: /* end internalExecuteNewMethod */; + l815: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6914,18 +6925,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7041,7 +7056,7 @@ interpret(void) case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7263,7 +7278,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -8115,7 +8130,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l831; + goto l828; } if (bytecode == 172) { @@ -8124,7 +8139,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l831; + goto l828; } if (bytecode > 167) { @@ -8134,7 +8149,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l831; + goto l828; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8142,7 +8157,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l831: /* end case */; + l828: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -8300,7 +8315,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l834; + goto l831; } if (bytecode == 172) { @@ -8310,14 +8325,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l834; + goto l831; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l834: /* end case */; + l831: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -10635,7 +10650,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l835; + goto l832; } if (bytecode == 244) { @@ -10644,7 +10659,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l835; + goto l832; } if (bytecode == 243) { @@ -10654,7 +10669,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l835; + goto l832; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10662,7 +10677,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l835: /* end case */; + l832: /* end case */; break; case 339: /*83*/ /* bytecodePrimGreaterThanV4 */ @@ -10820,7 +10835,7 @@ interpret(void) localIP = (localIP + (bytecode - 207)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l838; + goto l835; } if (bytecode == 244) { @@ -10830,14 +10845,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l838; + goto l835; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l838: /* end case */; + l835: /* end case */; break; case 340: /*84*/ /* bytecodePrimLessOrEqualV4 */ @@ -12811,7 +12826,7 @@ interpret(void) case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -13473,7 +13488,7 @@ interpret(void) usqInt length; sqInt literal; sqInt localPrimIndex; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt methodReceiver; @@ -13554,12 +13569,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l863; + goto l852; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l863: /* end classAtIndex: */; + l852: /* end classAtIndex: */; /* begin lookupImplicitReceiverSend */ GIV(messageSelector) = (((GIV(messageSelector) & (tagMask())) == 0) && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) @@ -13578,18 +13593,22 @@ interpret(void) objOop12 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop12); } literal = objOop12; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop5 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop5 & (tagMask())) == 0) && (((longAt(objOop5)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop5 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop5); } - literal = objOop5; + candidateMixin = objOop5; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -13645,12 +13664,12 @@ interpret(void) } GIV(newMethod) = objOop11; found = 1; - goto l879; + goto l875; } index += 1; } found = 0; - goto l879; + goto l875; } /* It is assumed that there are some nils in this dictionary, and search will @@ -13675,7 +13694,7 @@ interpret(void) nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { found = 0; - goto l879; + goto l875; } if (((nextSelector & (tagMask())) == 0) && (((longAt(nextSelector)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -13697,24 +13716,24 @@ interpret(void) } GIV(newMethod) = objOop3; found = 1; - goto l879; + goto l875; } index += 1; if (index == length) { if (wrapAround) { found = 0; - goto l879; + goto l875; } wrapAround = 1; index = SelectorStart; } } found = 0; - l879: /* end lookupMethodInDictionary: */; + l875: /* end lookupMethodInDictionary: */; if (found) { GIV(localAbsentReceiver) = candidateReceiver; actualLookupRule = lookupLexicalfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l844; + goto l845; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((sqInt)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -13734,7 +13753,7 @@ interpret(void) ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits2) << (shiftForWord()))))) : fetchClassOfNonImm(methodReceiver)); actualLookupRule = lookupProtectedstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l844: /* end lookupImplicitReceiverSend */; + l845: /* end lookupImplicitReceiverSend */; /* begin internalizeIPandSP */ assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); localIP = pointerForOop(GIV(instructionPointer)); @@ -13766,28 +13785,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l840; + goto l856; } if (localPrimIndex == 256) { - goto l840; + goto l856; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l840; + goto l856; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l840; + goto l856; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l840; + goto l856; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l840; + goto l856; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13849,7 +13868,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l840; + goto l856; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -13957,7 +13976,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l840: /* end internalExecuteNewMethod */; + l856: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14044,7 +14063,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l912; + goto l882; } /* second probe */ @@ -14056,7 +14075,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l912; + goto l882; } probe1 = (((usqInt) hash1) >> 2) & NSMethodCacheMask; if (((((GIV(nsMethodCache)[probe1 + NSMethodCacheSelector]) == GIV(messageSelector)) @@ -14066,7 +14085,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l912; + goto l882; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14112,18 +14131,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord()))))) : fetchClassOfNonImm(GIV(localAbsentReceiver)))); @@ -14141,7 +14164,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToNSCache(actualLookupRule); - l912: ; + l882: ; /* begin shuffleArgumentsAndStoreAbsentReceiver: */ @@ -14167,28 +14190,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l911; + goto l887; } if (localPrimIndex == 256) { - goto l911; + goto l887; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l911; + goto l887; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l911; + goto l887; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l911; + goto l887; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l911; + goto l887; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14250,7 +14273,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l911; + goto l887; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -14358,7 +14381,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l911: /* end internalExecuteNewMethod */; + l887: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14599,12 +14622,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l667; + goto l673; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l667: /* end classAtIndex: */; + l673: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14617,18 +14640,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < 0) { count += 1; @@ -14676,28 +14703,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l670; + goto l674; } if (localPrimIndex == 256) { - goto l670; + goto l674; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l670; + goto l674; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l670; + goto l674; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l670; + goto l674; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l670; + goto l674; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14759,7 +14786,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l670; + goto l674; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -14839,11 +14866,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l684; + goto l688; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l684: /* end getErrorObjectFromPrimFailCode */; + l688: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14867,7 +14894,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l670: /* end internalExecuteNewMethod */; + l674: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14899,15 +14926,15 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l694; + goto l693; } else { goto respondToUnknownBytecode; - goto l694; + goto l693; } } - l694: /* end case */; + l693: /* end case */; break; case 509: /*253*/ /* extPushClosureBytecode */ @@ -14918,7 +14945,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14943,10 +14970,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l719; + goto l718; } context = marryFrameSP(theFP, theSP); - l719: /* end ensureFrameIsMarried:SP: */; + l718: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14974,13 +15001,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l715; + goto l714; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l715: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l714: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -15116,12 +15143,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l728; + goto l733; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l728: /* end classAtIndex: */; + l733: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -15134,18 +15161,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -15193,28 +15224,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l731; + goto l734; } if (localPrimIndex == 256) { - goto l731; + goto l734; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l731; + goto l734; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l731; + goto l734; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l731; + goto l734; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l731; + goto l734; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -15276,7 +15307,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l731; + goto l734; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -15356,11 +15387,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l745; + goto l748; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l745: /* end getErrorObjectFromPrimFailCode */; + l748: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -15384,7 +15415,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l731: /* end internalExecuteNewMethod */; + l734: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -16060,7 +16091,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -16080,10 +16110,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt methodField1 = longAt(lifp + FoxMethod); if ((methodField1 & MFMethodFlagIsBlockFlag) != 0) { cogMethod = ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset)))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -16596,8 +16626,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -16618,8 +16649,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -16925,18 +16957,22 @@ ceDynamicSuperSendreceiver(sqInt cacheAddress, sqInt methodReceiver) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? (/* begin fetchPointer:ofObject: */ longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord())))))) @@ -17031,7 +17067,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) sqInt index; usqInt length; sqInt literal; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt methodHeader1; @@ -17124,18 +17160,22 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) objOop12 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop12); } literal = objOop12; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop5 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop5 & (tagMask())) == 0) && (((longAt(objOop5)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop5 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop5); } - literal = objOop5; + candidateMixin = objOop5; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -17261,7 +17301,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) if (found) { GIV(localAbsentReceiver) = candidateReceiver; errSelIdx = lookupLexicalNoMNUfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l32; + goto l31; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((sqInt)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -17284,7 +17324,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) GIV(lkupClass) = fetchClassOfNonImm(methodReceiver); } errSelIdx = lookupProtectedNoMNUstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l32: /* end lookupImplicitReceiverSendNoMNU: */; + l31: /* end lookupImplicitReceiverSendNoMNU: */; if (errSelIdx != 0) { assert(errSelIdx == SelectorDoesNotUnderstand); assert(GIV(localAbsentReceiver) == methodReceiver); @@ -17474,6 +17514,19 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) return 0; } + +/* We know anObject has not a hash yet (or this trampoline would not be + called. Sets the hash, then answers it as a smallinteger */ + + /* CoInterpreter>>#ceNewHashOf: */ +sqInt +ceNewHashOf(sqInt anObject) +{ + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); + return (((usqInt)(newHashBitsOf(anObject)) << 3) | 1); +} + /* CoInterpreter>>#ceNonLocalReturn: */ sqInt ceNonLocalReturn(sqInt returnValue) @@ -17744,8 +17797,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -18155,7 +18209,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -18269,7 +18322,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -18453,18 +18505,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -18548,7 +18604,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18875,7 +18930,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -19734,7 +19789,6 @@ flushExternalPrimitiveOf(sqInt methodObj) header = ((((CogMethod *) header1))->methodHeader); } if (header & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (methodObj + ((LiteralStart + (((header >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primIdx1 = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -19853,7 +19907,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -20613,7 +20667,7 @@ lookupLexicalNoMNUfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -20900,18 +20954,22 @@ lookupOuterSendNoMNUdepth(sqInt methodReceiver, sqInt depth) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -20948,7 +21006,7 @@ lookupProtectedNoMNUstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -21349,7 +21407,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -21944,18 +22002,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -21982,7 +22041,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -22406,7 +22465,7 @@ positive32BitValueOf(sqInt oop) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -22467,7 +22526,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -22913,7 +22972,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -23401,7 +23460,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -23555,6 +23614,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -23755,6 +23817,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -24003,15 +24066,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -24068,6 +24143,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -24080,8 +24156,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -24256,6 +24334,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -24614,7 +24693,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -24692,7 +24771,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -25081,8 +25160,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -25255,6 +25335,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -25575,8 +25656,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -25584,14 +25664,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -25620,8 +25700,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -25629,14 +25708,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -25667,8 +25746,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -25676,14 +25754,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -27363,8 +27441,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -27372,14 +27449,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -27403,8 +27480,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -27412,14 +27488,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -27445,8 +27521,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -27454,14 +27529,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l18; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -27484,6 +27559,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -27935,16 +28011,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -27971,7 +28047,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -28047,7 +28123,7 @@ magnitude64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -28430,7 +28506,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -29191,8 +29266,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29371,8 +29446,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29688,8 +29763,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -30088,7 +30163,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -30318,7 +30393,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30584,7 +30659,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30847,7 +30922,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -31282,7 +31357,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -31292,7 +31367,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -31303,7 +31378,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -31320,7 +31395,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -31332,8 +31407,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31351,7 +31425,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -31469,7 +31543,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -33287,8 +33361,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -33296,14 +33369,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -33328,8 +33401,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -33337,14 +33409,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -33371,8 +33443,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -33380,14 +33451,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -33419,7 +33490,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -33612,6 +33683,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -33844,7 +33962,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -35204,7 +35322,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -35442,7 +35560,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -35762,7 +35880,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -35856,7 +35974,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -35916,7 +36034,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -36069,8 +36187,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -36078,18 +36195,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -36112,8 +36229,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -36121,18 +36237,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -36144,8 +36260,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -36153,22 +36268,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -36393,7 +36508,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -36409,28 +36524,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = numSlots2; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ assert(!(isFreeObject(stack))); longAtput(stack, (longAt(stack)) | (1ULL << (markedBitFullShift()))); @@ -36447,28 +36562,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = numSlots3; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -36478,7 +36593,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -36488,7 +36602,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -36527,7 +36640,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & (smallIntegerTag())) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -36549,7 +36662,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -36587,28 +36700,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = numSlots; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -36623,13 +36736,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 3); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -37608,7 +37721,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -40974,8 +41087,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40983,14 +41095,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41015,8 +41127,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -41024,14 +41135,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -41058,8 +41169,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -41067,14 +41177,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -41333,7 +41443,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -41591,8 +41701,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41600,14 +41709,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41628,8 +41737,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -41637,14 +41745,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -41667,8 +41775,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -41676,14 +41783,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -41826,18 +41933,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3))) != 7)) { return 0; @@ -41919,8 +42030,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42327,9 +42437,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -42506,7 +42616,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -42578,6 +42688,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -42609,7 +42730,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -42730,7 +42851,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -42742,7 +42863,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -42753,7 +42874,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -43221,8 +43342,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43230,14 +43350,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43260,8 +43380,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -43269,14 +43388,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -43322,8 +43441,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43331,14 +43449,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -43462,16 +43580,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43501,12 +43618,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -43544,7 +43660,6 @@ copyAndForward(sqInt survivor) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43590,12 +43705,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -43629,12 +43743,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -43834,7 +43948,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -44346,7 +44460,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -44362,8 +44476,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -44807,8 +44920,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44816,14 +44928,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -44849,8 +44961,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -44858,14 +44969,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -44880,8 +44991,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -44889,14 +44999,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -45270,7 +45380,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -45278,7 +45388,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -45289,8 +45399,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45331,8 +45440,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45340,14 +45448,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45386,8 +45494,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45434,8 +45541,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45443,14 +45549,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -45498,8 +45604,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -45507,14 +45612,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45559,8 +45664,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -45613,8 +45717,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -45622,14 +45725,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -45673,7 +45776,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -45692,7 +45795,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -45708,7 +45811,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -45808,8 +45911,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45845,8 +45947,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45854,14 +45955,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45898,8 +45999,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45907,14 +46007,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45944,8 +46044,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45953,14 +46052,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -46071,8 +46170,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46080,14 +46178,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46111,8 +46209,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46120,14 +46217,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46153,8 +46250,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46162,14 +46258,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -46211,8 +46307,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46220,14 +46315,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -47313,8 +47408,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47322,14 +47416,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47374,8 +47468,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47383,14 +47476,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47470,8 +47563,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47479,14 +47571,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -47642,12 +47734,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -47690,8 +47782,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47699,14 +47790,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47757,12 +47848,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -47805,8 +47896,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47814,14 +47904,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47915,12 +48005,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -47980,8 +48070,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47989,14 +48078,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -48046,7 +48135,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -48087,7 +48176,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -48681,8 +48770,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48690,14 +48778,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -49126,8 +49214,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49135,14 +49222,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49174,8 +49261,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49183,14 +49269,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49224,8 +49310,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49233,14 +49318,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -49526,7 +49611,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -49781,8 +49865,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49790,14 +49873,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49820,8 +49903,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49829,14 +49911,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -50072,8 +50154,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50081,14 +50162,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50121,8 +50202,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50130,14 +50210,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50172,8 +50252,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50181,14 +50260,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -50268,8 +50347,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50277,14 +50355,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50314,8 +50392,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50323,14 +50400,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50362,8 +50439,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50371,14 +50447,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -50948,7 +51024,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51273,8 +51349,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51282,14 +51357,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51312,8 +51387,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -51321,14 +51395,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -51353,8 +51427,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -51362,14 +51435,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -51427,7 +51500,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -51435,7 +51508,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -51474,10 +51547,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i2 = 2; i2 < GIV(numClassTablePages); i2 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i2; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -51528,8 +51601,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51537,14 +51609,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } @@ -53049,8 +53121,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -53072,8 +53143,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53117,7 +53187,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -53125,7 +53195,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -53133,7 +53203,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -53141,11 +53211,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -53155,7 +53225,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -53163,11 +53233,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -53180,8 +53250,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -53189,17 +53258,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -53208,7 +53277,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -53227,7 +53296,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -53243,7 +53312,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -53264,8 +53333,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -53273,17 +53341,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -53291,8 +53359,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53300,17 +53367,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -53330,7 +53397,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -53388,8 +53454,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -53397,14 +53462,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -53530,8 +53595,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53539,14 +53603,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -53576,8 +53640,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53585,14 +53648,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53615,8 +53678,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53624,14 +53686,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -53737,8 +53799,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -53746,14 +53807,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53807,8 +53868,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53816,14 +53876,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53879,8 +53939,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53888,14 +53947,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -53927,7 +53986,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -54035,7 +54094,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -54063,7 +54122,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -54087,7 +54146,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -54115,7 +54174,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -54138,8 +54197,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54147,14 +54205,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -54648,7 +54706,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -54902,7 +54960,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -55024,6 +55082,19 @@ maybeSplObj(sqInt index) : 0); } + /* SpurMemoryManager>>#newHashBitsOf: */ +static sqInt NoDbgRegParms +newHashBitsOf(sqInt objOop) +{ + sqInt hash; + + hash = (newObjectHash()) & (identityHashHalfWordMask()); + /* begin setHashBitsOf:to: */ + assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))); + long32Atput(objOop + 4, ((((long32At(objOop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); + return hash; +} + /* Use a slight variation on D.H. Lehmer's linear congruential generator from 1951. See e.g. http://en.wikipedia.org/wiki/Linear_congruential_generator. */ @@ -55264,8 +55335,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55301,7 +55371,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -55316,7 +55386,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -55580,8 +55650,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55603,8 +55672,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55627,8 +55695,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -55649,8 +55716,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -55728,8 +55794,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55737,14 +55802,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55766,8 +55831,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55775,14 +55839,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -55807,8 +55871,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55816,14 +55879,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -55935,8 +55998,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56032,8 +56094,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56041,14 +56102,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56087,8 +56148,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -56096,14 +56156,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56135,8 +56195,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56144,14 +56203,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -56292,8 +56351,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56779,8 +56837,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56788,14 +56845,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56826,8 +56883,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56835,14 +56891,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56875,8 +56931,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56884,14 +56939,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56995,8 +57050,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57004,14 +57058,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57049,8 +57103,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57058,14 +57111,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57105,8 +57158,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57114,14 +57166,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57247,8 +57299,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57256,14 +57307,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57293,8 +57344,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57302,14 +57352,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57332,8 +57382,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57341,14 +57390,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57424,8 +57473,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57433,14 +57481,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57468,8 +57516,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57477,14 +57524,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -57507,8 +57554,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57516,14 +57562,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -57871,8 +57917,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57880,14 +57925,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57917,8 +57962,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57926,14 +57970,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57956,8 +58000,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57965,14 +58008,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58098,8 +58141,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58107,14 +58149,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58143,8 +58185,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58152,14 +58193,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58190,8 +58231,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58199,14 +58239,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58289,8 +58329,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58298,14 +58337,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58341,8 +58380,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58350,14 +58388,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58395,8 +58433,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58404,14 +58441,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58495,8 +58532,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58504,14 +58540,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58541,8 +58577,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58550,14 +58585,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58580,8 +58615,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58589,14 +58623,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58806,8 +58840,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58815,14 +58848,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58850,8 +58883,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58859,14 +58891,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58887,8 +58919,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58896,14 +58927,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58978,13 +59009,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -58992,15 +59023,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -59017,7 +59048,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -59041,8 +59072,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -59050,14 +59080,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -59078,13 +59108,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -59092,15 +59122,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -59117,7 +59147,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -59141,8 +59171,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -59150,14 +59179,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -59179,13 +59208,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -59193,15 +59222,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -59218,7 +59247,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -59243,8 +59272,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -59252,14 +59280,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -59666,7 +59694,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -59676,8 +59703,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -59728,7 +59754,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -59921,6 +59947,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -60021,7 +60057,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -60040,7 +60076,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -60056,7 +60092,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -60065,7 +60101,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -60084,7 +60120,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -60100,7 +60136,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -60164,8 +60200,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60331,7 +60366,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -61013,11 +61048,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -61032,7 +61067,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -61048,8 +61083,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -61057,16 +61091,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -61092,8 +61126,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61101,14 +61134,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -61128,16 +61161,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -61146,11 +61179,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -61158,7 +61191,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -61228,8 +61261,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -61237,14 +61269,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -61343,8 +61375,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -61364,8 +61395,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -61373,14 +61403,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -61442,8 +61472,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61522,7 +61551,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -61544,7 +61573,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -61593,7 +61622,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -61609,8 +61638,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61618,16 +61646,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -61698,8 +61726,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -61707,14 +61734,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -61733,9 +61760,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -61751,9 +61775,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -61785,9 +61808,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -61798,8 +61820,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61809,9 +61830,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -61869,7 +61889,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -61944,8 +61964,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -62001,8 +62020,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -62010,14 +62028,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -62082,8 +62100,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62091,14 +62108,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -62215,8 +62232,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62224,14 +62240,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -62271,7 +62287,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -62437,13 +62453,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l56; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l56: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l57; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -62451,15 +62467,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l57; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l57; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l57; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -62476,7 +62492,7 @@ updatePointers(void) numLiterals1 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l57: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -62503,8 +62519,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -62512,14 +62527,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -62531,7 +62546,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -62544,13 +62559,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l63; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l63: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l64; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -62558,15 +62573,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l64; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l64; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l64; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -62583,7 +62598,7 @@ updatePointers(void) numLiterals2 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l64: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -62611,8 +62626,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -62620,16 +62634,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -62670,13 +62684,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -62684,15 +62698,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -62709,7 +62723,7 @@ updatePointers(void) numLiterals3 = ((header4 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -62746,8 +62760,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -62782,7 +62795,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -62795,8 +62808,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -62804,18 +62816,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -62838,13 +62850,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l63; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -62852,15 +62864,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l62; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l62; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -62877,7 +62889,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -62906,8 +62918,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62915,14 +62926,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -63124,8 +63135,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63133,14 +63143,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -63225,7 +63235,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -63325,8 +63335,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -63493,7 +63503,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -63609,8 +63619,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63618,24 +63627,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -63698,8 +63707,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -63928,8 +63937,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); @@ -64336,7 +64345,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -64430,8 +64438,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64439,14 +64446,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64467,8 +64474,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -64476,14 +64482,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64506,8 +64512,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -64515,14 +64520,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -65237,7 +65242,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -65247,7 +65252,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -65335,9 +65340,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -65443,6 +65448,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -66109,8 +66143,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -66118,14 +66151,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -66177,8 +66210,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -66186,14 +66218,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66247,8 +66279,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -66256,20 +66287,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -66302,8 +66333,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -66311,14 +66341,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66343,8 +66373,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -66352,14 +66381,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66386,8 +66415,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -66395,16 +66423,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -66529,8 +66557,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -66604,8 +66633,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66695,8 +66725,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -68060,8 +68091,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -69171,7 +69203,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -69321,7 +69353,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69506,7 +69538,7 @@ lookupMNU(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69664,7 +69696,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69833,7 +69865,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -70013,7 +70045,7 @@ lookupOrdinarySend(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -70174,7 +70206,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -70327,7 +70359,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -70492,7 +70524,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -70839,8 +70871,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -70892,7 +70925,6 @@ marryFrameSP(char *theFP, char *theSP) cogMethod = ((CogMethod *) (methodFieldOrObj & MFMethodMask)); numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { - /* begin nilObject */ closureOrNil = GIV(nilObj); } @@ -70916,11 +70948,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -71119,18 +71149,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -71403,6 +71434,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -71856,8 +71920,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71865,14 +71928,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -71903,8 +71966,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -71912,14 +71974,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71943,8 +72005,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71952,14 +72013,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -72715,7 +72776,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72726,7 +72787,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72737,23 +72798,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72769,39 +72830,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72814,7 +72875,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72822,7 +72883,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -72833,7 +72894,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72847,7 +72908,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72860,12 +72921,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72876,7 +72937,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72884,9 +72945,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72900,8 +72961,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72909,14 +72969,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72963,7 +73023,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72974,7 +73034,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72985,23 +73045,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -73017,39 +73077,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -73062,7 +73122,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -73070,7 +73130,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -73081,7 +73141,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -73095,7 +73155,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -73108,12 +73168,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -73124,7 +73184,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -73132,9 +73192,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -73148,8 +73208,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -73157,14 +73216,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -73212,7 +73271,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -73223,7 +73282,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -73234,23 +73293,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -73266,39 +73325,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -73311,7 +73370,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -73319,7 +73378,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -73330,7 +73389,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -73344,7 +73403,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -73357,12 +73416,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -73373,7 +73432,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -73381,9 +73440,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -73398,8 +73457,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -73407,14 +73465,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -74732,11 +74790,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -74990,14 +75050,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -75014,6 +75083,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75026,21 +75096,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -75056,12 +75130,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -75077,6 +75154,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -75090,11 +75168,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -75120,6 +75201,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -76509,7 +76594,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -80036,7 +80121,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -80073,7 +80158,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -80374,7 +80459,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -80680,7 +80765,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -80992,8 +81077,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -81043,8 +81129,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -81130,7 +81218,6 @@ primitiveVMParameter(void) char *sp1; char *sp2; sqInt tagBits; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -81180,6 +81267,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -81189,165 +81277,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -81355,9 +81407,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -81365,22 +81417,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -81388,192 +81440,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -81602,7 +81559,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -81635,14 +81592,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -81718,7 +81678,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -81831,48 +81791,38 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l84; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l84: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -81927,7 +81877,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -81949,12 +81900,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l65; + goto l77; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l65: /* end setCogVMFlags: */; + l77: /* end setCogVMFlags: */; } } if (index == 49) { @@ -82187,8 +82138,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -82196,14 +82146,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -82242,8 +82192,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -82251,14 +82200,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -82290,8 +82239,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -82299,14 +82247,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -82331,6 +82279,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -82378,6 +82327,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/nsspur64src/vm/cointerp.h b/nsspur64src/vm/cointerp.h index a3c8886d0..a921774b2 100644 --- a/nsspur64src/vm/cointerp.h +++ b/nsspur64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ @@ -40,6 +40,7 @@ extern sqInt ceEnclosingObjectAt(sqInt level); extern void ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceInterpretMethodFromPICreceiver(sqInt aMethodObj, sqInt rcvr); extern sqInt ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr); +extern sqInt ceNewHashOf(sqInt anObject); extern sqInt ceNonLocalReturn(sqInt returnValue); extern void ceOuterSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceReturnToInterpreter(sqInt anOop); @@ -143,6 +144,7 @@ extern usqInt scavengeThresholdAddress(void); extern usqInt specialObjectsArrayAddress(void); extern sqInt withoutForwardingOnandwithsendToCogit(sqInt obj1, sqInt obj2, sqInt aBool, sqInt (*selector)(sqInt,sqInt,sqInt)); extern sqInt byteSwapped(sqInt w); +extern sqInt fetchClassTagOf(sqInt oop); extern sqInt floatObjectOf(double aFloat); extern sqInt headerIndicatesAlternateBytecodeSet(sqInt methodHeader); extern sqInt instantiateClassindexableSize(sqInt classObj, usqInt nElements); @@ -231,7 +233,7 @@ extern void NeverInline NeverInline markAndTrace(sqInt objOop); extern sqInt maybeSplObj(sqInt index); extern sqInt nilObject(void); extern sqInt nonIndexablePointerFormat(void); -extern usqInt numBytesOf(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); extern sqInt numStrongSlotsOfWeakling(sqInt objOop); @@ -286,8 +288,9 @@ extern sqInt argumentCountOf(sqInt methodPointer); extern sqInt canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader); extern sqInt checkAllAccessibleObjectsOkay(void); extern sqInt checkOkayInterpreterObjects(sqInt writeBack); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt disownVM(sqInt flags); extern sqInt doSignalSemaphoreWithIndex(sqInt index); extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ; extern usqLong getNextWakeupUsecs(void); @@ -311,6 +314,7 @@ extern sqInt methodClassOf(sqInt methodPointer); extern sqInt methodPrimitiveIndex(void); extern sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); extern sqInt objCouldBeClassObj(sqInt objOop); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); @@ -352,6 +356,9 @@ VM_EXPORT sqInt breakSelectorLength ; VM_EXPORT sqInt checkAllocFiller; VM_EXPORT sqInt checkedPluginName; VM_EXPORT sqInt checkForLeaks; +VM_EXPORT sqInt debugCallbackInvokes; +VM_EXPORT sqInt debugCallbackPath; +VM_EXPORT sqInt debugCallbackReturns; VM_EXPORT sqInt deferDisplayUpdates; VM_EXPORT sqInt desiredCogCodeSize; VM_EXPORT sqInt desiredEdenBytes; diff --git a/nsspur64src/vm/gcc3x-cointerp.c b/nsspur64src/vm/gcc3x-cointerp.c index 0cf6ee74d..e976595a2 100644 --- a/nsspur64src/vm/gcc3x-cointerp.c +++ b/nsspur64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -467,6 +467,7 @@ extern sqInt ceEnclosingObjectAt(sqInt level); extern void ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceInterpretMethodFromPICreceiver(sqInt aMethodObj, sqInt rcvr); extern sqInt ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr); +extern sqInt ceNewHashOf(sqInt anObject); extern sqInt ceNonLocalReturn(sqInt returnValue); extern void ceOuterSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceReturnToInterpreter(sqInt anOop); @@ -740,6 +741,7 @@ static void primitiveForceDisplayUpdate(void); static void primitiveFormPrint(void); static void primitiveFractionalPart(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -908,6 +910,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -933,9 +936,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1184,6 +1187,7 @@ static void NoDbgRegParms markLoopFrom(sqInt objOop); static void NoDbgRegParms NeverInline markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged); static void markWeaklingsAndMarkAndFireEphemerons(void); extern sqInt maybeSplObj(sqInt index); +static sqInt NoDbgRegParms newHashBitsOf(sqInt objOop); static sqInt newObjectHash(void); static sqInt newSpaceIsEmpty(void); extern sqInt nilObject(void); @@ -1195,8 +1199,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1263,6 +1267,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1359,14 +1364,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1496,6 +1502,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1672,8 +1679,8 @@ _iss sqInt specialObjectsOop; _iss usqInt freeStart; _iss usqInt newMethod; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt lkupClassTag; @@ -1742,6 +1749,7 @@ _iss sqInt classNameIndex; _iss sqInt gcPhaseInProgress; _iss sqInt methodDictLinearSearchLimit; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt lastCoggableInterpretedBlockMethod; _iss sqInt lastUncoggableInterpretedBlockMethod; _iss sqInt metaclassNumSlots; @@ -1753,7 +1761,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1780,6 +1787,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1793,11 +1802,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1832,6 +1839,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; @@ -1854,7 +1862,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1885,6 +1892,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1900,6 +1908,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2512,7 +2523,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.2142"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.2165"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5121,7 +5132,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l755; + goto l753; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5169,10 +5180,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l782; + goto l780; } ourContext = marryFrameSP(localFP, localSP); - l782: /* end ensureFrameIsMarried:SP: */; + l780: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5181,7 +5192,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l755; + goto l753; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5190,10 +5201,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l775; + goto l773; } ourContext1 = marryFrameSP(localFP, localSP); - l775: /* end ensureFrameIsMarried:SP: */; + l773: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5204,7 +5215,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l755; + goto l753; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5256,10 +5267,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l768; + goto l766; } ourContext2 = marryFrameSP(localFP, localSP); - l768: /* end ensureFrameIsMarried:SP: */; + l766: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5268,7 +5279,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l755; + goto l753; } } assert(pageListIsWellFormed()); @@ -5373,11 +5384,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l765; + goto l763; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l765: /* end maybeReturnToMachineCodeFrame */; + l763: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5392,7 +5403,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l755: /* end case */; + l753: /* end case */; BREAK; CASE(121) /* returnTrue */ @@ -5508,27 +5519,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l793; + goto l791; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l793; + goto l791; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l793: /* end findFrameAbove:inPage: */; + l791: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l788; + goto l786; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l788: /* end newStackPage */; + l786: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5551,7 +5562,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l784; + goto l782; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5587,7 +5598,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l784; + goto l782; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5605,7 +5616,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l784; + goto l782; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5630,7 +5641,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l784; + goto l782; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5648,7 +5659,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l784: /* end case */; + l782: /* end case */; BREAK; CASE(126) CASE(127) @@ -5682,10 +5693,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l794; + goto l792; } ourContext = marryFrameSP(theFP, theSP); - l794: /* end ensureFrameIsMarried:SP: */; + l792: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6127,12 +6138,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l812; + goto l810; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l812: /* end classAtIndex: */; + l810: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6153,7 +6164,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l796; + goto l794; } /* second probe */ @@ -6163,7 +6174,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l796; + goto l794; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6171,10 +6182,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l796; + goto l794; } ok = 0; - l796: /* end inlineLookupInMethodCacheSel:classTag: */; + l794: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6244,7 +6255,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l813; + goto l811; } } /* begin classAtIndex: */ @@ -6257,12 +6268,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l809; + goto l807; } /* begin fetchPointer:ofObject: */ fieldIndex11 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l809: /* end classAtIndex: */; + l807: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupOrdinarySend(); @@ -6274,7 +6285,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l813: /* end internalFindNewMethodOrdinary */; + l811: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6287,28 +6298,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l817; + goto l815; } if (localPrimIndex == 256) { - goto l817; + goto l815; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l817; + goto l815; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l817; + goto l815; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l817; + goto l815; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l817; + goto l815; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6370,7 +6381,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l817; + goto l815; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6450,11 +6461,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l811; + goto l809; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l811: /* end getErrorObjectFromPrimFailCode */; + l809: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6478,7 +6489,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l817: /* end internalExecuteNewMethod */; + l815: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6923,18 +6934,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7050,7 +7065,7 @@ interpret(void) CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7272,7 +7287,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -8124,7 +8139,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l831; + goto l828; } if (bytecode == 172) { @@ -8133,7 +8148,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l831; + goto l828; } if (bytecode > 167) { @@ -8143,7 +8158,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l831; + goto l828; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8151,7 +8166,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l831: /* end case */; + l828: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -8309,7 +8324,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l834; + goto l831; } if (bytecode == 172) { @@ -8319,14 +8334,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l834; + goto l831; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l834: /* end case */; + l831: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -10644,7 +10659,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l835; + goto l832; } if (bytecode == 244) { @@ -10653,7 +10668,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l835; + goto l832; } if (bytecode == 243) { @@ -10663,7 +10678,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l835; + goto l832; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10671,7 +10686,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l835: /* end case */; + l832: /* end case */; BREAK; CASE(339) /*83*/ /* bytecodePrimGreaterThanV4 */ @@ -10829,7 +10844,7 @@ interpret(void) localIP = (localIP + (bytecode - 207)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l838; + goto l835; } if (bytecode == 244) { @@ -10839,14 +10854,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l838; + goto l835; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l838: /* end case */; + l835: /* end case */; BREAK; CASE(340) /*84*/ /* bytecodePrimLessOrEqualV4 */ @@ -12820,7 +12835,7 @@ interpret(void) CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -13482,7 +13497,7 @@ interpret(void) usqInt length; sqInt literal; sqInt localPrimIndex; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt methodReceiver; @@ -13563,12 +13578,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l863; + goto l852; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l863: /* end classAtIndex: */; + l852: /* end classAtIndex: */; /* begin lookupImplicitReceiverSend */ GIV(messageSelector) = (((GIV(messageSelector) & (tagMask())) == 0) && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) @@ -13587,18 +13602,22 @@ interpret(void) objOop12 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop12); } literal = objOop12; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop5 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop5 & (tagMask())) == 0) && (((longAt(objOop5)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop5 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop5); } - literal = objOop5; + candidateMixin = objOop5; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -13654,12 +13673,12 @@ interpret(void) } GIV(newMethod) = objOop11; found = 1; - goto l879; + goto l875; } index += 1; } found = 0; - goto l879; + goto l875; } /* It is assumed that there are some nils in this dictionary, and search will @@ -13684,7 +13703,7 @@ interpret(void) nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { found = 0; - goto l879; + goto l875; } if (((nextSelector & (tagMask())) == 0) && (((longAt(nextSelector)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -13706,24 +13725,24 @@ interpret(void) } GIV(newMethod) = objOop3; found = 1; - goto l879; + goto l875; } index += 1; if (index == length) { if (wrapAround) { found = 0; - goto l879; + goto l875; } wrapAround = 1; index = SelectorStart; } } found = 0; - l879: /* end lookupMethodInDictionary: */; + l875: /* end lookupMethodInDictionary: */; if (found) { GIV(localAbsentReceiver) = candidateReceiver; actualLookupRule = lookupLexicalfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l844; + goto l845; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((sqInt)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -13743,7 +13762,7 @@ interpret(void) ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits2) << (shiftForWord()))))) : fetchClassOfNonImm(methodReceiver)); actualLookupRule = lookupProtectedstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l844: /* end lookupImplicitReceiverSend */; + l845: /* end lookupImplicitReceiverSend */; /* begin internalizeIPandSP */ assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); localIP = pointerForOop(GIV(instructionPointer)); @@ -13775,28 +13794,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l840; + goto l856; } if (localPrimIndex == 256) { - goto l840; + goto l856; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l840; + goto l856; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l840; + goto l856; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l840; + goto l856; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l840; + goto l856; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13858,7 +13877,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l840; + goto l856; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -13966,7 +13985,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l840: /* end internalExecuteNewMethod */; + l856: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14053,7 +14072,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l912; + goto l882; } /* second probe */ @@ -14065,7 +14084,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l912; + goto l882; } probe1 = (((usqInt) hash1) >> 2) & NSMethodCacheMask; if (((((GIV(nsMethodCache)[probe1 + NSMethodCacheSelector]) == GIV(messageSelector)) @@ -14075,7 +14094,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l912; + goto l882; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14121,18 +14140,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord()))))) : fetchClassOfNonImm(GIV(localAbsentReceiver)))); @@ -14150,7 +14173,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToNSCache(actualLookupRule); - l912: ; + l882: ; /* begin shuffleArgumentsAndStoreAbsentReceiver: */ @@ -14176,28 +14199,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l911; + goto l887; } if (localPrimIndex == 256) { - goto l911; + goto l887; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l911; + goto l887; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l911; + goto l887; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l911; + goto l887; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l911; + goto l887; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14259,7 +14282,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l911; + goto l887; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -14367,7 +14390,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l911: /* end internalExecuteNewMethod */; + l887: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14608,12 +14631,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l667; + goto l673; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l667: /* end classAtIndex: */; + l673: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14626,18 +14649,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < 0) { count += 1; @@ -14685,28 +14712,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l670; + goto l674; } if (localPrimIndex == 256) { - goto l670; + goto l674; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l670; + goto l674; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l670; + goto l674; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l670; + goto l674; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l670; + goto l674; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14768,7 +14795,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l670; + goto l674; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -14848,11 +14875,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l684; + goto l688; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l684: /* end getErrorObjectFromPrimFailCode */; + l688: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14876,7 +14903,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l670: /* end internalExecuteNewMethod */; + l674: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14908,15 +14935,15 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l694; + goto l693; } else { goto respondToUnknownBytecode; - goto l694; + goto l693; } } - l694: /* end case */; + l693: /* end case */; BREAK; CASE(509) /*253*/ /* extPushClosureBytecode */ @@ -14927,7 +14954,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14952,10 +14979,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l719; + goto l718; } context = marryFrameSP(theFP, theSP); - l719: /* end ensureFrameIsMarried:SP: */; + l718: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14983,13 +15010,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l715; + goto l714; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l715: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l714: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -15125,12 +15152,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l728; + goto l733; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l728: /* end classAtIndex: */; + l733: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -15143,18 +15170,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -15202,28 +15233,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l731; + goto l734; } if (localPrimIndex == 256) { - goto l731; + goto l734; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l731; + goto l734; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l731; + goto l734; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l731; + goto l734; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l731; + goto l734; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -15285,7 +15316,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l731; + goto l734; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -15365,11 +15396,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l745; + goto l748; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l745: /* end getErrorObjectFromPrimFailCode */; + l748: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -15393,7 +15424,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l731: /* end internalExecuteNewMethod */; + l734: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -16069,7 +16100,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -16089,10 +16119,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt methodField1 = longAt(lifp + FoxMethod); if ((methodField1 & MFMethodFlagIsBlockFlag) != 0) { cogMethod = ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset)))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -16605,8 +16635,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -16627,8 +16658,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -16934,18 +16966,22 @@ ceDynamicSuperSendreceiver(sqInt cacheAddress, sqInt methodReceiver) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? (/* begin fetchPointer:ofObject: */ longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord())))))) @@ -17040,7 +17076,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) sqInt index; usqInt length; sqInt literal; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt methodHeader1; @@ -17133,18 +17169,22 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) objOop12 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop12); } literal = objOop12; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop5 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop5 & (tagMask())) == 0) && (((longAt(objOop5)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop5 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop5); } - literal = objOop5; + candidateMixin = objOop5; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -17270,7 +17310,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) if (found) { GIV(localAbsentReceiver) = candidateReceiver; errSelIdx = lookupLexicalNoMNUfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l32; + goto l31; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((sqInt)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -17293,7 +17333,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) GIV(lkupClass) = fetchClassOfNonImm(methodReceiver); } errSelIdx = lookupProtectedNoMNUstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l32: /* end lookupImplicitReceiverSendNoMNU: */; + l31: /* end lookupImplicitReceiverSendNoMNU: */; if (errSelIdx != 0) { assert(errSelIdx == SelectorDoesNotUnderstand); assert(GIV(localAbsentReceiver) == methodReceiver); @@ -17483,6 +17523,19 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) return 0; } + +/* We know anObject has not a hash yet (or this trampoline would not be + called. Sets the hash, then answers it as a smallinteger */ + + /* CoInterpreter>>#ceNewHashOf: */ +sqInt +ceNewHashOf(sqInt anObject) +{ + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); + return (((usqInt)(newHashBitsOf(anObject)) << 3) | 1); +} + /* CoInterpreter>>#ceNonLocalReturn: */ sqInt ceNonLocalReturn(sqInt returnValue) @@ -17753,8 +17806,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -18164,7 +18218,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -18278,7 +18331,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -18462,18 +18514,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -18557,7 +18613,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18884,7 +18939,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -19743,7 +19798,6 @@ flushExternalPrimitiveOf(sqInt methodObj) header = ((((CogMethod *) header1))->methodHeader); } if (header & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (methodObj + ((LiteralStart + (((header >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primIdx1 = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -19862,7 +19916,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -20622,7 +20676,7 @@ lookupLexicalNoMNUfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -20909,18 +20963,22 @@ lookupOuterSendNoMNUdepth(sqInt methodReceiver, sqInt depth) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -20957,7 +21015,7 @@ lookupProtectedNoMNUstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -21358,7 +21416,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -21953,18 +22011,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -21991,7 +22050,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -22415,7 +22474,7 @@ positive32BitValueOf(sqInt oop) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -22476,7 +22535,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -22922,7 +22981,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -23410,7 +23469,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -23564,6 +23623,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -23764,6 +23826,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -24012,15 +24075,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -24077,6 +24152,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -24089,8 +24165,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -24265,6 +24343,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -24623,7 +24702,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -24701,7 +24780,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -25090,8 +25169,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -25264,6 +25344,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -25584,8 +25665,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -25593,14 +25673,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -25629,8 +25709,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -25638,14 +25717,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -25676,8 +25755,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -25685,14 +25763,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -27372,8 +27450,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -27381,14 +27458,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -27412,8 +27489,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -27421,14 +27497,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -27454,8 +27530,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -27463,14 +27538,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l18; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -27493,6 +27568,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -27944,16 +28020,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -27980,7 +28056,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -28056,7 +28132,7 @@ magnitude64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -28439,7 +28515,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -29200,8 +29275,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29380,8 +29455,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29697,8 +29772,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -30097,7 +30172,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -30327,7 +30402,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30593,7 +30668,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30856,7 +30931,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -31291,7 +31366,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -31301,7 +31376,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -31312,7 +31387,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -31329,7 +31404,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -31341,8 +31416,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31360,7 +31434,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -31478,7 +31552,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -33296,8 +33370,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -33305,14 +33378,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -33337,8 +33410,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -33346,14 +33418,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -33380,8 +33452,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -33389,14 +33460,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -33428,7 +33499,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -33621,6 +33692,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -33853,7 +33971,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -35213,7 +35331,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -35451,7 +35569,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -35771,7 +35889,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -35865,7 +35983,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -35925,7 +36043,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -36078,8 +36196,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -36087,18 +36204,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -36121,8 +36238,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -36130,18 +36246,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -36153,8 +36269,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -36162,22 +36277,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -36402,7 +36517,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -36418,28 +36533,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = numSlots2; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ assert(!(isFreeObject(stack))); longAtput(stack, (longAt(stack)) | (1ULL << (markedBitFullShift()))); @@ -36456,28 +36571,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = numSlots3; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -36487,7 +36602,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -36497,7 +36611,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -36536,7 +36649,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & (smallIntegerTag())) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -36558,7 +36671,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -36596,28 +36709,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = numSlots; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -36632,13 +36745,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 3); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -37617,7 +37730,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -40983,8 +41096,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40992,14 +41104,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41024,8 +41136,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -41033,14 +41144,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -41067,8 +41178,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -41076,14 +41186,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -41342,7 +41452,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -41600,8 +41710,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41609,14 +41718,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41637,8 +41746,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -41646,14 +41754,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -41676,8 +41784,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -41685,14 +41792,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -41835,18 +41942,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3))) != 7)) { return 0; @@ -41928,8 +42039,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42336,9 +42446,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -42515,7 +42625,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -42587,6 +42697,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -42618,7 +42739,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -42739,7 +42860,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -42751,7 +42872,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -42762,7 +42883,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -43230,8 +43351,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43239,14 +43359,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43269,8 +43389,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -43278,14 +43397,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -43331,8 +43450,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43340,14 +43458,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -43471,16 +43589,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43510,12 +43627,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -43553,7 +43669,6 @@ copyAndForward(sqInt survivor) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43599,12 +43714,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -43638,12 +43752,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -43843,7 +43957,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -44355,7 +44469,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -44371,8 +44485,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -44816,8 +44929,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44825,14 +44937,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -44858,8 +44970,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -44867,14 +44978,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -44889,8 +45000,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -44898,14 +45008,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -45279,7 +45389,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -45287,7 +45397,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -45298,8 +45408,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45340,8 +45449,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45349,14 +45457,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45395,8 +45503,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45443,8 +45550,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45452,14 +45558,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -45507,8 +45613,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -45516,14 +45621,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45568,8 +45673,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -45622,8 +45726,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -45631,14 +45734,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -45682,7 +45785,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -45701,7 +45804,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -45717,7 +45820,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -45817,8 +45920,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45854,8 +45956,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45863,14 +45964,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45907,8 +46008,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45916,14 +46016,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45953,8 +46053,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45962,14 +46061,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -46080,8 +46179,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46089,14 +46187,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46120,8 +46218,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46129,14 +46226,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46162,8 +46259,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46171,14 +46267,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -46220,8 +46316,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46229,14 +46324,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -47322,8 +47417,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47331,14 +47425,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47383,8 +47477,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47392,14 +47485,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47479,8 +47572,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47488,14 +47580,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -47651,12 +47743,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -47699,8 +47791,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47708,14 +47799,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47766,12 +47857,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -47814,8 +47905,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47823,14 +47913,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47924,12 +48014,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -47989,8 +48079,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47998,14 +48087,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -48055,7 +48144,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -48096,7 +48185,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -48690,8 +48779,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48699,14 +48787,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -49135,8 +49223,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49144,14 +49231,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49183,8 +49270,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49192,14 +49278,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49233,8 +49319,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49242,14 +49327,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -49535,7 +49620,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -49790,8 +49874,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49799,14 +49882,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49829,8 +49912,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49838,14 +49920,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -50081,8 +50163,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50090,14 +50171,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50130,8 +50211,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50139,14 +50219,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50181,8 +50261,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50190,14 +50269,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -50277,8 +50356,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50286,14 +50364,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50323,8 +50401,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50332,14 +50409,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50371,8 +50448,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50380,14 +50456,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -50957,7 +51033,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51282,8 +51358,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51291,14 +51366,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51321,8 +51396,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -51330,14 +51404,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -51362,8 +51436,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -51371,14 +51444,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -51436,7 +51509,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -51444,7 +51517,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -51483,10 +51556,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i2 = 2; i2 < GIV(numClassTablePages); i2 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i2; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -51537,8 +51610,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51546,14 +51618,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } @@ -53058,8 +53130,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -53081,8 +53152,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53126,7 +53196,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -53134,7 +53204,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -53142,7 +53212,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -53150,11 +53220,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -53164,7 +53234,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -53172,11 +53242,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -53189,8 +53259,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -53198,17 +53267,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -53217,7 +53286,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -53236,7 +53305,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -53252,7 +53321,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -53273,8 +53342,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -53282,17 +53350,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -53300,8 +53368,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53309,17 +53376,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -53339,7 +53406,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -53397,8 +53463,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -53406,14 +53471,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -53539,8 +53604,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53548,14 +53612,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -53585,8 +53649,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53594,14 +53657,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53624,8 +53687,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53633,14 +53695,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -53746,8 +53808,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -53755,14 +53816,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53816,8 +53877,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53825,14 +53885,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53888,8 +53948,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53897,14 +53956,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -53936,7 +53995,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -54044,7 +54103,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -54072,7 +54131,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -54096,7 +54155,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -54124,7 +54183,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -54147,8 +54206,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54156,14 +54214,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -54657,7 +54715,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -54911,7 +54969,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -55033,6 +55091,19 @@ maybeSplObj(sqInt index) : 0); } + /* SpurMemoryManager>>#newHashBitsOf: */ +static sqInt NoDbgRegParms +newHashBitsOf(sqInt objOop) +{ + sqInt hash; + + hash = (newObjectHash()) & (identityHashHalfWordMask()); + /* begin setHashBitsOf:to: */ + assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))); + long32Atput(objOop + 4, ((((long32At(objOop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); + return hash; +} + /* Use a slight variation on D.H. Lehmer's linear congruential generator from 1951. See e.g. http://en.wikipedia.org/wiki/Linear_congruential_generator. */ @@ -55273,8 +55344,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55310,7 +55380,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -55325,7 +55395,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -55589,8 +55659,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55612,8 +55681,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55636,8 +55704,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -55658,8 +55725,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -55737,8 +55803,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55746,14 +55811,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55775,8 +55840,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55784,14 +55848,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -55816,8 +55880,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55825,14 +55888,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -55944,8 +56007,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56041,8 +56103,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56050,14 +56111,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56096,8 +56157,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -56105,14 +56165,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56144,8 +56204,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56153,14 +56212,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -56301,8 +56360,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56788,8 +56846,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56797,14 +56854,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56835,8 +56892,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56844,14 +56900,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56884,8 +56940,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56893,14 +56948,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57004,8 +57059,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57013,14 +57067,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57058,8 +57112,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57067,14 +57120,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57114,8 +57167,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57123,14 +57175,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57256,8 +57308,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57265,14 +57316,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57302,8 +57353,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57311,14 +57361,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57341,8 +57391,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57350,14 +57399,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57433,8 +57482,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57442,14 +57490,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57477,8 +57525,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57486,14 +57533,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -57516,8 +57563,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57525,14 +57571,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -57880,8 +57926,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57889,14 +57934,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57926,8 +57971,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57935,14 +57979,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57965,8 +58009,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57974,14 +58017,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58107,8 +58150,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58116,14 +58158,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58152,8 +58194,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58161,14 +58202,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58199,8 +58240,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58208,14 +58248,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58298,8 +58338,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58307,14 +58346,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58350,8 +58389,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58359,14 +58397,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58404,8 +58442,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58413,14 +58450,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58504,8 +58541,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58513,14 +58549,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58550,8 +58586,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58559,14 +58594,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58589,8 +58624,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58598,14 +58632,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58815,8 +58849,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58824,14 +58857,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58859,8 +58892,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58868,14 +58900,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58896,8 +58928,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58905,14 +58936,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58987,13 +59018,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -59001,15 +59032,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -59026,7 +59057,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -59050,8 +59081,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -59059,14 +59089,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -59087,13 +59117,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -59101,15 +59131,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -59126,7 +59156,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -59150,8 +59180,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -59159,14 +59188,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -59188,13 +59217,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -59202,15 +59231,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -59227,7 +59256,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -59252,8 +59281,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -59261,14 +59289,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -59675,7 +59703,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -59685,8 +59712,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -59737,7 +59763,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -59930,6 +59956,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -60030,7 +60066,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -60049,7 +60085,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -60065,7 +60101,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -60074,7 +60110,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -60093,7 +60129,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -60109,7 +60145,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -60173,8 +60209,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60340,7 +60375,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -61022,11 +61057,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -61041,7 +61076,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -61057,8 +61092,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -61066,16 +61100,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -61101,8 +61135,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61110,14 +61143,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -61137,16 +61170,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -61155,11 +61188,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -61167,7 +61200,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -61237,8 +61270,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -61246,14 +61278,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -61352,8 +61384,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -61373,8 +61404,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -61382,14 +61412,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -61451,8 +61481,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61531,7 +61560,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -61553,7 +61582,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -61602,7 +61631,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -61618,8 +61647,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61627,16 +61655,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -61707,8 +61735,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -61716,14 +61743,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -61742,9 +61769,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -61760,9 +61784,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -61794,9 +61817,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -61807,8 +61829,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61818,9 +61839,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -61878,7 +61898,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -61953,8 +61973,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -62010,8 +62029,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -62019,14 +62037,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -62091,8 +62109,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62100,14 +62117,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -62224,8 +62241,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62233,14 +62249,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -62280,7 +62296,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -62446,13 +62462,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l56; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l56: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l57; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -62460,15 +62476,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l57; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l57; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l57; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -62485,7 +62501,7 @@ updatePointers(void) numLiterals1 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l57: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -62512,8 +62528,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -62521,14 +62536,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -62540,7 +62555,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -62553,13 +62568,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l63; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l63: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l64; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -62567,15 +62582,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l64; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l64; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l64; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -62592,7 +62607,7 @@ updatePointers(void) numLiterals2 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l64: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -62620,8 +62635,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -62629,16 +62643,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -62679,13 +62693,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -62693,15 +62707,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -62718,7 +62732,7 @@ updatePointers(void) numLiterals3 = ((header4 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -62755,8 +62769,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -62791,7 +62804,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -62804,8 +62817,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -62813,18 +62825,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -62847,13 +62859,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l63; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -62861,15 +62873,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l62; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l62; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -62886,7 +62898,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -62915,8 +62927,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62924,14 +62935,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -63133,8 +63144,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63142,14 +63152,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -63234,7 +63244,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -63334,8 +63344,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -63502,7 +63512,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -63618,8 +63628,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63627,24 +63636,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -63707,8 +63716,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -63937,8 +63946,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); @@ -64345,7 +64354,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -64439,8 +64447,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64448,14 +64455,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64476,8 +64483,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -64485,14 +64491,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64515,8 +64521,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -64524,14 +64529,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -65246,7 +65251,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -65256,7 +65261,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -65344,9 +65349,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -65452,6 +65457,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -66118,8 +66152,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -66127,14 +66160,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -66186,8 +66219,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -66195,14 +66227,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66256,8 +66288,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -66265,20 +66296,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -66311,8 +66342,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -66320,14 +66350,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66352,8 +66382,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -66361,14 +66390,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66395,8 +66424,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -66404,16 +66432,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -66538,8 +66566,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -66613,8 +66642,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66704,8 +66734,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -68069,8 +68100,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -69180,7 +69212,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -69330,7 +69362,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69515,7 +69547,7 @@ lookupMNU(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69673,7 +69705,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69842,7 +69874,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -70022,7 +70054,7 @@ lookupOrdinarySend(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -70183,7 +70215,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -70336,7 +70368,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -70501,7 +70533,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -70848,8 +70880,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -70901,7 +70934,6 @@ marryFrameSP(char *theFP, char *theSP) cogMethod = ((CogMethod *) (methodFieldOrObj & MFMethodMask)); numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { - /* begin nilObject */ closureOrNil = GIV(nilObj); } @@ -70925,11 +70957,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -71128,18 +71158,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -71412,6 +71443,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -71865,8 +71929,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71874,14 +71937,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -71912,8 +71975,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -71921,14 +71983,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71952,8 +72014,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71961,14 +72022,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -72724,7 +72785,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72735,7 +72796,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72746,23 +72807,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72778,39 +72839,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72823,7 +72884,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72831,7 +72892,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -72842,7 +72903,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72856,7 +72917,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72869,12 +72930,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72885,7 +72946,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72893,9 +72954,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72909,8 +72970,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72918,14 +72978,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72972,7 +73032,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72983,7 +73043,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72994,23 +73054,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -73026,39 +73086,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -73071,7 +73131,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -73079,7 +73139,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -73090,7 +73150,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -73104,7 +73164,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -73117,12 +73177,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -73133,7 +73193,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -73141,9 +73201,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -73157,8 +73217,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -73166,14 +73225,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -73221,7 +73280,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -73232,7 +73291,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -73243,23 +73302,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -73275,39 +73334,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -73320,7 +73379,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -73328,7 +73387,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -73339,7 +73398,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -73353,7 +73412,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -73366,12 +73425,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -73382,7 +73441,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -73390,9 +73449,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -73407,8 +73466,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -73416,14 +73474,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -74741,11 +74799,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -74999,14 +75059,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -75023,6 +75092,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75035,21 +75105,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -75065,12 +75139,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -75086,6 +75163,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -75099,11 +75177,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -75129,6 +75210,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -76518,7 +76603,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -80045,7 +80130,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -80082,7 +80167,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -80383,7 +80468,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -80689,7 +80774,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -81001,8 +81086,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -81052,8 +81138,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -81139,7 +81227,6 @@ primitiveVMParameter(void) char *sp1; char *sp2; sqInt tagBits; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -81189,6 +81276,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -81198,165 +81286,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -81364,9 +81416,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -81374,22 +81426,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -81397,192 +81449,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -81611,7 +81568,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -81644,14 +81601,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -81727,7 +81687,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -81840,48 +81800,38 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l84; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l84: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -81936,7 +81886,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -81958,12 +81909,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l65; + goto l77; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l65: /* end setCogVMFlags: */; + l77: /* end setCogVMFlags: */; } } if (index == 49) { @@ -82196,8 +82147,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -82205,14 +82155,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -82251,8 +82201,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -82260,14 +82209,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -82299,8 +82248,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -82308,14 +82256,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -82340,6 +82288,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -82387,6 +82336,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/nsspur64src/vm/interp.h b/nsspur64src/vm/interp.h index 3c4cf3606..e34d1b2ec 100644 --- a/nsspur64src/vm/interp.h +++ b/nsspur64src/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 8 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1152921504606846976 #define MaxSmallInteger 1152921504606846975 diff --git a/nsspur64src/vm/vmCallback.h b/nsspur64src/vm/vmCallback.h index 48d07f100..3bf23acc7 100644 --- a/nsspur64src/vm/vmCallback.h +++ b/nsspur64src/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/nsspursrc/vm/cogit.h b/nsspursrc/vm/cogit.h index f6817dadf..20f6166cd 100644 --- a/nsspursrc/vm/cogit.h +++ b/nsspursrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ @@ -146,6 +146,7 @@ VM_EXPORT sqInt traceStores; #define getCFramePointer() CFramePointer #define getCStackPointer() CStackPointer #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define noCheckEntryOffset() cmNoCheckEntryOffset #define noContextSwitchBlockEntryOffset() blockNoContextSwitchOffset #define printOnTrace() (traceFlags & 1) diff --git a/nsspursrc/vm/cogitARMv5.c b/nsspursrc/vm/cogitARMv5.c index 3b201984d..498b45a7a 100644 --- a/nsspursrc/vm/cogitARMv5.c +++ b/nsspursrc/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -253,7 +253,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 80 : 75) +#define NumTrampolines (IMMUTABILITY ? 81 : 76) #define OrCqR 108 #define OrCwR 116 #define OrOpcode 12 @@ -327,10 +327,10 @@ typedef struct _AbstractInstruction { unsigned char maxSize; unsigned char annotation; unsigned char conditionOrNil; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; - usqIntptr_t machineCode [5]; + unsigned int machineCode [5]; } AbstractInstruction; #define CogOutOfLineLiteralsARMCompiler AbstractInstruction @@ -399,10 +399,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -517,7 +519,7 @@ static sqInt NoDbgRegParms ldrhrnrm(AbstractInstruction * self_in_ldrhrnrm, sqIn static sqInt NoDbgRegParms ldrrnplusImm(AbstractInstruction * self_in_ldrrnplusImm, sqInt destReg, sqInt baseReg, sqInt immediate12bitValue); static sqInt NoDbgRegParms ldrrnplusimm(AbstractInstruction * self_in_ldrrnplusimm, sqInt destReg, sqInt baseReg, sqInt u, sqInt immediate12bitValue); static sqInt NoDbgRegParms ldrrnrm(AbstractInstruction * self_in_ldrrnrm, sqInt destReg, sqInt baseReg, sqInt offsetReg); -static sqInt NoDbgRegParms loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg); +static usqInt NoDbgRegParms loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg); static sqInt NoDbgRegParms loadPICLiteralByteSize(AbstractInstruction * self_in_loadPICLiteralByteSize); static sqInt NoDbgRegParms machineCodeBytes(AbstractInstruction * self_in_machineCodeBytes); static sqInt NoDbgRegParms machineCodeWords(AbstractInstruction * self_in_machineCodeWords); @@ -645,7 +647,7 @@ static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -664,7 +666,7 @@ static void NoDbgRegParms genEnilopmartReturn(sqInt forCall); static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointer); static void generateClosedPICPrototype(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateNewspeakRuntime(void); static void generateNewspeakSendTrampolines(void); static void generateOpenPICPrototype(void); @@ -802,7 +804,7 @@ extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToUnpairedMethodList(CogMethod *aCogMethod); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void compactCompiledCode(void); static void NoDbgRegParms ensureInYoungReferrers(CogMethod *cogMethod); @@ -1021,8 +1023,6 @@ static sqInt endSizeOffset(void); static sqInt NoDbgRegParms literalInstructionInRange(AbstractInstruction *litInst); static AbstractInstruction * NoDbgRegParms locateLiteral(sqInt aLiteral); static sqInt NoDbgRegParms mustDumpLiterals(sqInt currentOpcodeIndex); -static sqInt resetForBlockCompile(void); -static sqInt saveForBlockCompile(void); static sqInt compileBlockDispatch(void); static void compileGetErrorCode(void); static sqInt NoDbgRegParms compileInterpreterPrimitive(void (*primitiveRoutine)(void)); @@ -1204,7 +1204,7 @@ static sqInt NoDbgRegParms genStorePopReceiverVariableneedsStoreCheckneedsImmuta static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1233,7 +1233,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1265,7 +1264,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt breakBlock; static sqInt breakMethod; @@ -1304,6 +1302,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1348,6 +1347,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt cPICCaseSize; static sqInt cPICEndOfCodeOffset; @@ -1952,9 +1952,6 @@ void (*realCEEnterCogCodePopReceiverReg)(void); static sqInt receiverTags; static sqInt regArgsHaveBeenPushed; static sqInt runtimeObjectRefIndex; -static sqInt savedFirstOpcodeIndex; -static sqInt savedLastDumpedLiteralIndex; -static sqInt savedNextLiteralIndex; static sqInt selfSendTrampolines[NumSendTrampolines]; static AbstractInstruction * sendMiss; static sqInt simNativeSpillBase; @@ -2009,6 +2006,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -2843,8 +2841,8 @@ static usqInt NoDbgRegParms concretizeCMPSMULL(AbstractInstruction * self_in_concretizeCMPSMULL) { sqInt aWord; - usqIntptr_t hiReg; - usqIntptr_t loReg; + usqInt hiReg; + usqInt loReg; hiReg = ((self_in_concretizeCMPSMULL->operands))[0]; loReg = ((self_in_concretizeCMPSMULL->operands))[1]; @@ -2863,7 +2861,7 @@ concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditi { sqInt aWord; sqInt i; - sqInt instr; + usqInt instr; unsigned char savedCond; assert(((self_in_concretizeConditionalInstruction->conditionOrNil)) != null); @@ -2910,7 +2908,7 @@ static usqInt NoDbgRegParms concretizeMSR(AbstractInstruction * self_in_concretizeMSR) { sqInt aWord; - usqIntptr_t flags; + usqInt flags; flags = ((self_in_concretizeMSR->operands))[0]; /* begin machineCodeAt:put: */ @@ -2940,8 +2938,8 @@ concretizeSMULL(AbstractInstruction * self_in_concretizeSMULL) sqInt aWord; sqInt hiResultReg; sqInt loResultReg; - usqIntptr_t srcA; - usqIntptr_t srcB; + usqInt srcA; + usqInt 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 */ @@ -2994,7 +2992,7 @@ dataOpTyperdrnrmlsr(AbstractInstruction * self_in_dataOpTyperdrnrmlsr, sqInt arm static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - usqIntptr_t addressOperand; + usqInt addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord10; @@ -3123,54 +3121,54 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt aWord7; sqInt aWord8; sqInt aWord9; - usqIntptr_t base; - usqIntptr_t base1; - usqIntptr_t base2; - usqIntptr_t base3; - usqIntptr_t baseReg; - usqIntptr_t baseReg1; - usqIntptr_t baseReg2; - usqIntptr_t constant; - usqIntptr_t constant1; - usqIntptr_t constant10; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; + usqInt baseReg; + usqInt baseReg1; + usqInt baseReg2; + usqInt constant; + usqInt constant1; + usqInt constant10; sqInt 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; + usqInt constant12; + usqInt constant13; + usqInt constant14; + usqInt constant2; + usqInt constant3; + usqInt constant4; + usqInt constant5; + usqInt constant6; + usqInt constant7; + usqInt constant8; + usqInt constant9; AbstractInstruction *dependentChain; - 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; + usqInt dest; + usqInt dest1; + usqInt destAddr; + usqInt destAddr1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg2; + usqInt destReg3; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; sqInt distance; sqInt distance1; sqInt distance2; - usqIntptr_t distReg; - usqIntptr_t distReg1; - usqIntptr_t distReg2; - usqIntptr_t dstReg; - usqIntptr_t dstReg1; + usqInt distReg; + usqInt distReg1; + usqInt distReg2; + usqInt dstReg; + usqInt dstReg1; sqInt flagsOrOpcode; sqInt flagsOrOpcode1; sqInt flagsOrOpcode11; @@ -3179,7 +3177,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt flagsOrOpcode3; sqInt flagsOrOpcode4; sqInt flagsOrOpcode5; - usqIntptr_t fpReg; + usqInt fpReg; sqInt hb; sqInt hb1; sqInt hb11; @@ -3225,10 +3223,10 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt immediate7; sqInt immediate8; sqInt immediate9; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; usqInt instrOffset; usqInt instrOffset1; usqInt instrOffset10; @@ -3246,7 +3244,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) usqInt instrOffset21; usqInt instrOffset22; sqInt instrOffset23; - sqInt instrOffset24; + usqInt instrOffset24; usqInt instrOffset25; usqInt instrOffset26; usqInt instrOffset27; @@ -3317,8 +3315,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget9; sqInt negate; sqInt negate1; - sqIntptr_t offset; - sqIntptr_t offset1; + sqInt offset; + sqInt offset1; sqInt offset10; sqInt offset11; sqInt offset12; @@ -3337,7 +3335,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset24; sqInt offset25; sqInt offset26; - usqIntptr_t offset27; + usqInt offset27; sqInt offset28; sqInt offset29; sqInt offset3; @@ -3352,77 +3350,77 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset8; sqInt offset9; sqInt p; - usqIntptr_t rd; - usqIntptr_t rd1; - usqIntptr_t rd10; - usqIntptr_t rd11; - usqIntptr_t rd110; - usqIntptr_t rd111; - 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 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 rn110; - usqIntptr_t rn111; - 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 rn3; - usqIntptr_t rn4; - usqIntptr_t rn5; - usqIntptr_t rn6; - usqIntptr_t rn7; - usqIntptr_t rn8; - usqIntptr_t rn9; + usqInt rd; + usqInt rd1; + usqInt rd10; + usqInt rd11; + usqInt rd110; + usqInt rd111; + usqInt rd12; + usqInt rd13; + usqInt rd14; + usqInt rd15; + usqInt rd16; + usqInt rd17; + usqInt rd18; + usqInt rd19; + usqInt rd2; + usqInt rd20; + usqInt rd21; + usqInt rd22; + usqInt rd3; + usqInt rd4; + usqInt rd5; + usqInt rd6; + usqInt rd7; + usqInt rd8; + usqInt rd9; + usqInt reg; + usqInt reg1; + usqInt reg2; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt regA; + usqInt regB; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS2; + usqInt regRHS3; + usqInt rn; + usqInt rn1; + usqInt rn10; + usqInt rn11; + usqInt rn110; + usqInt rn111; + usqInt rn12; + usqInt rn13; + usqInt rn14; + usqInt rn15; + usqInt rn16; + usqInt rn17; + usqInt rn18; + usqInt rn19; + usqInt rn2; + usqInt rn20; + usqInt rn21; + usqInt rn22; + usqInt rn23; + usqInt rn24; + usqInt rn3; + usqInt rn4; + usqInt rn5; + usqInt rn6; + usqInt rn7; + usqInt rn8; + usqInt rn9; sqInt rot; sqInt rot1; sqInt rot10; @@ -3437,30 +3435,30 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt rot7; sqInt rot8; sqInt rot9; - 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; + usqInt src; + usqInt src1; + usqInt srcAddr; + usqInt srcAddr1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg3; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; int u; int u1; sqInt u2; @@ -3469,14 +3467,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt u5; sqInt u6; sqInt u7; - sqIntptr_t val; - sqIntptr_t val1; - sqIntptr_t val11; - sqIntptr_t val12; - sqIntptr_t val2; - usqIntptr_t val3; - sqIntptr_t val4; - sqIntptr_t val5; + sqInt val; + sqInt val1; + sqInt val11; + sqInt val12; + sqInt val2; + usqInt val3; + sqInt val4; + sqInt val5; sqInt value; sqInt value1; unsigned int value2; @@ -3486,8 +3484,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) unsigned int value6; sqInt word; sqInt word1; - usqIntptr_t word2; - usqIntptr_t word3; + usqInt word2; + usqInt word3; if (!(((self_in_dispatchConcretize->conditionOrNil)) == null)) { concretizeConditionalInstruction(self_in_dispatchConcretize); @@ -4123,7 +4121,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord111 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(AddOpcode) << 21))) | (1U << 20)))) | ((rn1 << 16) | (rd1 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset2 / 4] = aWord111; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset2 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset2 + 4; goto l143; l136: /* end rotateable8bitSignedImmediate:ifTrue:ifFalse: */; @@ -4211,7 +4209,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i13 = 2; i13 <= 30; i13 += 2) { if ((val11 & (((0xFFU << i13) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i13)))) == val11) { rot11 = 32 - i13; - immediate14 = (((usqInt) val11) >> i13) | ((((sqIntptr_t)((usqInt)(val11) << (32 - i13)))) & 0xFFFFFFFFU); + immediate14 = (((usqInt) val11) >> i13) | ((((sqInt)((usqInt)(val11) << (32 - i13)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord410 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn21 << 16) | (rd18 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot11) >> 1)) << 8))) | immediate14) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord410; @@ -4254,7 +4252,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1110 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn19 << 16) | (rd19 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset26 / 4] = aWord1110; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset26 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset26 + 4; goto l331; l365: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -4337,7 +4335,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1111 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn20 << 16) | (rd20 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset27 / 4] = aWord1111; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset27 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset27 + 4; goto l339; } @@ -4425,7 +4423,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord112 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(CmpOpcode) << 21))) | (1U << 20)))) | ((rn11 << 16) | (rd11 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset3 / 4] = aWord112; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset3 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset3 + 4; goto l151; l144: /* end rotateable8bitSignedImmediate:ifTrue:ifFalse: */; @@ -4454,7 +4452,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i10 = 2; i10 <= 30; i10 += 2) { if ((val4 & (((0xFFU << i10) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i10)))) == val4) { rot10 = 32 - i10; - immediate17 = (((usqInt) val4) >> i10) | ((((sqIntptr_t)((usqInt)(val4) << (32 - i10)))) & 0xFFFFFFFFU); + immediate17 = (((usqInt) val4) >> i10) | ((((sqInt)((usqInt)(val4) << (32 - i10)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord67 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn22 << 16) | (rd21 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot10) >> 1)) << 8))) | immediate17) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord67; @@ -4497,7 +4495,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1112 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn110 << 16) | (rd110 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset28 / 4] = aWord1112; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset28 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset28 + 4; goto l349; l347: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -4576,7 +4574,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord113 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(SubOpcode) << 21))) | (1U << 20)))) | ((rn3 << 16) | (rd3 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset4 / 4] = aWord113; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset4 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset4 + 4; goto l159; l366: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -4628,7 +4626,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord15 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(TstOpcode) << 21))) | (1U << 20)))) | ((rn4 << 16) | (rd4 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset5 / 4] = aWord15; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset5 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset5 + 4; goto l165; l160: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -4716,7 +4714,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i14 = 2; i14 <= 30; i14 += 2) { if ((val12 & (((0xFFU << i14) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i14)))) == val12) { rot13 = 32 - i14; - immediate18 = (((usqInt) val12) >> i14) | ((((sqIntptr_t)((usqInt)(val12) << (32 - i14)))) & 0xFFFFFFFFU); + immediate18 = (((usqInt) val12) >> i14) | ((((sqInt)((usqInt)(val12) << (32 - i14)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord411 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn24 << 16) | (rd22 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot13) >> 1)) << 8))) | immediate18) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord411; @@ -4759,7 +4757,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1113 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn111 << 16) | (rd111 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset29 / 4] = aWord1113; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset29 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset29 + 4; goto l363; l367: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -6618,16 +6616,16 @@ ldrrnrm(AbstractInstruction * self_in_ldrrnrm, sqInt destReg, sqInt baseReg, sqI the size of the instructions generated to do so. */ /* CogARMCompiler>>#loadCwInto: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) { sqInt aWord; sqInt aWord1; - usqIntptr_t distance; + sqInt distance; sqInt i; sqInt immediate; sqInt negate; - usqIntptr_t operand; + usqInt operand; sqInt rot; sqInt value; @@ -6684,7 +6682,7 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) ? 1 : 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))); + return ((self_in_loadCwInto->machineCodeSize) = 4); } @@ -7632,7 +7630,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -8878,7 +8876,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -8936,7 +8934,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -9003,7 +9001,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -9963,7 +9961,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -10049,11 +10047,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { sqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -10255,7 +10253,7 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) /* Cogit>>#findMapLocationForMcpc:inMethod: */ static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -10798,7 +10796,7 @@ generateClosedPICPrototype(void) assert(usesOutOfLineLiteral(anInstruction1)); (anInstruction1->dependent = allocateLiteral(wordConstant1)); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -10816,7 +10814,7 @@ generateClosedPICPrototype(void) operandOne = 3133021973U + h; checkLiteralforInstruction(operandOne, genoperandoperand(opcode, operandOne, TempReg)); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -10863,7 +10861,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -10909,17 +10907,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; - usqIntptr_t delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqIntptr_t location; - usqIntptr_t mapEntry; + usqInt location; + sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -13206,7 +13204,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -14271,7 +14269,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -15236,7 +15234,7 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; @@ -15465,12 +15463,12 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; zoneSize = limitAddress - baseAddress; initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; @@ -18096,6 +18094,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *jumpImm; AbstractInstruction *jumpNotSet; @@ -18124,7 +18123,17 @@ genPrimitiveIdentityHash(void) /* begin Jump: */ genoperand(Jump, ((sqInt)ret)); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } @@ -20453,6 +20462,8 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { zeroOpcodeIndex(); @@ -22481,7 +22492,7 @@ cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize) static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral) { - usqIntptr_t literal; + usqInt literal; AbstractInstruction * literalAsInstruction; literalAsInstruction = ((AbstractInstruction *) (((self_in_concretizeLiteral->operands))[0])); @@ -22728,7 +22739,7 @@ rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, s static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - usqIntptr_t alignment; + usqInt alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -23457,26 +23468,6 @@ mustDumpLiterals(sqInt currentOpcodeIndex) && ((currentOpcodeIndex - firstOpcodeIndex) >= (outOfLineLiteralOpcodeLimit(backEnd()))); } - /* OutOfLineLiteralsManager>>#resetForBlockCompile */ -static sqInt -resetForBlockCompile(void) -{ - firstOpcodeIndex = savedFirstOpcodeIndex; - nextLiteralIndex = savedNextLiteralIndex; - lastDumpedLiteralIndex = savedLastDumpedLiteralIndex; - return 0; -} - - /* OutOfLineLiteralsManager>>#saveForBlockCompile */ -static sqInt -saveForBlockCompile(void) -{ - savedFirstOpcodeIndex = firstOpcodeIndex; - savedNextLiteralIndex = nextLiteralIndex; - savedLastDumpedLiteralIndex = lastDumpedLiteralIndex; - return 0; -} - /* Compile the jump instruction(s) at the end of the method that dispatch to each block body. @@ -25414,7 +25405,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -25678,7 +25669,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -25700,7 +25691,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1)); introspectionDataIndex += 2; } return 0; @@ -25958,7 +25949,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -26504,7 +26495,10 @@ compileBlockBodies(void) sqInt initialOpcodeIndex; sqInt initialStackPtr; sqInt result; + sqInt savedFirstOpcodeIndex; + sqInt savedLastDumpedLiteralIndex; sqInt savedNeedsFrame; + sqInt savedNextLiteralIndex; sqInt savedNumArgs; sqInt savedNumTemps; @@ -26516,7 +26510,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -26525,7 +26519,10 @@ compileBlockBodies(void) /* for SistaCogit */ initialCounterIndex = 0; - saveForBlockCompile(); + /* begin saveForRecompile */ + savedFirstOpcodeIndex = firstOpcodeIndex; + savedNextLiteralIndex = nextLiteralIndex; + savedLastDumpedLiteralIndex = lastDumpedLiteralIndex; initialIndexOfIRC = indexOfIRC; while (1) { @@ -26538,15 +26535,18 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); bzero(abstractOpcodes + initialOpcodeIndex, (opcodeIndex - initialOpcodeIndex) * sizeof(AbstractInstruction)); opcodeIndex = initialOpcodeIndex; - resetForBlockCompile(); + /* begin resetForRecompile */ + firstOpcodeIndex = savedFirstOpcodeIndex; + nextLiteralIndex = savedNextLiteralIndex; + lastDumpedLiteralIndex = savedLastDumpedLiteralIndex; indexOfIRC = initialIndexOfIRC; } @@ -26756,7 +26756,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -27965,7 +27969,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -28222,7 +28227,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -28263,7 +28269,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc = ssTop(); ssPop(1); if ((((desc->type)) == SSConstant) @@ -28340,7 +28347,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -28808,7 +28816,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -29074,7 +29083,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -29283,7 +29293,8 @@ genSpecialSelectorComparison(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -29486,7 +29497,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -29560,7 +29572,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); if (usesOutOfLineLiteral(anInstruction1)) { @@ -29600,7 +29613,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -29748,19 +29762,18 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; - return fixup; -} + } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ static void NoDbgRegParms @@ -29933,7 +29946,8 @@ marshallAbsentReceiverSendArguments(sqInt numArgs) ssAllocateCallReg(ReceiverResultReg); /* begin putSelfInReceiverResultReg */ storeToReg((&simSelf), ReceiverResultReg); - ssFlushTo(simStackPtr - numArgs); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - numArgs, simNativeStackPtr); if (numArgs > 2) { /* The arguments must be pushed to the stack, and hence the receiver @@ -29970,7 +29984,8 @@ marshallAbsentReceiverSendArguments(sqInt numArgs) /* begin PushR: */ genoperand(PushR, ReceiverResultReg); } - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { if (numArgs > 0) { @@ -30008,7 +30023,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -30018,7 +30034,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -30026,7 +30043,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -30065,7 +30083,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -30130,7 +30148,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -30271,8 +30290,7 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); if ((isBranch(descriptor)) @@ -30602,13 +30620,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1U << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -30650,7 +30661,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -30674,7 +30686,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -30994,6 +31007,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/nsspursrc/vm/cogitIA32.c b/nsspursrc/vm/cogitIA32.c index 8b99296cc..41451f29b 100644 --- a/nsspursrc/vm/cogitIA32.c +++ b/nsspursrc/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -270,7 +270,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 80 : 75) +#define NumTrampolines (IMMUTABILITY ? 81 : 76) #define OrCqR 108 #define OrCwR 116 #define OrRR 102 @@ -344,8 +344,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; unsigned char machineCode [10]; } AbstractInstruction; @@ -415,10 +415,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -536,7 +538,7 @@ static AbstractInstruction * NoDbgRegParms padIfPossibleWithStopsFromto(Abstract static AbstractInstruction * NoDbgRegParms relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeReturnPCby, sqInt retpc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta); static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); -static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress); +static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr); static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms rewriteJumpLongAttarget(AbstractInstruction * self_in_rewriteJumpLongAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -634,7 +636,7 @@ static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static usqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -653,7 +655,7 @@ static void NoDbgRegParms genEnilopmartReturn(sqInt forCall); static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointer); static void generateClosedPICPrototype(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateNewspeakRuntime(void); static void generateNewspeakSendTrampolines(void); static void generateOpenPICPrototype(void); @@ -790,7 +792,7 @@ extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToUnpairedMethodList(CogMethod *aCogMethod); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void compactCompiledCode(void); static void NoDbgRegParms ensureInYoungReferrers(CogMethod *cogMethod); @@ -1166,7 +1168,7 @@ static sqInt NoDbgRegParms genStorePopReceiverVariableneedsStoreCheckneedsImmuta static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1195,7 +1197,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1227,7 +1228,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt breakBlock; static sqInt breakMethod; @@ -1266,6 +1266,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1310,6 +1311,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt cPICCaseSize; static sqInt cPICEndOfCodeOffset; @@ -1965,6 +1967,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -2708,7 +2711,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - usqIntptr_t shiftCountReg; + usqInt shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == ECX @@ -2736,8 +2739,8 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -2750,8 +2753,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x86opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -2768,8 +2771,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeZeroExtend16RR(AbstractInstruction * self_in_concretizeZeroExtend16RR) { - usqIntptr_t destReg; - usqIntptr_t srcReg; + usqInt destReg; + usqInt srcReg; srcReg = ((self_in_concretizeZeroExtend16RR->operands))[0]; destReg = ((self_in_concretizeZeroExtend16RR->operands))[1]; @@ -2813,50 +2816,50 @@ cResultRegisterLow(AbstractInstruction * self_in_cResultRegisterLow) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt addressOperand2; + usqInt addressOperand3; + usqInt addressOperand4; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; AbstractInstruction *dependentChain; - 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 destReg16; - usqIntptr_t destReg17; - usqIntptr_t destReg18; - usqIntptr_t destReg19; - usqIntptr_t destReg2; - usqIntptr_t destReg20; - usqIntptr_t destReg21; - usqIntptr_t destReg22; - usqIntptr_t destReg23; - usqIntptr_t destReg24; - usqIntptr_t destReg3; - usqIntptr_t destReg4; - usqIntptr_t destReg5; - usqIntptr_t destReg6; - usqIntptr_t destReg7; - usqIntptr_t destReg8; - usqIntptr_t destReg9; + usqInt dest; + usqInt dest1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg13; + usqInt destReg14; + usqInt destReg15; + usqInt destReg16; + usqInt destReg17; + usqInt destReg18; + usqInt destReg19; + usqInt destReg2; + usqInt destReg20; + usqInt destReg21; + usqInt destReg22; + usqInt destReg23; + usqInt destReg24; + usqInt destReg3; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; sqInt distance; sqInt distance1; sqInt i; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -2923,14 +2926,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget7; AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; - usqIntptr_t mask; - usqIntptr_t mask1; - usqIntptr_t mask2; + usqInt mask; + usqInt mask1; + usqInt mask2; sqInt mcIdx; sqInt offset; sqInt offset1; - usqIntptr_t offset10; - usqIntptr_t offset11; + usqInt offset10; + usqInt offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -2941,14 +2944,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - usqIntptr_t offset12; + usqInt offset12; sqInt offset120; sqInt offset121; sqInt offset122; sqInt offset123; - usqIntptr_t offset13; - usqIntptr_t offset14; - usqIntptr_t offset15; + usqInt offset13; + usqInt offset14; + usqInt offset15; sqInt offset16; sqInt offset17; sqInt offset18; @@ -2964,117 +2967,117 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - usqIntptr_t offset3; + usqInt offset3; sqInt offset30; sqInt offset31; sqInt offset32; sqInt offset33; - 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; + usqInt offset4; + usqInt offset5; + usqInt offset6; + usqInt offset7; + usqInt offset8; + usqInt offset9; + usqInt reg; + usqInt reg1; + usqInt reg10; + usqInt reg11; + usqInt reg12; + usqInt reg13; + usqInt reg14; + usqInt reg15; + usqInt reg16; + usqInt reg17; + usqInt reg18; + usqInt reg19; + usqInt reg2; + usqInt reg20; + usqInt reg21; + usqInt reg22; + usqInt reg23; + usqInt reg24; + usqInt reg25; + usqInt reg26; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt reg8; + usqInt reg9; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS10; + usqInt regLHS11; + usqInt regLHS12; + usqInt regLHS13; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regLHS5; + usqInt regLHS6; + usqInt regLHS7; + usqInt regLHS8; + usqInt regLHS9; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS10; + usqInt regRHS11; + usqInt regRHS12; + usqInt regRHS13; + usqInt regRHS2; + usqInt regRHS3; + usqInt regRHS4; + usqInt regRHS5; + usqInt regRHS6; + usqInt regRHS7; + usqInt regRHS8; + usqInt regRHS9; + usqInt regToShift; + usqInt regToShift1; sqInt shiftCount; - 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 srcReg14; - usqIntptr_t srcReg15; - usqIntptr_t srcReg16; - usqIntptr_t srcReg17; - usqIntptr_t srcReg18; - usqIntptr_t srcReg19; - usqIntptr_t srcReg2; - usqIntptr_t srcReg20; - usqIntptr_t srcReg21; - usqIntptr_t srcReg22; - usqIntptr_t srcReg3; - usqIntptr_t srcReg4; - usqIntptr_t srcReg5; - usqIntptr_t srcReg6; - usqIntptr_t srcReg7; - usqIntptr_t srcReg8; - usqIntptr_t srcReg9; + usqInt shiftCountReg; + usqInt shiftCountReg1; + usqInt src; + usqInt src1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg20; + usqInt srcReg21; + usqInt srcReg22; + usqInt srcReg3; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; sqInt swapreg; - 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; + usqInt value; + usqInt value1; + usqInt value10; + usqInt value11; + usqInt value12; + usqInt value13; + usqInt value2; + usqInt value3; + usqInt value4; + usqInt value5; + usqInt value6; + usqInt value7; + usqInt value8; + usqInt value9; usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { @@ -5515,25 +5518,25 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt destReg; + usqInt destReg1; + usqInt destReg2; + usqInt destReg3; + usqInt offset; + usqInt offset1; + usqInt offset2; + usqInt offset3; + usqInt reg; + usqInt reg1; + usqInt reg11; + usqInt reg2; + usqInt reg21; + usqInt reg3; + usqInt regDivisor; + usqInt srcReg; + usqInt srcReg1; sqInt srcReg2; sqInt srcReg3; @@ -6964,15 +6967,15 @@ rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt ca /* prevent type inference for avoiding warning on abs */ /* CogIA32Compiler>>#rewriteCPICJumpAt:target: */ -static sqInt NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +static AbstractInstruction * NoDbgRegParms +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { sqInt callDistance; - callDistance = jumpTargetAddress - addressFollowingJump; + callDistance = jumpTargetAddr - addressFollowingJump; assert((SQABS(callDistance)) < 128); byteAtput(addressFollowingJump - 1, callDistance & 0xFF); - return 2; + return self_in_rewriteCPICJumpAttarget; } @@ -7151,9 +7154,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - usqIntptr_t alignment; - usqIntptr_t maximumSpan; - usqIntptr_t target; + usqInt alignment; + sqInt maximumSpan; + usqInt target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -7588,7 +7591,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -8811,7 +8814,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -8869,7 +8872,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -8936,7 +8939,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -9849,7 +9852,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -9935,11 +9938,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { sqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -10140,8 +10143,8 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) } /* Cogit>>#findMapLocationForMcpc:inMethod: */ -static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +static usqInt NoDbgRegParms +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -10653,7 +10656,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -10670,7 +10673,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, operandOne, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -10716,7 +10719,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -10762,17 +10765,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; - usqIntptr_t delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqIntptr_t location; - usqIntptr_t mapEntry; + usqInt location; + sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -13033,7 +13036,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -14108,7 +14111,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -15059,7 +15062,7 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; @@ -15288,12 +15291,12 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; zoneSize = limitAddress - baseAddress; initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; @@ -17705,6 +17708,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *jumpImm; AbstractInstruction *jumpNotSet; @@ -17730,7 +17734,17 @@ genPrimitiveIdentityHash(void) /* begin Jump: */ genoperand(Jump, ((sqInt)ret)); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } @@ -19703,6 +19717,8 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { zeroOpcodeIndex(); @@ -23573,7 +23589,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -23833,7 +23849,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -23855,7 +23871,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1)); introspectionDataIndex += 2; } return 0; @@ -24113,7 +24129,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -24666,7 +24682,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -24687,8 +24703,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -24896,7 +24912,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -26077,7 +26097,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -26311,7 +26332,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -26352,7 +26374,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc = ssTop(); ssPop(1); if ((((desc->type)) == SSConstant) @@ -26423,7 +26446,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -26848,7 +26872,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -27115,7 +27140,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -27304,7 +27330,8 @@ genSpecialSelectorComparison(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -27498,7 +27525,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -27569,7 +27597,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -27606,7 +27635,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -27745,19 +27775,18 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; - return fixup; -} + } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ static void NoDbgRegParms @@ -27933,7 +27962,8 @@ marshallAbsentReceiverSendArguments(sqInt numArgs) ssAllocateCallReg(ReceiverResultReg); /* begin putSelfInReceiverResultReg */ storeToReg((&simSelf), ReceiverResultReg); - ssFlushTo(simStackPtr - numArgs); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - numArgs, simNativeStackPtr); if (numArgs > 2) { /* The arguments must be pushed to the stack, and hence the receiver @@ -27961,7 +27991,8 @@ marshallAbsentReceiverSendArguments(sqInt numArgs) /* begin PushR: */ genoperand(PushR, ReceiverResultReg); } - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { if (numArgs > 0) { @@ -27999,7 +28030,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -28009,7 +28041,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -28017,7 +28050,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -28056,7 +28090,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -28121,7 +28155,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -28262,8 +28297,7 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); if ((isBranch(descriptor)) @@ -28593,13 +28627,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1U << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -28641,7 +28668,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -28665,7 +28693,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -28985,6 +29014,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/nsspursrc/vm/cogitMIPSEL.c b/nsspursrc/vm/cogitMIPSEL.c index 3f22ca6ef..1dbe22c62 100644 --- a/nsspursrc/vm/cogitMIPSEL.c +++ b/nsspursrc/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -279,7 +279,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 80 : 75) +#define NumTrampolines (IMMUTABILITY ? 81 : 76) #define OneInstruction 4 #define OR 37 #define ORI 13 @@ -373,10 +373,10 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; - usqIntptr_t machineCode [7]; + unsigned int machineCode [7]; } AbstractInstruction; #define CogMIPSELCompiler AbstractInstruction @@ -444,10 +444,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -576,7 +578,7 @@ static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static usqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -595,7 +597,7 @@ static void NoDbgRegParms genEnilopmartReturn(sqInt forCall); static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointer); static void generateClosedPICPrototype(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateNewspeakRuntime(void); static void generateNewspeakSendTrampolines(void); static void generateOpenPICPrototype(void); @@ -648,7 +650,7 @@ static BytecodeDescriptor * loadBytesAndGetDescriptor(void); static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc); static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); -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); @@ -731,7 +733,7 @@ extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToUnpairedMethodList(CogMethod *aCogMethod); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void compactCompiledCode(void); static void NoDbgRegParms ensureInYoungReferrers(CogMethod *cogMethod); @@ -919,7 +921,7 @@ static sqInt NoDbgRegParms lhRbaseoffset(AbstractInstruction * self_in_lhRbaseof static sqInt NoDbgRegParms lhuRbaseoffset(AbstractInstruction * self_in_lhuRbaseoffset, sqInt destReg, sqInt baseReg, sqInt offset); static usqInt NoDbgRegParms literalAtAddress(AbstractInstruction * self_in_literalAtAddress, sqInt mcpc); static sqInt NoDbgRegParms literalAtAddressput(AbstractInstruction * self_in_literalAtAddressput, sqInt mcpc, sqInt newLiteral); -static sqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); +static usqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); static sqInt NoDbgRegParms loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize); static sqInt NoDbgRegParms loadPICLiteralByteSize(AbstractInstruction * self_in_loadPICLiteralByteSize); static usqInt NoDbgRegParms low16BitsOf(AbstractInstruction * self_in_low16BitsOf, usqInt word); @@ -948,7 +950,7 @@ static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFoll static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta); static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteConditionalJumpLongAttarget(AbstractInstruction * self_in_rewriteConditionalJumpLongAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); -static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress); +static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr); static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, usqInt callSiteReturnAddress); static AbstractInstruction * NoDbgRegParms rewriteITypeBranchAtAddresstarget(AbstractInstruction * self_in_rewriteITypeBranchAtAddresstarget, sqInt mcpc, sqInt newTarget); @@ -1310,7 +1312,7 @@ static sqInt NoDbgRegParms genStorePopReceiverVariableneedsStoreCheckneedsImmuta static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1339,7 +1341,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1371,7 +1372,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt breakBlock; static sqInt breakMethod; @@ -1410,6 +1410,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1454,6 +1455,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt cPICCaseSize; static sqInt cPICEndOfCodeOffset; @@ -2105,6 +2107,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -2726,7 +2729,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -3235,7 +3238,7 @@ checkIfValidOopRefAndTargetpccogMethod(sqInt annotation, char *mcpc, sqInt cogMe usqInt entryPoint1; usqInt entryPoint2; sqInt entryPt; - sqInt literal; + usqInt literal; char *mcpc1; NSSendCache *nsSendCache; CogMethod * nsTargetMethod; @@ -3378,7 +3381,7 @@ checkIfValidOopRefpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod) sqInt enclosingObject; usqInt entryPoint; usqInt entryPoint1; - sqInt literal; + usqInt literal; char *mcpc1; NSSendCache *nsSendCache; sqInt off; @@ -3641,7 +3644,7 @@ static sqInt NoDbgRegParms closedPICRefersToUnmarkedObject(CogMethod *cPIC) { sqInt i; - sqInt object; + usqInt object; sqInt pc; if (!((isImmediate((cPIC->selector))) @@ -3949,7 +3952,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -4007,7 +4010,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -4074,7 +4077,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -4779,7 +4782,7 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, static sqInt NoDbgRegParms cPICCompactAndIsNowEmpty(CogMethod *cPIC) { - sqInt entryPoint; + usqInt entryPoint; sqInt followingAddress; sqInt i; sqInt methods[MaxCPICCases]; @@ -4855,7 +4858,7 @@ cPICCompactAndIsNowEmpty(CogMethod *cPIC) static sqInt NoDbgRegParms cPICHasForwardedClass(CogMethod *cPIC) { - sqInt classIndex; + usqInt classIndex; sqInt i; sqInt pc; @@ -4992,7 +4995,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -5077,13 +5080,13 @@ entryPointTagIsSelector(sqInt entryPoint) static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { - sqInt classTag; - usqInt classTagPC; + usqInt classTag; + sqInt classTagPC; usqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; - sqInt object; + sqInt methodObjPC; + usqInt object; usqInt pc; errors = 0; @@ -5281,8 +5284,8 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) } /* Cogit>>#findMapLocationForMcpc:inMethod: */ -static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +static usqInt NoDbgRegParms +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -5470,7 +5473,7 @@ followForwardedMethods(void) static sqInt NoDbgRegParms followMaybeObjRefInClosedPICAt(sqInt mcpc) { - sqInt object; + usqInt object; sqInt subject; object = literalBeforeFollowingAddress(backEnd, mcpc); @@ -5813,7 +5816,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -5830,7 +5833,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, operandOne, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -5876,7 +5879,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -5922,17 +5925,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; + usqInt location; sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -6628,7 +6631,7 @@ static sqInt NoDbgRegParms incrementUsageOfTargetIfLinkedSendmcpcignored(sqInt annotation, char *mcpc, sqInt superfluity) { usqInt cacheAddress; - sqInt entryPoint; + usqInt entryPoint; usqInt entryPoint1; char *mcpc1; NSSendCache *nsSendCache; @@ -7104,7 +7107,7 @@ gMoveCwR(sqInt wordConstant, sqInt reg) /* 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; @@ -7197,7 +7200,7 @@ static void mapObjectReferencesInGeneratedRuntime(void) { sqInt i; - sqInt literal; + usqInt literal; sqInt mappedLiteral; usqInt mcpc; @@ -7667,7 +7670,7 @@ static void markAndTraceObjectReferencesInGeneratedRuntime(void) { sqInt i; - sqInt literal; + usqInt literal; usqInt mcpc; for (i = 0; i < runtimeObjectRefIndex; i += 1) { @@ -7816,7 +7819,7 @@ markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt usqInt entryPoint1; usqInt entryPoint2; sqInt eo; - sqInt literal; + usqInt literal; char *mcpc1; NSSendCache *nsSendCache; sqInt sel; @@ -7959,7 +7962,7 @@ markLiteralspcmethod(sqInt annotation, char *mcpc, sqInt cogMethod) usqInt entryPoint1; usqInt entryPoint2; sqInt eo; - sqInt literal; + usqInt literal; char *mcpc1; NSSendCache *nsSendCache; sqInt sel; @@ -8157,7 +8160,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -8871,7 +8874,7 @@ relocateIfCallOrMethodReferencemcpcdelta(sqInt annotation, char *mcpc, sqInt ref { usqInt cacheAddress; sqInt callDelta; - sqInt entryPoint; + usqInt entryPoint; usqInt entryPoint1; char *mcpc1; NSSendCache *nsSendCache; @@ -8985,7 +8988,7 @@ remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr) usqInt entryPoint1; usqInt entryPoint2; sqInt ignored; - sqInt literal; + usqInt literal; sqInt mappedCacheTag; sqInt mappedLiteral; sqInt mappedOop; @@ -9118,7 +9121,7 @@ remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr) static sqInt NoDbgRegParms remapMaybeObjRefInClosedPICAt(sqInt mcpc) { - sqInt object; + usqInt object; sqInt subject; object = literalBeforeFollowingAddress(backEnd, mcpc); @@ -9220,7 +9223,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -9390,7 +9393,7 @@ static sqInt NoDbgRegParms unlinkIfFreeOrLinkedSendpcof(sqInt annotation, char *mcpc, sqInt theSelector) { usqInt cacheAddress; - sqInt entryPoint; + usqInt entryPoint; usqInt entryPoint1; char *mcpc1; NSSendCache *nsSendCache; @@ -10171,7 +10174,7 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; @@ -10400,12 +10403,12 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; zoneSize = limitAddress - baseAddress; initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; @@ -11261,8 +11264,8 @@ concretizeAddCheckOverflowCqR(AbstractInstruction * self_in_concretizeAddCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAddCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCheckOverflowCqR->operands))[1]); @@ -11300,8 +11303,8 @@ concretizeAddCheckOverflowRR(AbstractInstruction * self_in_concretizeAddCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeAddCheckOverflowRR->operands))[0]; @@ -11331,8 +11334,8 @@ concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAddCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCqR->operands))[1]); @@ -11353,8 +11356,8 @@ concretizeAddCwR(AbstractInstruction * self_in_concretizeAddCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAddCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCwR->operands))[1]); @@ -11376,8 +11379,8 @@ concretizeAddRR(AbstractInstruction * self_in_concretizeAddRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeAddRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddRR->operands))[1]); @@ -11407,8 +11410,8 @@ concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAndCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCqR->operands))[1]); @@ -11428,9 +11431,9 @@ concretizeAndCqRR(AbstractInstruction * self_in_concretizeAndCqRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t dstReg; - usqIntptr_t srcReg; - usqIntptr_t value; + usqInt dstReg; + usqInt srcReg; + usqInt value; value = ((self_in_concretizeAndCqRR->operands))[0]; srcReg = ((self_in_concretizeAndCqRR->operands))[1]; @@ -11455,8 +11458,8 @@ concretizeAndCwR(AbstractInstruction * self_in_concretizeAndCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAndCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCwR->operands))[1]); @@ -11478,8 +11481,8 @@ concretizeAndRR(AbstractInstruction * self_in_concretizeAndRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeAndRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndRR->operands))[1]); @@ -11495,7 +11498,7 @@ concretizeArithmeticShiftRightCqR(AbstractInstruction * self_in_concretizeArithm { sqInt aWord; sqInt distance; - usqIntptr_t reg; + usqInt reg; distance = (((((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeArithmeticShiftRightCqR->operands))[1]; @@ -11510,8 +11513,8 @@ static usqInt NoDbgRegParms concretizeArithmeticShiftRightRR(AbstractInstruction * self_in_concretizeArithmeticShiftRightRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t distReg; + usqInt destReg; + usqInt distReg; distReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[0]; destReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[1]; @@ -11546,9 +11549,9 @@ concretizeBrEqualRR(AbstractInstruction * self_in_concretizeBrEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrEqualRR->operands))[0])); @@ -11579,8 +11582,8 @@ concretizeBrLongEqualRR(AbstractInstruction * self_in_concretizeBrLongEqualRR) AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongEqualRR->operands))[0])); @@ -11616,8 +11619,8 @@ concretizeBrLongNotEqualRR(AbstractInstruction * self_in_concretizeBrLongNotEqua AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongNotEqualRR->operands))[0])); @@ -11651,9 +11654,9 @@ concretizeBrNotEqualRR(AbstractInstruction * self_in_concretizeBrNotEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrNotEqualRR->operands))[0])); @@ -11683,9 +11686,9 @@ concretizeBrSignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrSigne sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterEqualRR->operands))[0])); @@ -11720,9 +11723,9 @@ concretizeBrSignedGreaterRR(AbstractInstruction * self_in_concretizeBrSignedGrea sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterRR->operands))[0])); @@ -11757,9 +11760,9 @@ concretizeBrSignedLessEqualRR(AbstractInstruction * self_in_concretizeBrSignedLe sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessEqualRR->operands))[0])); @@ -11794,9 +11797,9 @@ concretizeBrSignedLessRR(AbstractInstruction * self_in_concretizeBrSignedLessRR) sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessRR->operands))[0])); @@ -11831,9 +11834,9 @@ concretizeBrUnsignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrUns sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterEqualRR->operands))[0])); @@ -11868,9 +11871,9 @@ concretizeBrUnsignedGreaterRR(AbstractInstruction * self_in_concretizeBrUnsigned sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterRR->operands))[0])); @@ -11905,9 +11908,9 @@ concretizeBrUnsignedLessEqualRR(AbstractInstruction * self_in_concretizeBrUnsign sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessEqualRR->operands))[0])); @@ -11942,9 +11945,9 @@ concretizeBrUnsignedLessRR(AbstractInstruction * self_in_concretizeBrUnsignedLes sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessRR->operands))[0])); @@ -12050,8 +12053,8 @@ static usqInt NoDbgRegParms concretizeDivRR(AbstractInstruction * self_in_concretizeDivRR) { sqInt aWord; - usqIntptr_t dividendReg; - usqIntptr_t divisorReg; + usqInt dividendReg; + usqInt divisorReg; dividendReg = ((self_in_concretizeDivRR->operands))[0]; divisorReg = ((self_in_concretizeDivRR->operands))[1]; @@ -12200,7 +12203,7 @@ static usqInt NoDbgRegParms concretizeJumpR(AbstractInstruction * self_in_concretizeJumpR) { sqInt aWord; - usqIntptr_t reg; + usqInt reg; flag("OABI"); reg = ((self_in_concretizeJumpR->operands))[0]; @@ -12301,8 +12304,8 @@ concretizeLoadEffectiveAddressMwrR(AbstractInstruction * self_in_concretizeLoadE sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t baseReg; - usqIntptr_t destReg; + usqInt baseReg; + usqInt destReg; sqInt offset; offset = ((self_in_concretizeLoadEffectiveAddressMwrR->operands))[0]; @@ -12332,7 +12335,7 @@ concretizeLogicalShiftLeftCqR(AbstractInstruction * self_in_concretizeLogicalShi { sqInt aWord; sqInt distance; - usqIntptr_t reg; + usqInt reg; distance = (((((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftLeftCqR->operands))[1]; @@ -12347,8 +12350,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftLeftRR(AbstractInstruction * self_in_concretizeLogicalShiftLeftRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t distReg; + usqInt destReg; + usqInt distReg; distReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[1]; @@ -12364,7 +12367,7 @@ concretizeLogicalShiftRightCqR(AbstractInstruction * self_in_concretizeLogicalSh { sqInt aWord; sqInt distance; - usqIntptr_t reg; + usqInt reg; distance = (((((self_in_concretizeLogicalShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftRightCqR->operands))[1]; @@ -12379,8 +12382,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftRightRR(AbstractInstruction * self_in_concretizeLogicalShiftRightRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t distReg; + usqInt destReg; + usqInt distReg; distReg = ((self_in_concretizeLogicalShiftRightRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftRightRR->operands))[1]; @@ -12398,8 +12401,8 @@ concretizeMoveAbR(AbstractInstruction * self_in_concretizeMoveAbR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destReg; - usqIntptr_t srcAddr; + usqInt destReg; + usqInt srcAddr; srcAddr = ((self_in_concretizeMoveAbR->operands))[0]; destReg = ((self_in_concretizeMoveAbR->operands))[1]; @@ -12431,8 +12434,8 @@ concretizeMoveAwR(AbstractInstruction * self_in_concretizeMoveAwR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destReg; - usqIntptr_t srcAddr; + usqInt destReg; + usqInt srcAddr; srcAddr = ((self_in_concretizeMoveAwR->operands))[0]; destReg = ((self_in_concretizeMoveAwR->operands))[1]; @@ -12461,7 +12464,7 @@ static usqInt NoDbgRegParms concretizeMoveCqR(AbstractInstruction * self_in_concretizeMoveCqR) { sqInt aWord; - usqIntptr_t reg; + usqInt reg; sqInt word; word = ((self_in_concretizeMoveCqR->operands))[0]; @@ -12481,7 +12484,7 @@ concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { sqInt aWord; sqInt aWord1; - usqIntptr_t reg; + usqInt reg; sqInt word; word = ((self_in_concretizeMoveCwR->operands))[0]; @@ -12500,7 +12503,7 @@ static usqInt NoDbgRegParms concretizeMoveHighR(AbstractInstruction * self_in_concretizeMoveHighR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; destReg = ((self_in_concretizeMoveHighR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12514,7 +12517,7 @@ static usqInt NoDbgRegParms concretizeMoveLowR(AbstractInstruction * self_in_concretizeMoveLowR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; destReg = ((self_in_concretizeMoveLowR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12528,9 +12531,9 @@ static usqInt NoDbgRegParms concretizeMoveM16rR(AbstractInstruction * self_in_concretizeMoveM16rR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; offset = ((self_in_concretizeMoveM16rR->operands))[0]; srcReg = ((self_in_concretizeMoveM16rR->operands))[1]; @@ -12546,9 +12549,9 @@ static usqInt NoDbgRegParms concretizeMoveMbrR(AbstractInstruction * self_in_concretizeMoveMbrR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; offset = ((self_in_concretizeMoveMbrR->operands))[0]; srcReg = ((self_in_concretizeMoveMbrR->operands))[1]; @@ -12568,8 +12571,8 @@ concretizeMoveMwrR(AbstractInstruction * self_in_concretizeMoveMwrR) sqInt aWord2; sqInt aWord3; sqInt aWord4; - usqIntptr_t baseReg; - usqIntptr_t destReg; + usqInt baseReg; + usqInt destReg; sqInt offset; offset = ((self_in_concretizeMoveMwrR->operands))[0]; @@ -12604,8 +12607,8 @@ concretizeMoveRAb(AbstractInstruction * self_in_concretizeMoveRAb) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destAddr; - usqIntptr_t srcReg; + usqInt destAddr; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRAb->operands))[0]; destAddr = ((self_in_concretizeMoveRAb->operands))[1]; @@ -12637,8 +12640,8 @@ concretizeMoveRAw(AbstractInstruction * self_in_concretizeMoveRAw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destAddr; - usqIntptr_t srcReg; + usqInt destAddr; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRAw->operands))[0]; destAddr = ((self_in_concretizeMoveRAw->operands))[1]; @@ -12667,9 +12670,9 @@ static usqInt NoDbgRegParms concretizeMoveRM16r(AbstractInstruction * self_in_concretizeMoveRM16r) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRM16r->operands))[0]; offset = ((self_in_concretizeMoveRM16r->operands))[1]; @@ -12685,9 +12688,9 @@ static usqInt NoDbgRegParms concretizeMoveRMbr(AbstractInstruction * self_in_concretizeMoveRMbr) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRMbr->operands))[0]; offset = ((self_in_concretizeMoveRMbr->operands))[1]; @@ -12703,9 +12706,9 @@ static usqInt NoDbgRegParms concretizeMoveRMwr(AbstractInstruction * self_in_concretizeMoveRMwr) { sqInt aWord; - usqIntptr_t baseReg; + usqInt baseReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRMwr->operands))[0]; offset = ((self_in_concretizeMoveRMwr->operands))[1]; @@ -12721,8 +12724,8 @@ static usqInt NoDbgRegParms concretizeMoveRR(AbstractInstruction * self_in_concretizeMoveRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t srcReg; + usqInt destReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRR->operands))[0]; destReg = ((self_in_concretizeMoveRR->operands))[1]; @@ -12738,9 +12741,9 @@ concretizeMoveRXbrR(AbstractInstruction * self_in_concretizeMoveRXbrR) { sqInt aWord; sqInt aWord1; - usqIntptr_t baseReg; - usqIntptr_t indexReg; - usqIntptr_t srcReg; + usqInt baseReg; + usqInt indexReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRXbrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXbrR->operands))[1]; @@ -12761,9 +12764,9 @@ concretizeMoveRXwrR(AbstractInstruction * self_in_concretizeMoveRXwrR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t baseReg; - usqIntptr_t indexReg; - usqIntptr_t srcReg; + usqInt baseReg; + usqInt indexReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRXwrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXwrR->operands))[1]; @@ -12786,9 +12789,9 @@ concretizeMoveXbrRR(AbstractInstruction * self_in_concretizeMoveXbrRR) { sqInt aWord; sqInt aWord1; - usqIntptr_t baseReg; - usqIntptr_t destReg; - usqIntptr_t indexReg; + usqInt baseReg; + usqInt destReg; + usqInt indexReg; /* index is number of *bytes* */ @@ -12811,9 +12814,9 @@ concretizeMoveXwrRR(AbstractInstruction * self_in_concretizeMoveXwrRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t baseReg; - usqIntptr_t destReg; - usqIntptr_t indexReg; + usqInt baseReg; + usqInt destReg; + usqInt indexReg; indexReg = ((self_in_concretizeMoveXwrRR->operands))[0]; baseReg = ((self_in_concretizeMoveXwrRR->operands))[1]; @@ -12839,8 +12842,8 @@ concretizeMulCheckOverflowRR(AbstractInstruction * self_in_concretizeMulCheckOve sqInt aWord2; sqInt aWord3; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeMulCheckOverflowRR->operands))[0]; @@ -12866,7 +12869,7 @@ static usqInt NoDbgRegParms concretizeNegateR(AbstractInstruction * self_in_concretizeNegateR) { sqInt aWord; - usqIntptr_t reg; + usqInt reg; reg = ((self_in_concretizeNegateR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12890,8 +12893,8 @@ concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeOrCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCqR->operands))[1]); @@ -12912,8 +12915,8 @@ concretizeOrCwR(AbstractInstruction * self_in_concretizeOrCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeOrCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCwR->operands))[1]); @@ -12935,8 +12938,8 @@ concretizeOrRR(AbstractInstruction * self_in_concretizeOrRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeOrRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrRR->operands))[1]); @@ -12952,7 +12955,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) { sqInt aWord; sqInt aWord1; - usqIntptr_t destReg; + usqInt destReg; destReg = ((self_in_concretizePopR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12968,7 +12971,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - usqIntptr_t addressOperand; + usqInt addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord2; @@ -13001,7 +13004,7 @@ concretizePushCw(AbstractInstruction * self_in_concretizePushCw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t value; + usqInt value; value = ((self_in_concretizePushCw->operands))[0]; /* begin machineCodeAt:put: */ @@ -13025,7 +13028,7 @@ concretizePushR(AbstractInstruction * self_in_concretizePushR) { sqInt aWord; sqInt aWord1; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizePushR->operands))[0]; /* begin machineCodeAt:put: */ @@ -13085,8 +13088,8 @@ concretizeSubCheckOverflowCqR(AbstractInstruction * self_in_concretizeSubCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeSubCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCheckOverflowCqR->operands))[1]); @@ -13124,8 +13127,8 @@ concretizeSubCheckOverflowRR(AbstractInstruction * self_in_concretizeSubCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeSubCheckOverflowRR->operands))[0]; @@ -13155,8 +13158,8 @@ concretizeSubCqR(AbstractInstruction * self_in_concretizeSubCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeSubCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCqR->operands))[1]); @@ -13177,8 +13180,8 @@ concretizeSubCwR(AbstractInstruction * self_in_concretizeSubCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeSubCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCwR->operands))[1]); @@ -13200,8 +13203,8 @@ concretizeSubRR(AbstractInstruction * self_in_concretizeSubRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeSubRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubRR->operands))[1]); @@ -13216,8 +13219,8 @@ static usqInt NoDbgRegParms concretizeTstCqR(AbstractInstruction * self_in_concretizeTstCqR) { sqInt aWord; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeTstCqR->operands))[0]; leftReg = ((self_in_concretizeTstCqR->operands))[1]; @@ -13237,8 +13240,8 @@ concretizeTstCwR(AbstractInstruction * self_in_concretizeTstCwR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeTstCwR->operands))[0]; leftReg = ((self_in_concretizeTstCwR->operands))[1]; @@ -13270,8 +13273,8 @@ concretizeXorCwR(AbstractInstruction * self_in_concretizeXorCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeXorCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorCwR->operands))[1]); @@ -13293,8 +13296,8 @@ concretizeXorRR(AbstractInstruction * self_in_concretizeXorRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeXorRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorRR->operands))[1]); @@ -14410,7 +14413,7 @@ literalAtAddressput(AbstractInstruction * self_in_literalAtAddressput, sqInt mcp pc-4 ori rx, rx, lower */ /* CogMIPSELCompiler>>#literalBeforeFollowingAddress: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress) { if ((opcodeAtAddress(self_in_literalBeforeFollowingAddress, followingAddress - 4)) == ORI) { @@ -14534,9 +14537,9 @@ nop(AbstractInstruction * self_in_nop) static AbstractInstruction * NoDbgRegParms noteFollowingConditionalBranch(AbstractInstruction * self_in_noteFollowingConditionalBranch, AbstractInstruction *branch) { - usqIntptr_t newBranchLeft; + usqInt newBranchLeft; sqInt newBranchOpcode; - usqIntptr_t newBranchRight; + usqInt newBranchRight; if ((((branch->opcode)) == JumpOverflow) || (((branch->opcode)) == JumpNoOverflow)) { @@ -14909,7 +14912,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) @@ -14992,11 +14995,11 @@ rewriteConditionalJumpLongAttarget(AbstractInstruction * self_in_rewriteConditio /* CogMIPSELCompiler>>#rewriteCPICJumpAt:target: */ static AbstractInstruction * NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { assert((opcodeAtAddress(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8)) == BNE); assert((longAt(addressFollowingJump - 4)) == (nop(self_in_rewriteCPICJumpAttarget))); - rewriteITypeBranchAtAddresstarget(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8, jumpTargetAddress); + rewriteITypeBranchAtAddresstarget(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8, jumpTargetAddr); assert((opcodeAtAddress(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8)) == BNE); assert((longAt(addressFollowingJump - 4)) == (nop(self_in_rewriteCPICJumpAttarget))); return self_in_rewriteCPICJumpAttarget; @@ -15227,7 +15230,7 @@ shRbaseoffset(AbstractInstruction * self_in_shRbaseoffset, sqInt srcReg, sqInt b static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - usqIntptr_t alignment; + usqInt alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -17032,6 +17035,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *jumpImm; AbstractInstruction *jumpNotSet; @@ -17057,7 +17061,17 @@ genPrimitiveIdentityHash(void) /* begin Jump: */ genoperand(Jump, ((sqInt)ret)); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } @@ -18976,6 +18990,8 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { zeroOpcodeIndex(); @@ -22835,7 +22851,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -23095,7 +23111,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -23117,7 +23133,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1)); introspectionDataIndex += 2; } return 0; @@ -23375,7 +23391,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -23920,7 +23936,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -23941,8 +23957,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -24153,7 +24169,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -25347,7 +25367,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -25581,7 +25602,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -25622,7 +25644,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc = ssTop(); ssPop(1); if ((((desc->type)) == SSConstant) @@ -25693,7 +25716,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -26122,7 +26146,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -26389,7 +26414,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -26578,7 +26604,8 @@ genSpecialSelectorComparison(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -26772,7 +26799,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -26843,7 +26871,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -26880,7 +26909,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -27022,19 +27052,18 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; - return fixup; -} + } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ static void NoDbgRegParms @@ -27210,7 +27239,8 @@ marshallAbsentReceiverSendArguments(sqInt numArgs) ssAllocateCallReg(ReceiverResultReg); /* begin putSelfInReceiverResultReg */ storeToReg((&simSelf), ReceiverResultReg); - ssFlushTo(simStackPtr - numArgs); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - numArgs, simNativeStackPtr); if (numArgs > 2) { /* The arguments must be pushed to the stack, and hence the receiver @@ -27238,7 +27268,8 @@ marshallAbsentReceiverSendArguments(sqInt numArgs) /* begin PushR: */ genoperand(PushR, ReceiverResultReg); } - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { if (numArgs > 0) { @@ -27276,7 +27307,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -27286,7 +27318,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -27294,7 +27327,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -27333,7 +27367,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -27398,7 +27432,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -27539,8 +27574,7 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); if ((isBranch(descriptor)) @@ -27870,13 +27904,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1U << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -27918,7 +27945,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -27942,7 +27970,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -28262,6 +28291,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/nsspursrc/vm/cointerp.c b/nsspursrc/vm/cointerp.c index 3d7630868..936909d5b 100644 --- a/nsspursrc/vm/cointerp.c +++ b/nsspursrc/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -463,6 +463,7 @@ extern sqInt ceEnclosingObjectAt(sqInt level); extern void ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceInterpretMethodFromPICreceiver(sqInt aMethodObj, sqInt rcvr); extern sqInt ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr); +extern sqInt ceNewHashOf(sqInt anObject); extern sqInt ceNonLocalReturn(sqInt returnValue); extern void ceOuterSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceReturnToInterpreter(sqInt anOop); @@ -737,6 +738,7 @@ static void primitiveForceDisplayUpdate(void); static void primitiveFormPrint(void); static void primitiveFractionalPart(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -908,9 +910,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); -static usqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForward(sqInt survivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1159,6 +1161,7 @@ static void NoDbgRegParms markLoopFrom(sqInt objOop); static void NoDbgRegParms NeverInline markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged); static void markWeaklingsAndMarkAndFireEphemerons(void); extern sqInt maybeSplObj(sqInt index); +static sqInt NoDbgRegParms newHashBitsOf(sqInt objOop); static sqInt newObjectHash(void); static sqInt newSpaceIsEmpty(void); extern sqInt nilObject(void); @@ -1170,8 +1173,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1238,6 +1241,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1334,14 +1338,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1472,6 +1477,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1648,8 +1654,8 @@ _iss usqInt instructionPointer; _iss sqInt specialObjectsOop; _iss usqInt newMethod; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt needGCFlag; @@ -1718,6 +1724,7 @@ _iss sqInt classNameIndex; _iss sqInt gcPhaseInProgress; _iss sqInt methodDictLinearSearchLimit; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt lastCoggableInterpretedBlockMethod; _iss sqInt lastUncoggableInterpretedBlockMethod; _iss sqInt metaclassNumSlots; @@ -1729,7 +1736,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1756,6 +1762,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1769,11 +1777,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1808,6 +1814,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; @@ -1830,7 +1837,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1861,6 +1867,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1876,6 +1883,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2488,7 +2498,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.2142"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.2165"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5087,7 +5097,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l683; + goto l681; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5135,10 +5145,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l710; + goto l708; } ourContext = marryFrameSP(localFP, localSP); - l710: /* end ensureFrameIsMarried:SP: */; + l708: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5147,7 +5157,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l683; + goto l681; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5156,10 +5166,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l703; + goto l701; } ourContext1 = marryFrameSP(localFP, localSP); - l703: /* end ensureFrameIsMarried:SP: */; + l701: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5170,7 +5180,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l683; + goto l681; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -5222,10 +5232,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l696; + goto l694; } ourContext2 = marryFrameSP(localFP, localSP); - l696: /* end ensureFrameIsMarried:SP: */; + l694: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5234,7 +5244,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l683; + goto l681; } } assert(pageListIsWellFormed()); @@ -5339,11 +5349,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l693; + goto l691; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l693: /* end maybeReturnToMachineCodeFrame */; + l691: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5358,7 +5368,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l683: /* end case */; + l681: /* end case */; break; case 121: /* returnTrue */ @@ -5474,27 +5484,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l721; + goto l719; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l721; + goto l719; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l721: /* end findFrameAbove:inPage: */; + l719: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l716; + goto l714; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l716: /* end newStackPage */; + l714: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5517,7 +5527,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l712; + goto l710; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5553,7 +5563,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l712; + goto l710; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5571,7 +5581,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l712; + goto l710; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5596,7 +5606,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l712; + goto l710; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5614,7 +5624,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l712: /* end case */; + l710: /* end case */; break; case 126: case 127: @@ -5648,10 +5658,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l722; + goto l720; } ourContext = marryFrameSP(theFP, theSP); - l722: /* end ensureFrameIsMarried:SP: */; + l720: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6095,12 +6105,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l740; + goto l738; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l740: /* end classAtIndex: */; + l738: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6121,7 +6131,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l724; + goto l722; } /* second probe */ @@ -6131,7 +6141,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l724; + goto l722; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6139,10 +6149,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l724; + goto l722; } ok = 0; - l724: /* end inlineLookupInMethodCacheSel:classTag: */; + l722: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6212,7 +6222,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l741; + goto l739; } } /* begin classAtIndex: */ @@ -6225,12 +6235,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l733; + goto l731; } /* begin fetchPointer:ofObject: */ fieldIndex11 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l733: /* end classAtIndex: */; + l731: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupOrdinarySend(); @@ -6242,7 +6252,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l741: /* end internalFindNewMethodOrdinary */; + l739: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6255,28 +6265,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l745; + goto l743; } if (localPrimIndex == 256) { - goto l745; + goto l743; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l745; + goto l743; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l745; + goto l743; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l745; + goto l743; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l745; + goto l743; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6338,7 +6348,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l745; + goto l743; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6418,11 +6428,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l738; + goto l736; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l738: /* end getErrorObjectFromPrimFailCode */; + l736: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6446,7 +6456,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l745: /* end internalExecuteNewMethod */; + l743: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6894,18 +6904,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7021,7 +7035,7 @@ interpret(void) case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7243,7 +7257,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -7954,7 +7968,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l759; + goto l756; } if (bytecode == 172) { @@ -7963,7 +7977,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l759; + goto l756; } if (bytecode > 167) { @@ -7973,7 +7987,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l759; + goto l756; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -7981,7 +7995,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l759: /* end case */; + l756: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -8092,7 +8106,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l762; + goto l759; } if (bytecode == 172) { @@ -8102,14 +8116,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l762; + goto l759; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l762: /* end case */; + l759: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -8753,7 +8767,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -10060,7 +10074,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l763; + goto l760; } if (bytecode == 244) { @@ -10069,7 +10083,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l763; + goto l760; } if (bytecode == 243) { @@ -10079,7 +10093,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l763; + goto l760; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10087,7 +10101,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l763: /* end case */; + l760: /* end case */; break; case 339: /*83*/ /* bytecodePrimGreaterThanV4 */ @@ -10198,7 +10212,7 @@ interpret(void) localIP = (localIP + (bytecode - 207)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l766; + goto l763; } if (bytecode == 244) { @@ -10208,14 +10222,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l766; + goto l763; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l766: /* end case */; + l763: /* end case */; break; case 340: /*84*/ /* bytecodePrimLessOrEqualV4 */ @@ -10859,7 +10873,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -11957,7 +11971,7 @@ interpret(void) case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -12621,7 +12635,7 @@ interpret(void) usqInt length; sqInt literal; sqInt localPrimIndex; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; usqInt methodPointer; @@ -12705,12 +12719,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l791; + goto l780; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l791: /* end classAtIndex: */; + l780: /* end classAtIndex: */; /* begin lookupImplicitReceiverSend */ GIV(messageSelector) = (((GIV(messageSelector) & (tagMask())) == 0) && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) @@ -12731,18 +12745,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + candidateMixin = objOop2; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -12798,12 +12816,12 @@ interpret(void) } GIV(newMethod) = objOop12; found = 1; - goto l789; + goto l790; } index += 1; } found = 0; - goto l789; + goto l790; } /* It is assumed that there are some nils in this dictionary, and search will @@ -12830,7 +12848,7 @@ interpret(void) nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { found = 0; - goto l789; + goto l790; } if (((nextSelector & (tagMask())) == 0) && (((longAt(nextSelector)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -12852,24 +12870,24 @@ interpret(void) } GIV(newMethod) = objOop3; found = 1; - goto l789; + goto l790; } index += 1; if (index == length) { if (wrapAround) { found = 0; - goto l789; + goto l790; } wrapAround = 1; index = SelectorStart; } } found = 0; - l789: /* end lookupMethodInDictionary: */; + l790: /* end lookupMethodInDictionary: */; if (found) { GIV(localAbsentReceiver) = candidateReceiver; actualLookupRule = lookupLexicalfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l772; + goto l773; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((int)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -12889,7 +12907,7 @@ interpret(void) ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits2) << (shiftForWord()))))) : fetchClassOfNonImm(methodReceiver)); actualLookupRule = lookupProtectedstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l772: /* end lookupImplicitReceiverSend */; + l773: /* end lookupImplicitReceiverSend */; /* begin internalizeIPandSP */ assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); localIP = pointerForOop(GIV(instructionPointer)); @@ -12921,28 +12939,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l768; + goto l784; } if (localPrimIndex == 256) { - goto l768; + goto l784; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l768; + goto l784; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l768; + goto l784; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l768; + goto l784; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l768; + goto l784; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13004,7 +13022,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l768; + goto l784; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -13084,11 +13102,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l788; + goto l804; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l788: /* end getErrorObjectFromPrimFailCode */; + l804: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -13112,7 +13130,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l768: /* end internalExecuteNewMethod */; + l784: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13202,7 +13220,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l840; + goto l819; } /* second probe */ @@ -13214,7 +13232,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l840; + goto l819; } probe1 = (((usqInt) hash1) >> 2) & NSMethodCacheMask; if (((((GIV(nsMethodCache)[probe1 + NSMethodCacheSelector]) == GIV(messageSelector)) @@ -13224,7 +13242,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l840; + goto l819; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13252,12 +13270,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l821; + goto l828; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l821: /* end classForClassTag: */; + l828: /* end classForClassTag: */; /* begin lookupDynamicSuperSend */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -13272,18 +13290,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord()))))) : fetchClassOfNonImm(GIV(localAbsentReceiver)))); @@ -13301,7 +13323,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToNSCache(actualLookupRule); - l840: ; + l819: ; /* begin shuffleArgumentsAndStoreAbsentReceiver: */ @@ -13327,28 +13349,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l839; + goto l835; } if (localPrimIndex == 256) { - goto l839; + goto l835; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l839; + goto l835; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l839; + goto l835; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l839; + goto l835; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l839; + goto l835; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13410,7 +13432,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l839; + goto l835; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -13490,11 +13512,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l833; + goto l827; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l833: /* end getErrorObjectFromPrimFailCode */; + l827: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -13518,7 +13540,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l839: /* end internalExecuteNewMethod */; + l835: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13762,12 +13784,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l595; + goto l619; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l595: /* end classAtIndex: */; + l619: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -13782,18 +13804,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < 0) { count += 1; @@ -13841,28 +13867,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l598; + goto l618; } if (localPrimIndex == 256) { - goto l598; + goto l618; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l598; + goto l618; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l598; + goto l618; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l598; + goto l618; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l598; + goto l618; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13924,7 +13950,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l598; + goto l618; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -14004,11 +14030,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l616; + goto l610; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l616: /* end getErrorObjectFromPrimFailCode */; + l610: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14032,7 +14058,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l598: /* end internalExecuteNewMethod */; + l618: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14064,15 +14090,15 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l622; + goto l621; } else { goto respondToUnknownBytecode; - goto l622; + goto l621; } } - l622: /* end case */; + l621: /* end case */; break; case 509: /*253*/ /* extPushClosureBytecode */ @@ -14083,7 +14109,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14108,10 +14134,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l647; + goto l646; } context = marryFrameSP(theFP, theSP); - l647: /* end ensureFrameIsMarried:SP: */; + l646: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14139,13 +14165,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l643; + goto l642; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l643: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l642: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14284,12 +14310,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l656; + goto l679; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l656: /* end classAtIndex: */; + l679: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14304,18 +14330,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -14363,28 +14393,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l659; + goto l678; } if (localPrimIndex == 256) { - goto l659; + goto l678; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l659; + goto l678; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l659; + goto l678; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l659; + goto l678; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l659; + goto l678; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14446,7 +14476,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l659; + goto l678; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -14526,11 +14556,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l677; + goto l670; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l677: /* end getErrorObjectFromPrimFailCode */; + l670: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14554,7 +14584,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l659: /* end internalExecuteNewMethod */; + l678: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -15231,7 +15261,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -15251,10 +15280,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt methodField1 = longAt(lifp + FoxMethod); if ((methodField1 & MFMethodFlagIsBlockFlag) != 0) { cogMethod = ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset)))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -15768,8 +15797,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -15790,8 +15820,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -16102,18 +16133,22 @@ ceDynamicSuperSendreceiver(sqInt cacheAddress, sqInt methodReceiver) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodMixin = objOop; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? (/* begin fetchPointer:ofObject: */ longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord())))))) @@ -16208,7 +16243,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) sqInt index; usqInt length; sqInt literal; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt methodHeader1; @@ -16306,18 +16341,22 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + candidateMixin = objOop2; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -16374,12 +16413,12 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) } GIV(newMethod) = objOop12; found = 1; - goto l25; + goto l24; } index += 1; } found = 0; - goto l25; + goto l24; } /* It is assumed that there are some nils in this dictionary, and search will @@ -16406,7 +16445,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { found = 0; - goto l25; + goto l24; } if (((nextSelector & (tagMask())) == 0) && (((longAt(nextSelector)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -16428,24 +16467,24 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) } GIV(newMethod) = objOop3; found = 1; - goto l25; + goto l24; } index += 1; if (index == length) { if (wrapAround) { found = 0; - goto l25; + goto l24; } wrapAround = 1; index = SelectorStart; } } found = 0; - l25: /* end lookupMethodInDictionary: */; + l24: /* end lookupMethodInDictionary: */; if (found) { GIV(localAbsentReceiver) = candidateReceiver; errSelIdx = lookupLexicalNoMNUfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l32; + goto l31; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((int)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -16468,7 +16507,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) GIV(lkupClass) = fetchClassOfNonImm(methodReceiver); } errSelIdx = lookupProtectedNoMNUstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l32: /* end lookupImplicitReceiverSendNoMNU: */; + l31: /* end lookupImplicitReceiverSendNoMNU: */; if (errSelIdx != 0) { assert(errSelIdx == SelectorDoesNotUnderstand); assert(GIV(localAbsentReceiver) == methodReceiver); @@ -16660,6 +16699,19 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) return 0; } + +/* We know anObject has not a hash yet (or this trampoline would not be + called. Sets the hash, then answers it as a smallinteger */ + + /* CoInterpreter>>#ceNewHashOf: */ +sqInt +ceNewHashOf(sqInt anObject) +{ + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); + return (((usqInt)(newHashBitsOf(anObject)) << 1) | 1); +} + /* CoInterpreter>>#ceNonLocalReturn: */ sqInt ceNonLocalReturn(sqInt returnValue) @@ -16930,8 +16982,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -17347,7 +17400,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17463,7 +17515,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17496,7 +17547,7 @@ ceSendMustBeBooleanTointerpretingAtDelta(sqInt aNonBooleanObject, sqInt jumpSize sqInt oop; char *p; char *sp; - sqInt startBcpc; + unsigned short startBcpc; sqInt top; assert(addressCouldBeOop(aNonBooleanObject)); @@ -17649,18 +17700,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -17744,7 +17799,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18071,7 +18125,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -19050,7 +19104,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -19164,7 +19218,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) numArgs = ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory()) ? ((mframeCogMethod(theFP))->cmNumArgs) : byteAt((theFP + FoxIFrameFlags) + 1)); - offset = ((sqInt) ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))))); + offset = (FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))); oop = longAt(theFP + offset); if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -19810,7 +19864,7 @@ lookupLexicalNoMNUfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -20106,18 +20160,22 @@ lookupOuterSendNoMNUdepth(sqInt methodReceiver, sqInt depth) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -20154,7 +20212,7 @@ lookupProtectedNoMNUstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -20557,7 +20615,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -21153,18 +21211,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -21191,7 +21250,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -21574,7 +21633,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -21639,7 +21698,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -21702,8 +21761,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -21821,7 +21880,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -22756,7 +22815,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -22910,6 +22969,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -23110,6 +23172,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -23357,15 +23420,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -23422,6 +23497,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -23434,8 +23510,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -23610,6 +23688,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -23958,7 +24037,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -24050,7 +24129,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -24440,8 +24519,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -24614,6 +24694,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -24934,8 +25015,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -24943,14 +25023,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -24979,8 +25059,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -24988,14 +25067,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -25026,8 +25105,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -25035,14 +25113,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -26718,8 +26796,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -26727,14 +26804,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -26758,8 +26835,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -26767,14 +26843,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l21; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -26800,8 +26876,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -26809,14 +26884,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -26839,6 +26914,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -27291,16 +27367,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -27341,7 +27417,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -27496,7 +27572,7 @@ noInlineSigned32BitValueGutsOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -27895,7 +27971,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -27933,7 +28008,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -28704,8 +28779,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28884,8 +28959,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29066,7 +29141,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -29251,8 +29326,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29651,7 +29726,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -29745,8 +29820,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -29974,7 +30049,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30240,7 +30315,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30503,7 +30578,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -30938,7 +31013,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -30948,7 +31023,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -30959,7 +31034,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -30976,7 +31051,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -30988,8 +31063,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -31007,7 +31081,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -31125,7 +31199,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -31726,8 +31800,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -31793,7 +31867,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -31851,7 +31925,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -32579,8 +32653,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -32588,14 +32661,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -32620,8 +32693,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -32629,14 +32701,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -32663,8 +32735,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -32672,14 +32743,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -32711,7 +32782,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -32954,6 +33025,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -33186,7 +33304,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -33372,7 +33490,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -33547,7 +33665,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -34639,7 +34757,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -34875,7 +34993,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -35194,7 +35312,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -35288,7 +35406,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -35349,7 +35467,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -35502,8 +35620,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -35511,18 +35628,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -35545,8 +35662,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -35554,18 +35670,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -35577,8 +35693,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -35586,22 +35701,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -35825,7 +35940,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -35841,28 +35956,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = ((usqInt) numSlots2) >> 1; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ setIsMarkedOfto(stack, 1); current = GIV(specialObjectsOop); @@ -35877,28 +35992,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots3) >> 1; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -35908,7 +36023,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -35918,7 +36032,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -35957,7 +36070,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & 1) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -35979,7 +36092,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -36016,28 +36129,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots) >> 1; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -36052,13 +36165,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 1); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -37041,7 +37154,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -37102,7 +37215,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -38342,7 +38455,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -39450,8 +39563,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -39459,14 +39571,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39491,8 +39603,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -39500,14 +39611,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -39534,8 +39645,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -39543,14 +39653,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -39809,7 +39919,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -40056,8 +40166,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40065,14 +40174,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40093,8 +40202,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40102,14 +40210,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40132,8 +40240,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40141,14 +40248,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -40291,18 +40398,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1))) != 7)) { return 0; @@ -40373,8 +40484,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40782,9 +40892,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -40959,7 +41069,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -41028,7 +41138,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -41124,7 +41234,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -41140,7 +41250,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -41151,7 +41261,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -41605,8 +41715,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41614,14 +41723,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41644,8 +41753,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -41653,14 +41761,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -41706,8 +41814,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41715,14 +41822,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -41846,16 +41953,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; unsigned int header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -41885,12 +41991,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -41920,16 +42025,15 @@ copyAndForwardMourner(sqInt mourner) then corpse is threaded onto the weakList for later treatment. */ /* SpurGenerationScavenger>>#copyAndForward: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForward(sqInt survivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; unsigned int header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -41975,12 +42079,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -42015,12 +42118,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -42218,7 +42321,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -42732,7 +42835,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - sqInt ptr; + usqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -42748,8 +42851,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -42877,7 +42979,7 @@ scavengeReferentsOf(sqInt referrer) sqInt header; sqInt header1; sqInt i; - usqInt newLocation; + sqInt newLocation; sqInt numLiterals; sqInt numSlots; usqInt numSlots1; @@ -43203,8 +43305,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43212,14 +43313,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43245,8 +43346,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -43254,14 +43354,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43276,8 +43376,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -43285,14 +43384,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -43666,7 +43765,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -43674,7 +43773,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -43685,8 +43784,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43727,8 +43825,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43736,14 +43833,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43782,8 +43879,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -43830,8 +43926,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43839,14 +43934,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -43895,8 +43990,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -43904,14 +43998,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43957,8 +44051,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -44012,8 +44105,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -44021,14 +44113,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -44087,7 +44179,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -44104,7 +44196,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -44204,8 +44296,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44241,8 +44332,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44250,14 +44340,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44294,8 +44384,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -44303,14 +44392,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44340,8 +44429,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44349,14 +44437,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -44467,8 +44555,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44476,14 +44563,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44507,8 +44594,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44516,14 +44602,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -44549,8 +44635,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44558,14 +44643,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -44607,8 +44692,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44616,14 +44700,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -45711,8 +45795,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45720,14 +45803,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45772,8 +45855,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45781,14 +45863,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -45868,8 +45950,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45877,14 +45958,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -46040,12 +46121,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46088,8 +46169,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46097,14 +46177,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46155,12 +46235,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46203,8 +46283,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46212,14 +46291,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46313,12 +46392,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -46378,8 +46457,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46387,14 +46465,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -46444,7 +46522,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -46485,7 +46563,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -47079,8 +47157,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47088,14 +47165,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -47521,8 +47598,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47530,14 +47606,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47569,8 +47645,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -47578,14 +47653,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47619,8 +47694,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -47628,14 +47702,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -47921,7 +47995,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -48177,8 +48250,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48186,14 +48258,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48216,8 +48288,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48225,14 +48296,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -48468,8 +48539,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48477,14 +48547,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48517,8 +48587,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48526,14 +48595,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48568,8 +48637,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48577,14 +48645,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -48664,8 +48732,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48673,14 +48740,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48710,8 +48777,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48719,14 +48785,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48758,8 +48824,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48767,14 +48832,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49334,7 +49399,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -49659,8 +49724,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49668,14 +49732,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49698,8 +49762,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -49707,14 +49770,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49739,8 +49802,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49748,14 +49810,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -49813,7 +49875,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -49821,7 +49883,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -49860,10 +49922,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -49914,8 +49976,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49923,14 +49984,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -49967,11 +50028,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -51435,8 +51496,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -51458,8 +51518,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51503,7 +51562,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop1 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -51511,7 +51570,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex1 & TopHashBit) { if ((classIndex1 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex1 - TopHashBit)) << (shiftForWord()))))); @@ -51519,7 +51578,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } else { @@ -51527,11 +51586,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex1 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) { @@ -51541,7 +51600,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -51549,11 +51608,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } } assert(!(isOopForwarded(objOop1))); @@ -51566,8 +51625,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -51575,17 +51633,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l22; + goto l23; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l26: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -51609,7 +51667,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -51626,7 +51684,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -51647,8 +51705,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -51656,17 +51713,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -51674,8 +51731,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -51683,17 +51739,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -51713,7 +51769,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop2)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -51773,8 +51828,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -51782,14 +51836,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l33; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l33: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -51915,8 +51969,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51924,14 +51977,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -51961,8 +52014,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -51970,14 +52022,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52000,8 +52052,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52009,14 +52060,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -52122,8 +52173,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -52131,14 +52181,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52192,8 +52242,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52201,14 +52250,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -52264,8 +52313,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -52273,14 +52321,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -52312,7 +52360,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -52421,7 +52469,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52447,7 +52495,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52472,7 +52520,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52498,7 +52546,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52521,8 +52569,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52530,14 +52577,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -53017,7 +53064,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -53259,7 +53306,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -53379,6 +53426,19 @@ maybeSplObj(sqInt index) : 0); } + /* SpurMemoryManager>>#newHashBitsOf: */ +static sqInt NoDbgRegParms +newHashBitsOf(sqInt objOop) +{ + sqInt hash; + + hash = (newObjectHash()) & (identityHashHalfWordMask()); + /* begin setHashBitsOf:to: */ + assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))); + long32Atput(objOop + 4, ((((long32At(objOop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); + return hash; +} + /* Use a slight variation on D.H. Lehmer's linear congruential generator from 1951. See e.g. http://en.wikipedia.org/wiki/Linear_congruential_generator. */ @@ -53619,8 +53679,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53656,7 +53715,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -53671,7 +53730,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -53935,8 +53994,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53958,8 +54016,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -53982,8 +54039,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -54004,8 +54060,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -54083,8 +54138,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54092,14 +54146,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54121,8 +54175,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54130,14 +54183,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -54162,8 +54215,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54171,14 +54223,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -54287,8 +54339,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54374,8 +54425,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54383,14 +54433,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -54425,8 +54475,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -54434,14 +54483,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54469,8 +54518,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54478,14 +54526,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -54628,8 +54676,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55118,8 +55165,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55127,14 +55173,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55165,8 +55211,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55174,14 +55219,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55214,8 +55259,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55223,14 +55267,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55334,8 +55378,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55343,14 +55386,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55388,8 +55431,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55397,14 +55439,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55444,8 +55486,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55453,14 +55494,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55586,8 +55627,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55595,14 +55635,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55632,8 +55672,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55641,14 +55680,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55671,8 +55710,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55680,14 +55718,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -55763,8 +55801,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55772,14 +55809,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55807,8 +55844,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55816,14 +55852,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -55846,8 +55882,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55855,14 +55890,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -56208,8 +56243,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56217,14 +56251,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56254,8 +56288,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56263,14 +56296,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56293,8 +56326,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56302,14 +56334,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56435,8 +56467,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56444,14 +56475,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56480,8 +56511,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56489,14 +56519,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56527,8 +56557,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56536,14 +56565,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56626,8 +56655,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56635,14 +56663,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56678,8 +56706,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56687,14 +56714,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56732,8 +56759,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56741,14 +56767,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56832,8 +56858,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56841,14 +56866,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56878,8 +56903,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56887,14 +56911,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56917,8 +56941,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56926,14 +56949,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57143,8 +57166,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57152,14 +57174,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57187,8 +57209,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -57196,14 +57217,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57224,8 +57245,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57233,14 +57253,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57315,13 +57335,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57329,15 +57349,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57354,7 +57374,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57378,8 +57398,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -57387,14 +57406,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57415,13 +57434,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57429,15 +57448,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57454,7 +57473,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57478,8 +57497,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57487,14 +57505,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57516,13 +57534,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -57530,15 +57548,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -57555,7 +57573,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -57580,8 +57598,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57589,14 +57606,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58001,7 +58018,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -58011,8 +58027,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -58063,7 +58078,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -58256,6 +58271,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -58371,7 +58396,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -58388,7 +58413,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -58412,7 +58437,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -58429,7 +58454,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -58495,8 +58520,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -58659,7 +58683,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -59341,11 +59365,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -59360,7 +59384,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -59374,8 +59398,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59383,16 +59406,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -59416,8 +59439,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59425,14 +59447,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -59452,16 +59474,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -59470,11 +59492,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -59482,7 +59504,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -59550,8 +59572,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -59559,14 +59580,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -59665,8 +59686,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59686,8 +59706,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -59695,14 +59714,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -59760,8 +59779,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59838,7 +59856,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -59860,7 +59878,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -59909,7 +59927,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -59923,8 +59941,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59932,16 +59949,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -60006,8 +60023,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60015,14 +60031,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -60041,9 +60057,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -60059,9 +60072,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -60089,9 +60101,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -60102,8 +60113,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60113,9 +60123,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -60173,7 +60182,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -60248,8 +60257,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60305,8 +60313,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60314,14 +60321,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -60384,8 +60391,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60393,14 +60399,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -60517,8 +60523,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60526,14 +60531,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -60573,7 +60578,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -60739,13 +60744,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l66; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l66: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l65; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -60753,15 +60758,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l65; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l65; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l65; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -60778,7 +60783,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals1 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l65: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -60805,8 +60810,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -60814,14 +60818,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -60833,7 +60837,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -60846,13 +60850,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -60860,15 +60864,15 @@ updatePointers(void) numPointerSlots2 = (numSlots5 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots5); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -60885,7 +60889,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals2 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -60913,8 +60917,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots22 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots22 + (numSlots22 & 1)) << (shiftForWord()); @@ -60922,16 +60925,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l39; + goto l40; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l39: /* end objectAfter:limit: */; + l40: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -60972,13 +60975,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -60986,15 +60989,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -61011,7 +61014,7 @@ updatePointers(void) assert((header4 & 1)); numLiterals3 = ((header4 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -61048,8 +61051,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -61084,7 +61086,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -61097,8 +61099,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -61106,18 +61107,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -61140,13 +61141,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -61154,15 +61155,15 @@ updatePointers(void) numPointerSlots = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -61179,7 +61180,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i = 0; i < numPointerSlots; i += 1) { /* begin fetchPointer:ofObject: */ oop = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))); @@ -61208,8 +61209,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61217,14 +61217,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } } @@ -61426,8 +61426,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61435,14 +61434,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -61527,7 +61526,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -61627,8 +61626,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -61795,7 +61794,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -61911,8 +61910,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61920,24 +61918,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -62000,8 +61998,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -62230,8 +62228,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); @@ -62734,8 +62732,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -62743,14 +62740,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -62771,8 +62768,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -62780,14 +62776,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -62810,8 +62806,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -62819,14 +62814,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -63541,7 +63536,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -63551,7 +63546,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -63639,9 +63634,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -63747,6 +63742,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -64411,8 +64435,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -64420,14 +64443,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -64479,8 +64502,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -64488,14 +64510,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64549,8 +64571,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -64558,20 +64579,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -64604,8 +64625,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64613,14 +64633,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64645,8 +64665,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -64654,14 +64673,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64688,8 +64707,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -64697,16 +64715,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -64831,8 +64849,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -64906,8 +64925,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -64997,8 +65017,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66391,8 +66412,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -67499,7 +67521,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -67651,7 +67673,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67838,7 +67860,7 @@ lookupMNU(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67998,7 +68020,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68169,7 +68191,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68351,7 +68373,7 @@ lookupOrdinarySend(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68514,7 +68536,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68669,7 +68691,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -68836,7 +68858,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -69183,8 +69205,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -69236,7 +69259,6 @@ marryFrameSP(char *theFP, char *theSP) cogMethod = ((CogMethod *) (methodFieldOrObj & MFMethodMask)); numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { - /* begin nilObject */ closureOrNil = GIV(nilObj); } @@ -69260,11 +69282,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -69463,18 +69483,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -69630,7 +69651,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69815,6 +69836,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -69870,7 +69924,7 @@ popthenPush(sqInt nItems, sqInt oop) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -70322,8 +70376,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -70331,14 +70384,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -70369,8 +70422,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -70378,14 +70430,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70409,8 +70461,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -70418,14 +70469,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -71179,7 +71230,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71190,23 +71241,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71222,38 +71273,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71266,7 +71317,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71274,7 +71325,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -71285,7 +71336,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71299,7 +71350,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71312,12 +71363,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71328,7 +71379,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71336,9 +71387,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71352,8 +71403,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71361,14 +71411,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71415,7 +71465,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71426,23 +71476,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71458,38 +71508,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71502,7 +71552,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71510,7 +71560,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -71521,7 +71571,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71535,7 +71585,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71548,12 +71598,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71564,7 +71614,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71572,9 +71622,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71588,8 +71638,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71597,14 +71646,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71652,7 +71701,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71663,23 +71712,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71695,38 +71744,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71739,7 +71788,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71747,7 +71796,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -71758,7 +71807,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71772,7 +71821,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71785,12 +71834,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71801,7 +71850,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71809,9 +71858,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71826,8 +71875,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71835,14 +71883,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -73147,11 +73195,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73295,7 +73345,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); header = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); if ((header & 1)) { @@ -73406,14 +73456,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -73430,6 +73489,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -73442,21 +73502,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -73472,12 +73536,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -73493,6 +73560,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -73506,11 +73574,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73536,6 +73607,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -74938,7 +75013,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -75053,7 +75128,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -76175,8 +76250,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -78297,7 +78372,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -78654,7 +78729,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -78691,7 +78766,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -78994,7 +79069,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -79146,7 +79221,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -79350,7 +79425,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -79642,8 +79717,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -79693,8 +79769,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -79781,7 +79859,6 @@ primitiveVMParameter(void) char *sp; char *sp1; char *sp2; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -79831,6 +79908,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -79840,165 +79918,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -80006,9 +80048,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -80016,22 +80058,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -80039,192 +80081,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer47 = getCodeCompactionMSecs(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -80253,7 +80200,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -80286,14 +80233,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -80369,7 +80319,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -80483,47 +80433,37 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l85; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l85: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -80578,7 +80518,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -80600,12 +80541,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l66; + goto l78; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l66: /* end setCogVMFlags: */; + l78: /* end setCogVMFlags: */; } } if (index == 49) { @@ -80628,14 +80569,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l83; + goto l86; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l83: /* end floatValueOf: */; + l86: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -80846,8 +80787,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -80855,14 +80795,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -80897,8 +80837,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -80906,14 +80845,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -80941,8 +80880,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -80950,14 +80888,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -80982,6 +80920,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -81029,6 +80968,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/nsspursrc/vm/cointerp.h b/nsspursrc/vm/cointerp.h index 2c704c6bd..48c3f9b6f 100644 --- a/nsspursrc/vm/cointerp.h +++ b/nsspursrc/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ @@ -40,6 +40,7 @@ extern sqInt ceEnclosingObjectAt(sqInt level); extern void ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceInterpretMethodFromPICreceiver(sqInt aMethodObj, sqInt rcvr); extern sqInt ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr); +extern sqInt ceNewHashOf(sqInt anObject); extern sqInt ceNonLocalReturn(sqInt returnValue); extern void ceOuterSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceReturnToInterpreter(sqInt anOop); @@ -230,7 +231,7 @@ extern void NeverInline NeverInline markAndTrace(sqInt objOop); extern sqInt maybeSplObj(sqInt index); extern sqInt nilObject(void); extern sqInt nonIndexablePointerFormat(void); -extern usqInt numBytesOf(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); extern sqInt numStrongSlotsOfWeakling(sqInt objOop); @@ -285,8 +286,9 @@ extern sqInt argumentCountOf(sqInt methodPointer); extern sqInt canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader); extern sqInt checkAllAccessibleObjectsOkay(void); extern sqInt checkOkayInterpreterObjects(sqInt writeBack); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt disownVM(sqInt flags); extern sqInt doSignalSemaphoreWithIndex(sqInt index); extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ; extern usqLong getNextWakeupUsecs(void); @@ -310,6 +312,7 @@ extern sqInt methodClassOf(sqInt methodPointer); extern sqInt methodPrimitiveIndex(void); extern sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); extern sqInt objCouldBeClassObj(sqInt objOop); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); @@ -351,6 +354,9 @@ VM_EXPORT sqInt breakSelectorLength ; VM_EXPORT sqInt checkAllocFiller; VM_EXPORT sqInt checkedPluginName; VM_EXPORT sqInt checkForLeaks; +VM_EXPORT sqInt debugCallbackInvokes; +VM_EXPORT sqInt debugCallbackPath; +VM_EXPORT sqInt debugCallbackReturns; VM_EXPORT sqInt deferDisplayUpdates; VM_EXPORT sqInt desiredCogCodeSize; VM_EXPORT sqInt desiredEdenBytes; diff --git a/nsspursrc/vm/gcc3x-cointerp.c b/nsspursrc/vm/gcc3x-cointerp.c index 033fdc78a..d74860644 100644 --- a/nsspursrc/vm/gcc3x-cointerp.c +++ b/nsspursrc/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -466,6 +466,7 @@ extern sqInt ceEnclosingObjectAt(sqInt level); extern void ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceInterpretMethodFromPICreceiver(sqInt aMethodObj, sqInt rcvr); extern sqInt ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr); +extern sqInt ceNewHashOf(sqInt anObject); extern sqInt ceNonLocalReturn(sqInt returnValue); extern void ceOuterSendreceiver(sqInt cacheAddress, sqInt methodReceiver); extern sqInt ceReturnToInterpreter(sqInt anOop); @@ -740,6 +741,7 @@ static void primitiveForceDisplayUpdate(void); static void primitiveFormPrint(void); static void primitiveFractionalPart(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -911,9 +913,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); -static usqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForward(sqInt survivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1162,6 +1164,7 @@ static void NoDbgRegParms markLoopFrom(sqInt objOop); static void NoDbgRegParms NeverInline markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged); static void markWeaklingsAndMarkAndFireEphemerons(void); extern sqInt maybeSplObj(sqInt index); +static sqInt NoDbgRegParms newHashBitsOf(sqInt objOop); static sqInt newObjectHash(void); static sqInt newSpaceIsEmpty(void); extern sqInt nilObject(void); @@ -1173,8 +1176,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1241,6 +1244,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1337,14 +1341,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1475,6 +1480,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1651,8 +1657,8 @@ _iss usqInt instructionPointer; _iss sqInt specialObjectsOop; _iss usqInt newMethod; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt needGCFlag; @@ -1721,6 +1727,7 @@ _iss sqInt classNameIndex; _iss sqInt gcPhaseInProgress; _iss sqInt methodDictLinearSearchLimit; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt lastCoggableInterpretedBlockMethod; _iss sqInt lastUncoggableInterpretedBlockMethod; _iss sqInt metaclassNumSlots; @@ -1732,7 +1739,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1759,6 +1765,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1772,11 +1780,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1811,6 +1817,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; @@ -1833,7 +1840,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1864,6 +1870,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1879,6 +1886,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2491,7 +2501,7 @@ static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.2142"; +const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.2165"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5096,7 +5106,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l683; + goto l681; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5144,10 +5154,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l710; + goto l708; } ourContext = marryFrameSP(localFP, localSP); - l710: /* end ensureFrameIsMarried:SP: */; + l708: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5156,7 +5166,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l683; + goto l681; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5165,10 +5175,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l703; + goto l701; } ourContext1 = marryFrameSP(localFP, localSP); - l703: /* end ensureFrameIsMarried:SP: */; + l701: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5179,7 +5189,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l683; + goto l681; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -5231,10 +5241,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l696; + goto l694; } ourContext2 = marryFrameSP(localFP, localSP); - l696: /* end ensureFrameIsMarried:SP: */; + l694: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5243,7 +5253,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l683; + goto l681; } } assert(pageListIsWellFormed()); @@ -5348,11 +5358,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l693; + goto l691; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l693: /* end maybeReturnToMachineCodeFrame */; + l691: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5367,7 +5377,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l683: /* end case */; + l681: /* end case */; BREAK; CASE(121) /* returnTrue */ @@ -5483,27 +5493,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l721; + goto l719; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l721; + goto l719; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l721: /* end findFrameAbove:inPage: */; + l719: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l716; + goto l714; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l716: /* end newStackPage */; + l714: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5526,7 +5536,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l712; + goto l710; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5562,7 +5572,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l712; + goto l710; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5580,7 +5590,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l712; + goto l710; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5605,7 +5615,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l712; + goto l710; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5623,7 +5633,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l712: /* end case */; + l710: /* end case */; BREAK; CASE(126) CASE(127) @@ -5657,10 +5667,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l722; + goto l720; } ourContext = marryFrameSP(theFP, theSP); - l722: /* end ensureFrameIsMarried:SP: */; + l720: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6104,12 +6114,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l740; + goto l738; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l740: /* end classAtIndex: */; + l738: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6130,7 +6140,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l724; + goto l722; } /* second probe */ @@ -6140,7 +6150,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l724; + goto l722; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6148,10 +6158,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l724; + goto l722; } ok = 0; - l724: /* end inlineLookupInMethodCacheSel:classTag: */; + l722: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6221,7 +6231,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l741; + goto l739; } } /* begin classAtIndex: */ @@ -6234,12 +6244,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l733; + goto l731; } /* begin fetchPointer:ofObject: */ fieldIndex11 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l733: /* end classAtIndex: */; + l731: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupOrdinarySend(); @@ -6251,7 +6261,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l741: /* end internalFindNewMethodOrdinary */; + l739: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6264,28 +6274,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l745; + goto l743; } if (localPrimIndex == 256) { - goto l745; + goto l743; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l745; + goto l743; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l745; + goto l743; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l745; + goto l743; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l745; + goto l743; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6347,7 +6357,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l745; + goto l743; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6427,11 +6437,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l738; + goto l736; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l738: /* end getErrorObjectFromPrimFailCode */; + l736: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6455,7 +6465,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l745: /* end internalExecuteNewMethod */; + l743: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6903,18 +6913,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7030,7 +7044,7 @@ interpret(void) CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7252,7 +7266,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -7963,7 +7977,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l759; + goto l756; } if (bytecode == 172) { @@ -7972,7 +7986,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l759; + goto l756; } if (bytecode > 167) { @@ -7982,7 +7996,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l759; + goto l756; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -7990,7 +8004,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l759: /* end case */; + l756: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -8101,7 +8115,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l762; + goto l759; } if (bytecode == 172) { @@ -8111,14 +8125,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l762; + goto l759; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l762: /* end case */; + l759: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -8762,7 +8776,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -10069,7 +10083,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l763; + goto l760; } if (bytecode == 244) { @@ -10078,7 +10092,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l763; + goto l760; } if (bytecode == 243) { @@ -10088,7 +10102,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l763; + goto l760; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10096,7 +10110,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l763: /* end case */; + l760: /* end case */; BREAK; CASE(339) /*83*/ /* bytecodePrimGreaterThanV4 */ @@ -10207,7 +10221,7 @@ interpret(void) localIP = (localIP + (bytecode - 207)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l766; + goto l763; } if (bytecode == 244) { @@ -10217,14 +10231,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l766; + goto l763; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l766: /* end case */; + l763: /* end case */; BREAK; CASE(340) /*84*/ /* bytecodePrimLessOrEqualV4 */ @@ -10868,7 +10882,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -11966,7 +11980,7 @@ interpret(void) CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -12630,7 +12644,7 @@ interpret(void) usqInt length; sqInt literal; sqInt localPrimIndex; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; usqInt methodPointer; @@ -12714,12 +12728,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l791; + goto l780; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l791: /* end classAtIndex: */; + l780: /* end classAtIndex: */; /* begin lookupImplicitReceiverSend */ GIV(messageSelector) = (((GIV(messageSelector) & (tagMask())) == 0) && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) @@ -12740,18 +12754,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + candidateMixin = objOop2; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -12807,12 +12825,12 @@ interpret(void) } GIV(newMethod) = objOop12; found = 1; - goto l789; + goto l790; } index += 1; } found = 0; - goto l789; + goto l790; } /* It is assumed that there are some nils in this dictionary, and search will @@ -12839,7 +12857,7 @@ interpret(void) nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { found = 0; - goto l789; + goto l790; } if (((nextSelector & (tagMask())) == 0) && (((longAt(nextSelector)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -12861,24 +12879,24 @@ interpret(void) } GIV(newMethod) = objOop3; found = 1; - goto l789; + goto l790; } index += 1; if (index == length) { if (wrapAround) { found = 0; - goto l789; + goto l790; } wrapAround = 1; index = SelectorStart; } } found = 0; - l789: /* end lookupMethodInDictionary: */; + l790: /* end lookupMethodInDictionary: */; if (found) { GIV(localAbsentReceiver) = candidateReceiver; actualLookupRule = lookupLexicalfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l772; + goto l773; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((int)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -12898,7 +12916,7 @@ interpret(void) ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits2) << (shiftForWord()))))) : fetchClassOfNonImm(methodReceiver)); actualLookupRule = lookupProtectedstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l772: /* end lookupImplicitReceiverSend */; + l773: /* end lookupImplicitReceiverSend */; /* begin internalizeIPandSP */ assert(GIV(instructionPointer) != (ceReturnToInterpreterPC())); localIP = pointerForOop(GIV(instructionPointer)); @@ -12930,28 +12948,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l768; + goto l784; } if (localPrimIndex == 256) { - goto l768; + goto l784; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l768; + goto l784; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l768; + goto l784; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l768; + goto l784; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l768; + goto l784; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13013,7 +13031,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l768; + goto l784; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -13093,11 +13111,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l788; + goto l804; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l788: /* end getErrorObjectFromPrimFailCode */; + l804: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -13121,7 +13139,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l768: /* end internalExecuteNewMethod */; + l784: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13211,7 +13229,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l840; + goto l819; } /* second probe */ @@ -13223,7 +13241,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l840; + goto l819; } probe1 = (((usqInt) hash1) >> 2) & NSMethodCacheMask; if (((((GIV(nsMethodCache)[probe1 + NSMethodCacheSelector]) == GIV(messageSelector)) @@ -13233,7 +13251,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l840; + goto l819; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13261,12 +13279,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l821; + goto l828; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l821: /* end classForClassTag: */; + l828: /* end classForClassTag: */; /* begin lookupDynamicSuperSend */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -13281,18 +13299,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord()))))) : fetchClassOfNonImm(GIV(localAbsentReceiver)))); @@ -13310,7 +13332,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToNSCache(actualLookupRule); - l840: ; + l819: ; /* begin shuffleArgumentsAndStoreAbsentReceiver: */ @@ -13336,28 +13358,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l839; + goto l835; } if (localPrimIndex == 256) { - goto l839; + goto l835; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l839; + goto l835; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l839; + goto l835; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l839; + goto l835; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l839; + goto l835; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13419,7 +13441,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l839; + goto l835; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -13499,11 +13521,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l833; + goto l827; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l833: /* end getErrorObjectFromPrimFailCode */; + l827: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -13527,7 +13549,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l839: /* end internalExecuteNewMethod */; + l835: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13771,12 +13793,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l595; + goto l619; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l595: /* end classAtIndex: */; + l619: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -13791,18 +13813,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < 0) { count += 1; @@ -13850,28 +13876,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l598; + goto l618; } if (localPrimIndex == 256) { - goto l598; + goto l618; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l598; + goto l618; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l598; + goto l618; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l598; + goto l618; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l598; + goto l618; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -13933,7 +13959,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l598; + goto l618; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -14013,11 +14039,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l616; + goto l610; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l616: /* end getErrorObjectFromPrimFailCode */; + l610: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14041,7 +14067,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l598: /* end internalExecuteNewMethod */; + l618: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14073,15 +14099,15 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l622; + goto l621; } else { goto respondToUnknownBytecode; - goto l622; + goto l621; } } - l622: /* end case */; + l621: /* end case */; BREAK; CASE(509) /*253*/ /* extPushClosureBytecode */ @@ -14092,7 +14118,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14117,10 +14143,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l647; + goto l646; } context = marryFrameSP(theFP, theSP); - l647: /* end ensureFrameIsMarried:SP: */; + l646: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14148,13 +14174,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l643; + goto l642; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l643: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l642: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14293,12 +14319,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l656; + goto l679; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l656: /* end classAtIndex: */; + l679: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxIFReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14313,18 +14339,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -14372,28 +14402,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l659; + goto l678; } if (localPrimIndex == 256) { - goto l659; + goto l678; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l659; + goto l678; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l659; + goto l678; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l659; + goto l678; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l659; + goto l678; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14455,7 +14485,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l659; + goto l678; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -14535,11 +14565,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l677; + goto l670; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l677: /* end getErrorObjectFromPrimFailCode */; + l670: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14563,7 +14593,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l659: /* end internalExecuteNewMethod */; + l678: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -15240,7 +15270,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -15260,10 +15289,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt methodField1 = longAt(lifp + FoxMethod); if ((methodField1 & MFMethodFlagIsBlockFlag) != 0) { cogMethod = ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset)))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -15777,8 +15806,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -15799,8 +15829,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -16111,18 +16142,22 @@ ceDynamicSuperSendreceiver(sqInt cacheAddress, sqInt methodReceiver) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodMixin = objOop; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? (/* begin fetchPointer:ofObject: */ longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord())))))) @@ -16217,7 +16252,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) sqInt index; usqInt length; sqInt literal; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt methodHeader1; @@ -16315,18 +16350,22 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + candidateMixin = objOop2; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -16383,12 +16422,12 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) } GIV(newMethod) = objOop12; found = 1; - goto l25; + goto l24; } index += 1; } found = 0; - goto l25; + goto l24; } /* It is assumed that there are some nils in this dictionary, and search will @@ -16415,7 +16454,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { found = 0; - goto l25; + goto l24; } if (((nextSelector & (tagMask())) == 0) && (((longAt(nextSelector)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -16437,24 +16476,24 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) } GIV(newMethod) = objOop3; found = 1; - goto l25; + goto l24; } index += 1; if (index == length) { if (wrapAround) { found = 0; - goto l25; + goto l24; } wrapAround = 1; index = SelectorStart; } } found = 0; - l25: /* end lookupMethodInDictionary: */; + l24: /* end lookupMethodInDictionary: */; if (found) { GIV(localAbsentReceiver) = candidateReceiver; errSelIdx = lookupLexicalNoMNUfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l32; + goto l31; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((int)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -16477,7 +16516,7 @@ ceImplicitReceiverSendreceiver(sqInt cacheAddress, sqInt methodReceiver) GIV(lkupClass) = fetchClassOfNonImm(methodReceiver); } errSelIdx = lookupProtectedNoMNUstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l32: /* end lookupImplicitReceiverSendNoMNU: */; + l31: /* end lookupImplicitReceiverSendNoMNU: */; if (errSelIdx != 0) { assert(errSelIdx == SelectorDoesNotUnderstand); assert(GIV(localAbsentReceiver) == methodReceiver); @@ -16669,6 +16708,19 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) return 0; } + +/* We know anObject has not a hash yet (or this trampoline would not be + called. Sets the hash, then answers it as a smallinteger */ + + /* CoInterpreter>>#ceNewHashOf: */ +sqInt +ceNewHashOf(sqInt anObject) +{ + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); + return (((usqInt)(newHashBitsOf(anObject)) << 1) | 1); +} + /* CoInterpreter>>#ceNonLocalReturn: */ sqInt ceNonLocalReturn(sqInt returnValue) @@ -16939,8 +16991,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -17356,7 +17409,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17472,7 +17524,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17505,7 +17556,7 @@ ceSendMustBeBooleanTointerpretingAtDelta(sqInt aNonBooleanObject, sqInt jumpSize sqInt oop; char *p; char *sp; - sqInt startBcpc; + unsigned short startBcpc; sqInt top; assert(addressCouldBeOop(aNonBooleanObject)); @@ -17658,18 +17709,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -17753,7 +17808,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18080,7 +18134,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -19059,7 +19113,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -19173,7 +19227,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) numArgs = ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory()) ? ((mframeCogMethod(theFP))->cmNumArgs) : byteAt((theFP + FoxIFrameFlags) + 1)); - offset = ((sqInt) ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))))); + offset = (FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))); oop = longAt(theFP + offset); if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -19819,7 +19873,7 @@ lookupLexicalNoMNUfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -20115,18 +20169,22 @@ lookupOuterSendNoMNUdepth(sqInt methodReceiver, sqInt depth) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -20163,7 +20221,7 @@ lookupProtectedNoMNUstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -20566,7 +20624,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -21162,18 +21220,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -21200,7 +21259,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -21583,7 +21642,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -21648,7 +21707,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -21711,8 +21770,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -21830,7 +21889,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -22765,7 +22824,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -22919,6 +22978,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -23119,6 +23181,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -23366,15 +23429,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -23431,6 +23506,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -23443,8 +23519,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -23619,6 +23697,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -23967,7 +24046,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -24059,7 +24138,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -24449,8 +24528,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -24623,6 +24703,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -24943,8 +25024,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -24952,14 +25032,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -24988,8 +25068,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -24997,14 +25076,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -25035,8 +25114,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -25044,14 +25122,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -26727,8 +26805,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -26736,14 +26813,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -26767,8 +26844,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -26776,14 +26852,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l21; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -26809,8 +26885,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -26818,14 +26893,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -26848,6 +26923,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -27300,16 +27376,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -27350,7 +27426,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -27505,7 +27581,7 @@ noInlineSigned32BitValueGutsOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -27904,7 +27980,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -27942,7 +28017,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -28713,8 +28788,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28893,8 +28968,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29075,7 +29150,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -29260,8 +29335,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29660,7 +29735,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -29754,8 +29829,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -29983,7 +30058,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30249,7 +30324,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30512,7 +30587,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -30947,7 +31022,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -30957,7 +31032,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -30968,7 +31043,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -30985,7 +31060,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -30997,8 +31072,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -31016,7 +31090,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -31134,7 +31208,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -31735,8 +31809,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -31802,7 +31876,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -31860,7 +31934,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -32588,8 +32662,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -32597,14 +32670,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -32629,8 +32702,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -32638,14 +32710,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -32672,8 +32744,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -32681,14 +32752,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -32720,7 +32791,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -32963,6 +33034,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -33195,7 +33313,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -33381,7 +33499,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -33556,7 +33674,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -34648,7 +34766,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -34884,7 +35002,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -35203,7 +35321,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -35297,7 +35415,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -35358,7 +35476,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -35511,8 +35629,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -35520,18 +35637,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -35554,8 +35671,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -35563,18 +35679,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -35586,8 +35702,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -35595,22 +35710,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -35834,7 +35949,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -35850,28 +35965,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = ((usqInt) numSlots2) >> 1; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ setIsMarkedOfto(stack, 1); current = GIV(specialObjectsOop); @@ -35886,28 +36001,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots3) >> 1; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -35917,7 +36032,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -35927,7 +36041,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -35966,7 +36079,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & 1) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -35988,7 +36101,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -36025,28 +36138,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots) >> 1; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -36061,13 +36174,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 1); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -37050,7 +37163,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -37111,7 +37224,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -38351,7 +38464,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -39459,8 +39572,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -39468,14 +39580,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39500,8 +39612,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -39509,14 +39620,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -39543,8 +39654,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -39552,14 +39662,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -39818,7 +39928,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -40065,8 +40175,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40074,14 +40183,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40102,8 +40211,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40111,14 +40219,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40141,8 +40249,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40150,14 +40257,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -40300,18 +40407,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1))) != 7)) { return 0; @@ -40382,8 +40493,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40791,9 +40901,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -40968,7 +41078,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -41037,7 +41147,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -41133,7 +41243,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -41149,7 +41259,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -41160,7 +41270,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -41614,8 +41724,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41623,14 +41732,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41653,8 +41762,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -41662,14 +41770,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -41715,8 +41823,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41724,14 +41831,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -41855,16 +41962,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; unsigned int header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -41894,12 +42000,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -41929,16 +42034,15 @@ copyAndForwardMourner(sqInt mourner) then corpse is threaded onto the weakList for later treatment. */ /* SpurGenerationScavenger>>#copyAndForward: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForward(sqInt survivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; unsigned int header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -41984,12 +42088,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -42024,12 +42127,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -42227,7 +42330,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -42741,7 +42844,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - sqInt ptr; + usqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -42757,8 +42860,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -42886,7 +42988,7 @@ scavengeReferentsOf(sqInt referrer) sqInt header; sqInt header1; sqInt i; - usqInt newLocation; + sqInt newLocation; sqInt numLiterals; sqInt numSlots; usqInt numSlots1; @@ -43212,8 +43314,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43221,14 +43322,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43254,8 +43355,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -43263,14 +43363,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43285,8 +43385,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -43294,14 +43393,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -43675,7 +43774,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -43683,7 +43782,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -43694,8 +43793,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43736,8 +43834,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43745,14 +43842,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43791,8 +43888,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -43839,8 +43935,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43848,14 +43943,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -43904,8 +43999,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -43913,14 +44007,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43966,8 +44060,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -44021,8 +44114,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -44030,14 +44122,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -44096,7 +44188,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -44113,7 +44205,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -44213,8 +44305,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44250,8 +44341,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44259,14 +44349,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44303,8 +44393,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -44312,14 +44401,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44349,8 +44438,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44358,14 +44446,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -44476,8 +44564,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44485,14 +44572,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44516,8 +44603,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44525,14 +44611,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -44558,8 +44644,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44567,14 +44652,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -44616,8 +44701,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44625,14 +44709,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -45720,8 +45804,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45729,14 +45812,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45781,8 +45864,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45790,14 +45872,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -45877,8 +45959,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45886,14 +45967,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -46049,12 +46130,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46097,8 +46178,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46106,14 +46186,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46164,12 +46244,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46212,8 +46292,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46221,14 +46300,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46322,12 +46401,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -46387,8 +46466,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46396,14 +46474,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -46453,7 +46531,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -46494,7 +46572,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -47088,8 +47166,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47097,14 +47174,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -47530,8 +47607,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47539,14 +47615,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47578,8 +47654,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -47587,14 +47662,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47628,8 +47703,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -47637,14 +47711,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -47930,7 +48004,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -48186,8 +48259,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48195,14 +48267,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48225,8 +48297,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48234,14 +48305,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -48477,8 +48548,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48486,14 +48556,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48526,8 +48596,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48535,14 +48604,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48577,8 +48646,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48586,14 +48654,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -48673,8 +48741,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48682,14 +48749,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48719,8 +48786,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48728,14 +48794,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48767,8 +48833,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48776,14 +48841,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49343,7 +49408,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -49668,8 +49733,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49677,14 +49741,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49707,8 +49771,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -49716,14 +49779,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49748,8 +49811,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49757,14 +49819,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -49822,7 +49884,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -49830,7 +49892,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -49869,10 +49931,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -49923,8 +49985,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49932,14 +49993,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -49976,11 +50037,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -51444,8 +51505,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -51467,8 +51527,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51512,7 +51571,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop1 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -51520,7 +51579,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex1 & TopHashBit) { if ((classIndex1 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex1 - TopHashBit)) << (shiftForWord()))))); @@ -51528,7 +51587,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } else { @@ -51536,11 +51595,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex1 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) { @@ -51550,7 +51609,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -51558,11 +51617,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } } assert(!(isOopForwarded(objOop1))); @@ -51575,8 +51634,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -51584,17 +51642,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l22; + goto l23; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l26: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -51618,7 +51676,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -51635,7 +51693,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -51656,8 +51714,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -51665,17 +51722,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -51683,8 +51740,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -51692,17 +51748,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -51722,7 +51778,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop2)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -51782,8 +51837,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -51791,14 +51845,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l33; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l33: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -51924,8 +51978,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51933,14 +51986,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -51970,8 +52023,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -51979,14 +52031,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52009,8 +52061,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52018,14 +52069,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -52131,8 +52182,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -52140,14 +52190,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52201,8 +52251,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52210,14 +52259,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -52273,8 +52322,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -52282,14 +52330,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -52321,7 +52369,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -52430,7 +52478,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52456,7 +52504,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52481,7 +52529,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52507,7 +52555,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52530,8 +52578,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52539,14 +52586,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -53026,7 +53073,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -53268,7 +53315,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -53388,6 +53435,19 @@ maybeSplObj(sqInt index) : 0); } + /* SpurMemoryManager>>#newHashBitsOf: */ +static sqInt NoDbgRegParms +newHashBitsOf(sqInt objOop) +{ + sqInt hash; + + hash = (newObjectHash()) & (identityHashHalfWordMask()); + /* begin setHashBitsOf:to: */ + assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))); + long32Atput(objOop + 4, ((((long32At(objOop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); + return hash; +} + /* Use a slight variation on D.H. Lehmer's linear congruential generator from 1951. See e.g. http://en.wikipedia.org/wiki/Linear_congruential_generator. */ @@ -53628,8 +53688,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53665,7 +53724,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -53680,7 +53739,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -53944,8 +54003,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53967,8 +54025,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -53991,8 +54048,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -54013,8 +54069,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -54092,8 +54147,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54101,14 +54155,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54130,8 +54184,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54139,14 +54192,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -54171,8 +54224,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54180,14 +54232,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -54296,8 +54348,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54383,8 +54434,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54392,14 +54442,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -54434,8 +54484,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -54443,14 +54492,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54478,8 +54527,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54487,14 +54535,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -54637,8 +54685,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55127,8 +55174,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55136,14 +55182,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55174,8 +55220,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55183,14 +55228,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55223,8 +55268,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55232,14 +55276,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55343,8 +55387,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55352,14 +55395,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55397,8 +55440,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55406,14 +55448,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55453,8 +55495,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55462,14 +55503,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55595,8 +55636,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55604,14 +55644,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55641,8 +55681,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55650,14 +55689,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55680,8 +55719,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55689,14 +55727,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -55772,8 +55810,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55781,14 +55818,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55816,8 +55853,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55825,14 +55861,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -55855,8 +55891,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55864,14 +55899,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -56217,8 +56252,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56226,14 +56260,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56263,8 +56297,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56272,14 +56305,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56302,8 +56335,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56311,14 +56343,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56444,8 +56476,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56453,14 +56484,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56489,8 +56520,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56498,14 +56528,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56536,8 +56566,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56545,14 +56574,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56635,8 +56664,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56644,14 +56672,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56687,8 +56715,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56696,14 +56723,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56741,8 +56768,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56750,14 +56776,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56841,8 +56867,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56850,14 +56875,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56887,8 +56912,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56896,14 +56920,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56926,8 +56950,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56935,14 +56958,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57152,8 +57175,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57161,14 +57183,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57196,8 +57218,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -57205,14 +57226,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57233,8 +57254,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57242,14 +57262,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57324,13 +57344,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57338,15 +57358,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57363,7 +57383,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57387,8 +57407,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -57396,14 +57415,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57424,13 +57443,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57438,15 +57457,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57463,7 +57482,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57487,8 +57506,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57496,14 +57514,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57525,13 +57543,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -57539,15 +57557,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -57564,7 +57582,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -57589,8 +57607,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57598,14 +57615,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58010,7 +58027,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -58020,8 +58036,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -58072,7 +58087,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -58265,6 +58280,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -58380,7 +58405,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -58397,7 +58422,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -58421,7 +58446,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -58438,7 +58463,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -58504,8 +58529,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -58668,7 +58692,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -59350,11 +59374,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -59369,7 +59393,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -59383,8 +59407,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59392,16 +59415,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -59425,8 +59448,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59434,14 +59456,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -59461,16 +59483,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -59479,11 +59501,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -59491,7 +59513,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -59559,8 +59581,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -59568,14 +59589,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -59674,8 +59695,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59695,8 +59715,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -59704,14 +59723,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -59769,8 +59788,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59847,7 +59865,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -59869,7 +59887,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -59918,7 +59936,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -59932,8 +59950,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59941,16 +59958,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -60015,8 +60032,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60024,14 +60040,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -60050,9 +60066,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -60068,9 +60081,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -60098,9 +60110,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -60111,8 +60122,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60122,9 +60132,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -60182,7 +60191,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -60257,8 +60266,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60314,8 +60322,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60323,14 +60330,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -60393,8 +60400,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60402,14 +60408,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -60526,8 +60532,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60535,14 +60540,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -60582,7 +60587,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -60748,13 +60753,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l66; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l66: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l65; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -60762,15 +60767,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l65; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l65; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l65; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -60787,7 +60792,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals1 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l65: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -60814,8 +60819,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -60823,14 +60827,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -60842,7 +60846,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -60855,13 +60859,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -60869,15 +60873,15 @@ updatePointers(void) numPointerSlots2 = (numSlots5 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots5); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -60894,7 +60898,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals2 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -60922,8 +60926,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots22 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots22 + (numSlots22 & 1)) << (shiftForWord()); @@ -60931,16 +60934,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l39; + goto l40; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l39: /* end objectAfter:limit: */; + l40: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -60981,13 +60984,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -60995,15 +60998,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -61020,7 +61023,7 @@ updatePointers(void) assert((header4 & 1)); numLiterals3 = ((header4 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -61057,8 +61060,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -61093,7 +61095,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -61106,8 +61108,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -61115,18 +61116,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -61149,13 +61150,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -61163,15 +61164,15 @@ updatePointers(void) numPointerSlots = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -61188,7 +61189,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i = 0; i < numPointerSlots; i += 1) { /* begin fetchPointer:ofObject: */ oop = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))); @@ -61217,8 +61218,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61226,14 +61226,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } } @@ -61435,8 +61435,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61444,14 +61443,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -61536,7 +61535,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -61636,8 +61635,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -61804,7 +61803,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -61920,8 +61919,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61929,24 +61927,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -62009,8 +62007,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -62239,8 +62237,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); @@ -62743,8 +62741,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -62752,14 +62749,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -62780,8 +62777,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -62789,14 +62785,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -62819,8 +62815,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -62828,14 +62823,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -63550,7 +63545,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -63560,7 +63555,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -63648,9 +63643,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -63756,6 +63751,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -64420,8 +64444,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -64429,14 +64452,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -64488,8 +64511,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -64497,14 +64519,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64558,8 +64580,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -64567,20 +64588,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -64613,8 +64634,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64622,14 +64642,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64654,8 +64674,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -64663,14 +64682,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64697,8 +64716,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -64706,16 +64724,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -64840,8 +64858,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -64915,8 +64934,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -65006,8 +65026,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66400,8 +66421,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -67508,7 +67530,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -67660,7 +67682,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67847,7 +67869,7 @@ lookupMNU(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68007,7 +68029,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68178,7 +68200,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68360,7 +68382,7 @@ lookupOrdinarySend(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68523,7 +68545,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68678,7 +68700,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -68845,7 +68867,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -69192,8 +69214,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -69245,7 +69268,6 @@ marryFrameSP(char *theFP, char *theSP) cogMethod = ((CogMethod *) (methodFieldOrObj & MFMethodMask)); numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { - /* begin nilObject */ closureOrNil = GIV(nilObj); } @@ -69269,11 +69291,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -69472,18 +69492,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -69639,7 +69660,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69824,6 +69845,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -69879,7 +69933,7 @@ popthenPush(sqInt nItems, sqInt oop) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -70331,8 +70385,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -70340,14 +70393,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -70378,8 +70431,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -70387,14 +70439,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70418,8 +70470,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -70427,14 +70478,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -71188,7 +71239,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71199,23 +71250,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71231,38 +71282,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71275,7 +71326,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71283,7 +71334,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -71294,7 +71345,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71308,7 +71359,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71321,12 +71372,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71337,7 +71388,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71345,9 +71396,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71361,8 +71412,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71370,14 +71420,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71424,7 +71474,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71435,23 +71485,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71467,38 +71517,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71511,7 +71561,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71519,7 +71569,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -71530,7 +71580,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71544,7 +71594,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71557,12 +71607,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71573,7 +71623,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71581,9 +71631,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71597,8 +71647,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71606,14 +71655,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71661,7 +71710,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71672,23 +71721,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71704,38 +71753,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71748,7 +71797,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71756,7 +71805,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -71767,7 +71816,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71781,7 +71830,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71794,12 +71843,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71810,7 +71859,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71818,9 +71867,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71835,8 +71884,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71844,14 +71892,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -73156,11 +73204,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73304,7 +73354,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); header = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); if ((header & 1)) { @@ -73415,14 +73465,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -73439,6 +73498,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -73451,21 +73511,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -73481,12 +73545,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -73502,6 +73569,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -73515,11 +73583,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73545,6 +73616,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -74947,7 +75022,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -75062,7 +75137,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -76184,8 +76259,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -78306,7 +78381,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -78663,7 +78738,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -78700,7 +78775,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -79003,7 +79078,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -79155,7 +79230,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -79359,7 +79434,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -79651,8 +79726,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -79702,8 +79778,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -79790,7 +79868,6 @@ primitiveVMParameter(void) char *sp; char *sp1; char *sp2; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -79840,6 +79917,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -79849,165 +79927,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -80015,9 +80057,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -80025,22 +80067,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -80048,192 +80090,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer47 = getCodeCompactionMSecs(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -80262,7 +80209,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -80295,14 +80242,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -80378,7 +80328,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -80492,47 +80442,37 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l85; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l85: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -80587,7 +80527,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -80609,12 +80550,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l66; + goto l78; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l66: /* end setCogVMFlags: */; + l78: /* end setCogVMFlags: */; } } if (index == 49) { @@ -80637,14 +80578,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l83; + goto l86; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l83: /* end floatValueOf: */; + l86: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -80855,8 +80796,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -80864,14 +80804,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -80906,8 +80846,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -80915,14 +80854,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -80950,8 +80889,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -80959,14 +80897,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -80991,6 +80929,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -81038,6 +80977,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/nsspursrc/vm/interp.h b/nsspursrc/vm/interp.h index 5139ecb29..5ca436eb6 100644 --- a/nsspursrc/vm/interp.h +++ b/nsspursrc/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 4 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1073741824 #define MaxSmallInteger 1073741823 diff --git a/nsspursrc/vm/vmCallback.h b/nsspursrc/vm/vmCallback.h index 48d07f100..3bf23acc7 100644 --- a/nsspursrc/vm/vmCallback.h +++ b/nsspursrc/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/nsspurstack64src/vm/gcc3x-interp.c b/nsspurstack64src/vm/gcc3x-interp.c index c4347dd79..eb0a44c7f 100644 --- a/nsspurstack64src/vm/gcc3x-interp.c +++ b/nsspurstack64src/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -471,6 +471,7 @@ static void primitiveForceDisplayUpdate(void); static void primitiveFormPrint(void); static void primitiveFractionalPart(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -637,6 +638,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -664,7 +666,7 @@ static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -926,8 +928,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -994,6 +996,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1095,14 +1098,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1245,6 +1249,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1551,6 +1556,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1564,11 +1571,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1600,6 +1605,7 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; @@ -1621,7 +1627,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; #undef _iss #if SQ_USE_GLOBAL_STRUCT } fum; @@ -1650,6 +1655,7 @@ static struct foo * foo = &fum; static void (*primitiveFunctionPointer)(); sqInt checkForLeaks; sqInt checkAllocFiller; +sqInt debugCallbackPath; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; @@ -1661,6 +1667,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; char * breakSelector; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2242,7 +2251,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.2142"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.2165"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -4824,7 +4833,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l884; + goto l882; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -4873,7 +4882,7 @@ interpret(void) if (((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) && (home == (longAt(theFP2 + FoxThisContext)))) { ctxtOrNilOrZero = 0; - goto l891; + goto l889; } if (!((byteAt((theFP2 + FoxFrameFlags) + 3)) != 0)) { theMethod1 = longAt(theFP2 + FoxMethod); @@ -4890,10 +4899,10 @@ interpret(void) if ((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(theFP2))); ctxtOrNilOrZero = longAt(theFP2 + FoxThisContext); - goto l891; + goto l889; } ctxtOrNilOrZero = marryFrameSP(theFP2, theSP); - goto l891; + goto l889; } } theFPAbove = theFP2; @@ -4904,10 +4913,10 @@ interpret(void) && (((longAt(senderContext)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { /* begin nilObject */ ctxtOrNilOrZero = GIV(nilObj); - goto l891; + goto l889; } ctxtOrNilOrZero = findMethodWithPrimitiveFromContextUpToContext(198, senderContext, home); - l891: /* end findMethodWithPrimitive:FromFP:UpToContext: */; + l889: /* end findMethodWithPrimitive:FromFP:UpToContext: */; assert(!((onSamePage && (ctxtOrNilOrZero == (nilObject()))))); if (ctxtOrNilOrZero == 0) { @@ -4915,21 +4924,21 @@ interpret(void) theMethod = longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord()))))); if ((primitiveIndexOfMethodheader(theMethod, methodHeaderOf(theMethod))) == 198) { unwindContextOrNilOrZero = home; - goto l911; + goto l909; } unwindContextOrNilOrZero = 0; - goto l911; + goto l909; } if (!(onSamePage || (ctxtOrNilOrZero == GIV(nilObj)))) { if ((findMethodWithPrimitiveFromContextUpToContext(0, ctxtOrNilOrZero, home)) == GIV(nilObj)) { /* begin nilObject */ unwindContextOrNilOrZero = GIV(nilObj); - goto l911; + goto l909; } } unwindContextOrNilOrZero = ctxtOrNilOrZero; - l911: /* end findUnwindThroughContext: */; + l909: /* end findUnwindThroughContext: */; if (unwindContextOrNilOrZero == GIV(nilObj)) { /* error: can't find home on chain; cannot return */ @@ -4937,10 +4946,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l912; + goto l910; } ourContext = marryFrameSP(localFP, localSP); - l912: /* end ensureFrameIsMarried:SP: */; + l910: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -4950,17 +4959,17 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l884; + goto l882; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l894; + goto l892; } ourContext1 = marryFrameSP(localFP, localSP); - l894: /* end ensureFrameIsMarried:SP: */; + l892: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -4972,7 +4981,7 @@ interpret(void) GIV(argumentCount) = 2; goto normalSend; /* return self */ - goto l884; + goto l882; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5009,30 +5018,30 @@ interpret(void) if (!(((contextToReturnTo & (tagMask())) == 0) && (((longAt(contextToReturnTo)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { frameToReturnTo = 0; - goto l898; + goto l896; } if (((((longAt((contextToReturnTo + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (isWidowedContext(contextToReturnTo)) { /* error: home's sender is dead; cannot return */ frameToReturnTo = 0; - goto l898; + goto l896; } /* begin frameOfMarriedContext: */ senderOop2 = longAt((contextToReturnTo + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop2) & 7) == 1)); frameToReturnTo = pointerForOop(senderOop2 - 1); - goto l898; + goto l896; } if (!(((((longAt((contextToReturnTo + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))))) & 7) == 1))) { frameToReturnTo = 0; - goto l898; + goto l896; } thePage1 = makeBaseFrameFor(contextToReturnTo); markStackPageMostRecentlyUsed(thePage1); frameToReturnTo = (thePage1->baseFP); - l898: /* end establishFrameForContextToReturnTo: */; + l896: /* end establishFrameForContextToReturnTo: */; if (frameToReturnTo == 0) { /* error: home's sender is dead; cannot return */ @@ -5040,10 +5049,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l913; + goto l911; } ourContext2 = marryFrameSP(localFP, localSP); - l913: /* end ensureFrameIsMarried:SP: */; + l911: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5053,7 +5062,7 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l884; + goto l882; } } assert(pageListIsWellFormed()); @@ -5133,7 +5142,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l884: /* end case */; + l882: /* end case */; BREAK; CASE(121) /* returnTrue */ @@ -5234,18 +5243,18 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l925; + goto l923; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l925; + goto l923; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l925: /* end findFrameAbove:inPage: */; + l923: /* end findFrameAbove:inPage: */; moveFramesInthroughtoPage(thePage, frameAbove, GIV(stackPage)); theFP = (thePage->headFP); theSP = (thePage->headSP); @@ -5258,10 +5267,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l916; + goto l914; } ourContext = marryFrameSP(localFP, localSP); - l916: /* end ensureFrameIsMarried:SP: */; + l914: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5271,7 +5280,7 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l922; + goto l920; } thePage = makeBaseFrameFor(contextToReturnTo); theFP = (thePage->headFP); @@ -5302,8 +5311,8 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); /* return self */ - l922: /* end baseFrameReturn */; - goto l915; + l920: /* end baseFrameReturn */; + goto l913; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)((byteAt((localFP + FoxFrameFlags) + 1))) << (shiftForWord()))))); @@ -5320,7 +5329,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l915: /* end case */; + l913: /* end case */; BREAK; CASE(126) CASE(127) @@ -5348,10 +5357,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l927; + goto l925; } ourContext = marryFrameSP(localFP, localSP); - l927: /* end ensureFrameIsMarried:SP: */; + l925: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -5771,7 +5780,7 @@ interpret(void) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l942; + goto l929; } /* second probe */ @@ -5780,14 +5789,14 @@ interpret(void) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l942; + goto l929; } probe1 = (((usqInt) hash1) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe1 + MethodCacheSelector]) == GIV(messageSelector)) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l942; + goto l929; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -5804,7 +5813,7 @@ interpret(void) GIV(lkupClassTag) = handleForwardedSendFaultForTag(GIV(lkupClassTag)); } if (lookupInMethodCacheSelclassTag(GIV(messageSelector), GIV(lkupClassTag))) { - goto l933; + goto l939; } } /* begin classForClassTag: */ @@ -5817,12 +5826,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l938; + goto l932; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l938: /* end classForClassTag: */; + l932: /* end classForClassTag: */; lookupOrdinarySend(); /* begin internalizeIPandSP */ @@ -5830,8 +5839,8 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); - l942: ; - l933: /* end internalFindNewMethodOrdinary */; + l929: ; + l939: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -5844,28 +5853,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l941; + goto l934; } if (localPrimIndex == 256) { - goto l941; + goto l934; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l941; + goto l934; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l941; + goto l934; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l941; + goto l934; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l941; + goto l934; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -5901,7 +5910,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l941; + goto l934; } } /* begin internalActivateNewMethod */ @@ -5961,11 +5970,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l937; + goto l936; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l937: /* end getErrorObjectFromPrimFailCode */; + l936: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -5985,7 +5994,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l941: /* end internalExecuteNewMethod */; + l934: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6402,18 +6411,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -6523,7 +6536,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -6736,9 +6749,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt blockSize; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -6766,7 +6778,6 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l139: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -6805,7 +6816,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -7538,7 +7549,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l961; + goto l958; } if (bytecode == 172) { @@ -7547,7 +7558,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l961; + goto l958; } if (bytecode > 167) { @@ -7557,7 +7568,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l961; + goto l958; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -7565,7 +7576,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l961: /* end case */; + l958: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -7723,7 +7734,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l964; + goto l961; } if (bytecode == 172) { @@ -7733,14 +7744,14 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l964; + goto l961; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l964: /* end case */; + l961: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -9084,7 +9095,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -10636,7 +10647,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l965; + goto l962; } if (bytecode == 244) { @@ -10645,7 +10656,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l965; + goto l962; } if (bytecode == 243) { @@ -10655,7 +10666,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l965; + goto l962; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10663,7 +10674,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l965: /* end case */; + l962: /* end case */; BREAK; CASE(339) /*83*/ /* bytecodePrimGreaterThanV4 */ @@ -10821,7 +10832,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + (bytecode - 207)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l968; + goto l965; } if (bytecode == 244) { @@ -10831,14 +10842,14 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l968; + goto l965; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l968: /* end case */; + l965: /* end case */; BREAK; CASE(340) /*84*/ /* bytecodePrimLessOrEqualV4 */ @@ -12182,7 +12193,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -13395,7 +13406,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -14051,7 +14062,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif usqInt length; sqInt literal; sqInt localPrimIndex; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt methodReceiver; @@ -14119,12 +14130,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l991; + goto l975; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l991: /* end classAtIndex: */; + l975: /* end classAtIndex: */; /* begin lookupImplicitReceiverSend */ GIV(messageSelector) = (((GIV(messageSelector) & (tagMask())) == 0) && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) @@ -14147,18 +14158,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + candidateMixin = objOop2; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -14214,12 +14229,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif } GIV(newMethod) = objOop12; found = 1; - goto l989; + goto l990; } index += 1; } found = 0; - goto l989; + goto l990; } /* It is assumed that there are some nils in this dictionary, and search will @@ -14244,7 +14259,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { found = 0; - goto l989; + goto l990; } if (((nextSelector & (tagMask())) == 0) && (((longAt(nextSelector)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -14266,24 +14281,24 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif } GIV(newMethod) = objOop3; found = 1; - goto l989; + goto l990; } index += 1; if (index == length) { if (wrapAround) { found = 0; - goto l989; + goto l990; } wrapAround = 1; index = SelectorStart; } } found = 0; - l989: /* end lookupMethodInDictionary: */; + l990: /* end lookupMethodInDictionary: */; if (found) { GIV(localAbsentReceiver) = candidateReceiver; actualLookupRule = lookupLexicalfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l975; + goto l977; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((sqInt)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -14303,7 +14318,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits2) << (shiftForWord()))))) : fetchClassOfNonImm(methodReceiver)); actualLookupRule = lookupProtectedstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l975: /* end lookupImplicitReceiverSend */; + l977: /* end lookupImplicitReceiverSend */; /* begin internalizeIPandSP */ localIP = pointerForOop(GIV(instructionPointer)); localSP = pointerForOop(GIV(stackPointer)); @@ -14334,28 +14349,28 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l974; + goto l986; } if (localPrimIndex == 256) { - goto l974; + goto l986; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l974; + goto l986; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l974; + goto l986; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l974; + goto l986; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l974; + goto l986; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14391,7 +14406,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l974; + goto l986; } } /* begin internalActivateNewMethod */ @@ -14451,11 +14466,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l981; + goto l996; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l981: /* end getErrorObjectFromPrimFailCode */; + l996: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14475,7 +14490,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l974: /* end internalExecuteNewMethod */; + l986: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14550,7 +14565,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l1020; + goto l1026; } /* second probe */ @@ -14562,7 +14577,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l1020; + goto l1026; } probe1 = (((usqInt) hash1) >> 2) & NSMethodCacheMask; if (((((GIV(nsMethodCache)[probe1 + NSMethodCacheSelector]) == GIV(messageSelector)) @@ -14572,7 +14587,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l1020; + goto l1026; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14599,12 +14614,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l1016; + goto l1011; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l1016: /* end classForClassTag: */; + l1011: /* end classForClassTag: */; /* begin lookupDynamicSuperSend */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14622,18 +14637,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord()))))) : fetchClassOfNonImm(GIV(localAbsentReceiver)))); @@ -14650,7 +14669,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToNSCache(actualLookupRule); - l1020: ; + l1026: ; /* begin shuffleArgumentsAndStoreAbsentReceiver: */ @@ -14676,28 +14695,28 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l1022; + goto l1010; } if (localPrimIndex == 256) { - goto l1022; + goto l1010; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l1022; + goto l1010; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l1022; + goto l1010; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l1022; + goto l1010; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l1022; + goto l1010; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14733,7 +14752,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l1022; + goto l1010; } } /* begin internalActivateNewMethod */ @@ -14793,11 +14812,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l1038; + goto l1022; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l1038: /* end getErrorObjectFromPrimFailCode */; + l1022: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14817,7 +14836,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l1022: /* end internalExecuteNewMethod */; + l1010: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -15008,12 +15027,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l800; + goto l815; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l800: /* end classAtIndex: */; + l815: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -15031,18 +15050,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < 0) { count += 1; @@ -15089,28 +15112,28 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l809; + goto l799; } if (localPrimIndex == 256) { - goto l809; + goto l799; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l809; + goto l799; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l809; + goto l799; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l809; + goto l799; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l809; + goto l799; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -15146,7 +15169,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l809; + goto l799; } } /* begin internalActivateNewMethod */ @@ -15206,11 +15229,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l799; + goto l810; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l799: /* end getErrorObjectFromPrimFailCode */; + l810: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -15230,7 +15253,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l809: /* end internalExecuteNewMethod */; + l799: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -15254,15 +15277,15 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l825; + goto l824; } else { goto respondToUnknownBytecode; - goto l825; + goto l824; } } - l825: /* end case */; + l824: /* end case */; BREAK; CASE(509) /*253*/ /* extPushClosureBytecode */ @@ -15271,9 +15294,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt byte; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -15293,12 +15315,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l854; + goto l853; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); - l854: /* end ensureFrameIsMarried:SP: */; + l853: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -15324,20 +15345,20 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l846; + goto l845; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l846: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l845: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -15447,12 +15468,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l859; + goto l873; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l859: /* end classAtIndex: */; + l873: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -15470,18 +15491,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -15528,28 +15553,28 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l868; + goto l857; } if (localPrimIndex == 256) { - goto l868; + goto l857; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l868; + goto l857; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l868; + goto l857; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l868; + goto l857; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l868; + goto l857; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -15585,7 +15610,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l868; + goto l857; } } /* begin internalActivateNewMethod */ @@ -15645,11 +15670,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l858; + goto l868; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l858: /* end getErrorObjectFromPrimFailCode */; + l868: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -15669,7 +15694,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l868: /* end internalExecuteNewMethod */; + l857: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -16129,16 +16154,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -16165,7 +16190,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -16274,7 +16299,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -16343,7 +16368,7 @@ positive64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -16731,7 +16756,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -17492,8 +17516,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17672,8 +17696,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17989,8 +18013,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -18394,7 +18418,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -18618,7 +18642,7 @@ primitiveClosureValue(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -18741,7 +18765,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -18861,7 +18885,7 @@ primitiveClosureValueWithArgs(void) sqInt i; sqInt index; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -19159,7 +19183,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -19169,7 +19193,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -19180,7 +19204,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -19197,7 +19221,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -19209,8 +19233,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -19228,7 +19251,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -19346,7 +19369,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -21276,8 +21299,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -21285,14 +21307,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -21317,8 +21339,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -21326,14 +21347,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -21360,8 +21381,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -21369,14 +21389,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -21408,7 +21428,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -21601,6 +21621,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -21833,7 +21900,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -23322,7 +23389,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -23560,7 +23627,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -23880,7 +23947,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -23974,7 +24041,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -24034,7 +24101,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -24187,8 +24254,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -24196,18 +24262,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -24230,8 +24296,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -24239,18 +24304,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -24262,8 +24327,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -24271,22 +24335,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -26125,7 +26189,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -29716,8 +29780,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -29725,14 +29788,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -29757,8 +29820,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -29766,14 +29828,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -29800,8 +29862,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -29809,14 +29870,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -30182,7 +30243,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -30271,7 +30332,7 @@ signed64BitValueOf(sqInt oop) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -30573,8 +30634,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -30981,9 +31041,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -31160,7 +31220,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -31232,6 +31292,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -31263,7 +31334,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -31384,7 +31455,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -31396,7 +31467,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -31407,7 +31478,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -31875,8 +31946,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31884,14 +31954,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -31914,8 +31984,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -31923,14 +31992,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -31976,8 +32045,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31985,14 +32053,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -32124,7 +32192,6 @@ copyAndForwardMourner(sqInt mourner) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -32154,12 +32221,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -32197,7 +32263,6 @@ copyAndForward(sqInt survivor) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -32243,12 +32308,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -32282,12 +32346,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -32486,7 +32550,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -33013,8 +33077,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -33449,8 +33512,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -33458,14 +33520,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -33491,8 +33553,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -33500,14 +33561,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -33522,8 +33583,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -33531,14 +33591,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -33912,7 +33972,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -33920,7 +33980,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -33931,8 +33991,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -33973,8 +34032,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -33982,14 +34040,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -34028,8 +34086,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -34076,8 +34133,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -34085,14 +34141,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -34140,8 +34196,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -34149,14 +34204,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -34201,8 +34256,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -34255,8 +34309,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -34264,14 +34317,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -34315,7 +34368,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -34334,7 +34387,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -34350,7 +34403,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -34450,8 +34503,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -34487,8 +34539,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -34496,14 +34547,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -34540,8 +34591,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -34549,14 +34599,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -34586,8 +34636,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -34595,14 +34644,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -34713,8 +34762,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -34722,14 +34770,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -34753,8 +34801,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -34762,14 +34809,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -34795,8 +34842,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -34804,14 +34850,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -34853,8 +34899,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -34862,14 +34907,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -35930,8 +35975,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -35939,14 +35983,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -35991,8 +36035,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -36000,14 +36043,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -36087,8 +36130,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -36096,14 +36138,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -36259,12 +36301,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -36307,8 +36349,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -36316,14 +36357,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -36374,12 +36415,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -36422,8 +36463,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -36431,14 +36471,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -36531,12 +36571,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -36595,8 +36635,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -36604,14 +36643,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -36661,7 +36700,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -36702,7 +36741,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -37296,8 +37335,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -37305,14 +37343,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -37381,8 +37419,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -37390,14 +37427,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -37418,8 +37455,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -37427,14 +37463,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -37457,8 +37493,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -37466,14 +37501,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -37856,8 +37891,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -37865,14 +37899,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -37904,8 +37938,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -37913,14 +37946,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -37954,8 +37987,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -37963,14 +37995,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -38256,7 +38288,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -38509,8 +38540,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -38518,14 +38548,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -38548,8 +38578,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -38557,14 +38586,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -38800,8 +38829,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -38809,14 +38837,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -38849,8 +38877,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -38858,14 +38885,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -38900,8 +38927,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -38909,14 +38935,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -38996,8 +39022,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -39005,14 +39030,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39042,8 +39067,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -39051,14 +39075,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -39090,8 +39114,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -39099,14 +39122,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -39704,7 +39727,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -40028,8 +40051,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40037,14 +40059,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40067,8 +40089,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -40076,14 +40097,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40108,8 +40129,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -40117,14 +40137,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -40182,7 +40202,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -40190,7 +40210,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -40229,10 +40249,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -40283,8 +40303,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40292,14 +40311,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -40335,11 +40354,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i1; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -41781,8 +41800,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -41804,8 +41822,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -41849,7 +41866,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -41857,7 +41874,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -41865,7 +41882,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -41873,11 +41890,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -41887,7 +41904,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -41895,11 +41912,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -41912,8 +41929,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -41921,17 +41937,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -41940,7 +41956,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -41959,7 +41975,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -41975,7 +41991,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -41996,8 +42012,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -42005,17 +42020,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -42023,8 +42038,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42032,17 +42046,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -42062,7 +42076,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -42120,8 +42133,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -42129,14 +42141,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -42262,8 +42274,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -42271,14 +42282,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -42308,8 +42319,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42317,14 +42327,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42347,8 +42357,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42356,14 +42365,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -42474,8 +42483,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -42483,14 +42491,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42549,8 +42557,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42558,14 +42565,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -42626,8 +42633,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -42635,14 +42641,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -42782,7 +42788,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -42810,7 +42816,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -42834,7 +42840,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -42862,7 +42868,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -42885,8 +42891,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42894,14 +42899,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -43387,7 +43392,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -43639,7 +43644,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -44010,8 +44015,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44047,7 +44051,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -44062,7 +44066,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -44310,8 +44314,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44333,8 +44336,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44357,8 +44359,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -44379,8 +44380,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -44458,8 +44458,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44467,14 +44466,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44496,8 +44495,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44505,14 +44503,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -44537,8 +44535,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44546,14 +44543,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -44665,8 +44662,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44762,8 +44758,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44771,14 +44766,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44817,8 +44812,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -44826,14 +44820,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44865,8 +44859,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44874,14 +44867,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -45022,8 +45015,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45502,8 +45494,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45511,14 +45502,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45549,8 +45540,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45558,14 +45548,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45598,8 +45588,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45607,14 +45596,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -45718,8 +45707,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45727,14 +45715,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45772,8 +45760,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45781,14 +45768,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45828,8 +45815,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45837,14 +45823,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -45970,8 +45956,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45979,14 +45964,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -46016,8 +46001,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46025,14 +46009,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46055,8 +46039,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46064,14 +46047,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -46147,8 +46130,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46156,14 +46138,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46191,8 +46173,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46200,14 +46181,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46230,8 +46211,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46239,14 +46219,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -46594,8 +46574,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46603,14 +46582,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -46640,8 +46619,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46649,14 +46627,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46679,8 +46657,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46688,14 +46665,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -46821,8 +46798,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46830,14 +46806,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46866,8 +46842,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46875,14 +46850,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46913,8 +46888,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46922,14 +46896,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -47017,8 +46991,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47026,14 +46999,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47074,8 +47047,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47083,14 +47055,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47133,8 +47105,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47142,14 +47113,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -47233,8 +47204,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47242,14 +47212,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -47279,8 +47249,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47288,14 +47257,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47318,8 +47287,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47327,14 +47295,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -47544,8 +47512,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47553,14 +47520,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -47588,8 +47555,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47597,14 +47563,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47625,8 +47591,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47634,14 +47599,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -47715,13 +47680,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -47729,15 +47694,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -47747,7 +47712,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -47771,8 +47736,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -47780,14 +47744,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47808,13 +47772,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -47822,15 +47786,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -47840,7 +47804,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -47864,8 +47828,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47873,14 +47836,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47902,13 +47865,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -47916,15 +47879,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -47934,7 +47897,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -47959,8 +47922,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47968,14 +47930,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -48401,7 +48363,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -48411,8 +48372,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -48463,7 +48423,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -48656,6 +48616,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -48756,7 +48726,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -48775,7 +48745,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -48791,7 +48761,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -48800,7 +48770,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -48819,7 +48789,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -48835,7 +48805,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -48899,8 +48869,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -49066,7 +49035,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -49748,11 +49717,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -49767,7 +49736,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -49783,8 +49752,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -49792,16 +49760,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -49827,8 +49795,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49836,14 +49803,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -49863,16 +49830,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -49881,11 +49848,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -49893,7 +49860,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -49963,8 +49930,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -49972,14 +49938,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -50078,8 +50044,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -50099,8 +50064,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -50108,14 +50072,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -50177,8 +50141,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -50257,7 +50220,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -50279,7 +50242,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -50328,7 +50291,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -50344,8 +50307,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50353,16 +50315,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -50433,8 +50395,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50442,14 +50403,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -50468,9 +50429,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -50486,9 +50444,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -50520,9 +50477,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -50533,8 +50489,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -50544,9 +50499,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -50604,7 +50558,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -50679,8 +50633,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -50736,8 +50689,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -50745,14 +50697,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -50817,8 +50769,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50826,14 +50777,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -50949,8 +50900,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50958,14 +50908,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -51004,7 +50954,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -51166,13 +51116,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l57; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l57: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l56; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -51180,15 +51130,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l56; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l56; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l56; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -51198,7 +51148,7 @@ updatePointers(void) numLiterals1 = ((header1 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l56: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -51225,8 +51175,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -51234,14 +51183,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -51253,7 +51202,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -51266,13 +51215,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l64; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l64: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l63; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -51280,15 +51229,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l63; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l63; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l63; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -51298,7 +51247,7 @@ updatePointers(void) numLiterals2 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l63: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -51326,8 +51275,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -51335,16 +51283,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -51385,13 +51333,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -51399,15 +51347,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -51417,7 +51365,7 @@ updatePointers(void) numLiterals3 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -51454,8 +51402,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -51490,7 +51437,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -51503,8 +51450,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -51512,18 +51458,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -51546,13 +51492,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l62; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l62: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l63; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -51560,15 +51506,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l63; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l63; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l63; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -51578,7 +51524,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l63: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -51607,8 +51553,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51616,14 +51561,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -51818,8 +51763,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51827,14 +51771,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -51919,7 +51863,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -52019,8 +51963,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -52187,7 +52131,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -52303,8 +52247,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -52312,24 +52255,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -52392,8 +52335,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -52622,8 +52565,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); @@ -53181,7 +53124,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -53275,8 +53217,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53284,14 +53225,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53312,8 +53253,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53321,14 +53261,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53351,8 +53291,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53360,14 +53299,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -54250,7 +54189,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -54260,7 +54199,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -54348,9 +54287,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -54456,6 +54395,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -55072,8 +55040,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -55081,14 +55048,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -55140,8 +55107,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -55149,14 +55115,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55210,8 +55176,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -55219,20 +55184,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -55265,8 +55230,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55274,14 +55238,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55306,8 +55270,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55315,14 +55278,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55349,8 +55312,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55358,16 +55320,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -55450,8 +55412,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -55528,8 +55491,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -55651,8 +55615,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -57183,8 +57148,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* To overflow the stack this must be a new frame, but in Cog base frames are married. */ assert(!(frameHasContext(GIV(framePointer)))); @@ -58369,7 +58335,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -58519,7 +58485,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -58704,7 +58670,7 @@ lookupMNU(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -58862,7 +58828,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -59042,7 +59008,7 @@ lookupOrdinarySend(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -59203,7 +59169,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -59356,7 +59322,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -59649,7 +59615,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -60139,8 +60105,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); GIV(method) = aMethodObj; @@ -60191,7 +60158,6 @@ marryFrameSP(char *theFP, char *theSP) numArgs = byteAt((theFP + FoxFrameFlags) + 1); numStack = (((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1)); if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) { - /* begin pushedReceiverOrClosureOfFrame: */ closureOrNil = longAt(theFP + (frameStackedReceiverOffset(theFP))); } else { @@ -60400,18 +60366,19 @@ longAt((methodPointer + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (sh objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* StackInterpreter>>#methodHeaderIndicatesLargeFrame: */ @@ -60727,6 +60694,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -60805,7 +60805,7 @@ positive32BitIntegerFor(unsigned int integerValue) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -61250,8 +61250,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -61259,14 +61258,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -61297,8 +61296,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -61306,14 +61304,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -61337,8 +61335,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -61346,14 +61343,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -62088,7 +62085,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -62099,7 +62096,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -62110,23 +62107,23 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l29; + goto l26; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l29; + goto l26; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l29; + goto l26; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -62142,39 +62139,39 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l29; + goto l26; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l29; + goto l26; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l29; + goto l26; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l29; + goto l26; } if (oop == GIV(nilObj)) { print("nil"); - goto l29; + goto l26; } if (oop == GIV(trueObj)) { print("true"); - goto l29; + goto l26; } if (oop == GIV(falseObj)) { print("false"); - goto l29; + goto l26; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l29; + goto l26; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -62187,7 +62184,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l29; + goto l26; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -62195,7 +62192,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l29; + goto l26; } } if ((nameLen == 9) @@ -62206,7 +62203,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l29; + goto l26; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -62220,7 +62217,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l29; + goto l26; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -62233,12 +62230,12 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l30; + goto l27; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -62249,7 +62246,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l30: ; + l27: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -62257,9 +62254,9 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l29: /* end printOopShortInner: */; + l26: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -62273,8 +62270,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62282,14 +62278,14 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l20; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -62341,7 +62337,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -62352,7 +62348,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -62363,23 +62359,23 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l32; + goto l29; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l32; + goto l29; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l32; + goto l29; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -62395,39 +62391,39 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l32; + goto l29; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l32; + goto l29; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l32; + goto l29; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l32; + goto l29; } if (oop == GIV(nilObj)) { print("nil"); - goto l32; + goto l29; } if (oop == GIV(trueObj)) { print("true"); - goto l32; + goto l29; } if (oop == GIV(falseObj)) { print("false"); - goto l32; + goto l29; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l32; + goto l29; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -62440,7 +62436,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l32; + goto l29; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -62448,7 +62444,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l32; + goto l29; } } if ((nameLen == 9) @@ -62459,7 +62455,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l32; + goto l29; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -62473,7 +62469,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l32; + goto l29; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -62486,12 +62482,12 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l33; + goto l30; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -62502,7 +62498,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l33: ; + l30: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -62510,9 +62506,9 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l32: /* end printOopShortInner: */; + l29: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -62526,8 +62522,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -62535,14 +62530,14 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l24; + goto l19; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l24: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -62595,7 +62590,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -62606,7 +62601,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -62617,23 +62612,23 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l35; + goto l32; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l35; + goto l32; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l35; + goto l32; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -62649,39 +62644,39 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l35; + goto l32; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l35; + goto l32; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l35; + goto l32; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l35; + goto l32; } if (oop == GIV(nilObj)) { print("nil"); - goto l35; + goto l32; } if (oop == GIV(trueObj)) { print("true"); - goto l35; + goto l32; } if (oop == GIV(falseObj)) { print("false"); - goto l35; + goto l32; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l35; + goto l32; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -62694,7 +62689,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l35; + goto l32; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -62702,7 +62697,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l35; + goto l32; } } if ((nameLen == 9) @@ -62713,7 +62708,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l35; + goto l32; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -62727,7 +62722,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l35; + goto l32; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -62740,12 +62735,12 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l37; + goto l34; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l36; + goto l33; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -62756,7 +62751,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l36: ; + l33: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -62764,9 +62759,9 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l37: ; + l34: ; } - l35: /* end printOopShortInner: */; + l32: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -62781,8 +62776,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -62790,14 +62784,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l28; + goto l21; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l28: /* end objectAfter:limit: */; + l21: /* end objectAfter:limit: */; } } @@ -64119,7 +64113,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -64469,6 +64463,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); return dataSize; } @@ -64579,11 +64574,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -64888,14 +64885,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -64912,6 +64918,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -64924,21 +64931,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); assert(isOopCompiledMethod(GIV(method))); @@ -64946,12 +64957,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? 256 : 0); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !0, __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -64967,6 +64981,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -64980,11 +64995,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -65004,6 +65022,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -65176,15 +65198,27 @@ schedulerPointer(void) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* StackInterpreter>>#sendInvokeCallbackContext: */ EXPORT(sqInt) @@ -65218,6 +65252,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) char *sp7; sqInt table; + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -65230,8 +65265,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin push: */ object3 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); longAtput((sp3 = GIV(stackPointer) - BytesPerWord), object3); @@ -65344,6 +65381,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ interpret(); return 1; @@ -65945,7 +65983,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -66902,7 +66940,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -67755,6 +67793,7 @@ transferTo(sqInt newProc) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin setMethod: */ @@ -68073,8 +68112,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -68082,14 +68120,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -68118,8 +68156,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -68127,14 +68164,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -68165,8 +68202,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -68174,14 +68210,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return activeContext; } @@ -68638,10 +68674,9 @@ primitiveClosureCopyWithCopiedValues(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt copiedValues; sqInt i; - sqInt initialIP; sqInt integerPointer; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -68676,7 +68711,6 @@ primitiveClosureCopyWithCopiedValues(void) return; } /* begin closureIn:numArgs:instructionPointer:copiedValues: */ - initialIP = (GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize); copiedValues = longAt(GIV(stackPointer)); /* begin numSlotsOf: */ assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); @@ -68722,7 +68756,7 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), longAt(GIV(stackPointer) + (2 * BytesPerWord))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)((GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -71370,7 +71404,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -71407,7 +71441,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -71865,7 +71899,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -72171,7 +72205,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -72484,8 +72518,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -72868,8 +72903,10 @@ primitiveTerminateTo(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -72955,7 +72992,6 @@ primitiveVMParameter(void) char *sp1; char *sp2; sqInt tagBits; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -73005,6 +73041,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -73014,165 +73051,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -73180,9 +73181,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -73190,213 +73191,118 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = GIV(nilObj); + valuePointer35 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = GIV(nilObj); + valuePointer36 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)((((GIV(preemptionYields) + valuePointer37 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = GIV(nilObj); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = GIV(nilObj); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = ConstZero; + valuePointer47 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer48 = ConstZero; + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -73425,7 +73331,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -73458,14 +73364,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -73541,7 +73450,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -73657,48 +73566,38 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l93; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l93: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -73764,11 +73663,11 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if ((((usqInt)arg)) > 0x1F) { /* begin primitiveFailFor: */ GIV(primFailCode) = PrimErrUnsupported; - goto l70; + goto l82; } GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l70: /* end setCogVMFlags: */; + l82: /* end setCogVMFlags: */; } } if (index == 49) { @@ -74016,8 +73915,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74025,14 +73923,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -74071,8 +73969,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74080,14 +73977,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74119,8 +74016,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74128,14 +74024,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -74184,6 +74080,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -74229,6 +74126,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/nsspurstack64src/vm/interp.c b/nsspurstack64src/vm/interp.c index 3db4b78be..ba1717ac3 100644 --- a/nsspurstack64src/vm/interp.c +++ b/nsspurstack64src/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -468,6 +468,7 @@ static void primitiveForceDisplayUpdate(void); static void primitiveFormPrint(void); static void primitiveFractionalPart(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -634,6 +635,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -661,7 +663,7 @@ static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -923,8 +925,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -991,6 +993,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1092,14 +1095,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1242,6 +1246,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1548,6 +1553,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1561,11 +1568,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1597,6 +1602,7 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; @@ -1618,7 +1624,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; #undef _iss #if SQ_USE_GLOBAL_STRUCT } fum; @@ -1647,6 +1652,7 @@ static struct foo * foo = &fum; static void (*primitiveFunctionPointer)(); sqInt checkForLeaks; sqInt checkAllocFiller; +sqInt debugCallbackPath; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; @@ -1658,6 +1664,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; char * breakSelector; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2239,7 +2248,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.2142"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.2165"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -4815,7 +4824,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l884; + goto l882; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -4864,7 +4873,7 @@ interpret(void) if (((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) && (home == (longAt(theFP2 + FoxThisContext)))) { ctxtOrNilOrZero = 0; - goto l891; + goto l889; } if (!((byteAt((theFP2 + FoxFrameFlags) + 3)) != 0)) { theMethod1 = longAt(theFP2 + FoxMethod); @@ -4881,10 +4890,10 @@ interpret(void) if ((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(theFP2))); ctxtOrNilOrZero = longAt(theFP2 + FoxThisContext); - goto l891; + goto l889; } ctxtOrNilOrZero = marryFrameSP(theFP2, theSP); - goto l891; + goto l889; } } theFPAbove = theFP2; @@ -4895,10 +4904,10 @@ interpret(void) && (((longAt(senderContext)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { /* begin nilObject */ ctxtOrNilOrZero = GIV(nilObj); - goto l891; + goto l889; } ctxtOrNilOrZero = findMethodWithPrimitiveFromContextUpToContext(198, senderContext, home); - l891: /* end findMethodWithPrimitive:FromFP:UpToContext: */; + l889: /* end findMethodWithPrimitive:FromFP:UpToContext: */; assert(!((onSamePage && (ctxtOrNilOrZero == (nilObject()))))); if (ctxtOrNilOrZero == 0) { @@ -4906,21 +4915,21 @@ interpret(void) theMethod = longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(MethodIndex) << (shiftForWord()))))); if ((primitiveIndexOfMethodheader(theMethod, methodHeaderOf(theMethod))) == 198) { unwindContextOrNilOrZero = home; - goto l911; + goto l909; } unwindContextOrNilOrZero = 0; - goto l911; + goto l909; } if (!(onSamePage || (ctxtOrNilOrZero == GIV(nilObj)))) { if ((findMethodWithPrimitiveFromContextUpToContext(0, ctxtOrNilOrZero, home)) == GIV(nilObj)) { /* begin nilObject */ unwindContextOrNilOrZero = GIV(nilObj); - goto l911; + goto l909; } } unwindContextOrNilOrZero = ctxtOrNilOrZero; - l911: /* end findUnwindThroughContext: */; + l909: /* end findUnwindThroughContext: */; if (unwindContextOrNilOrZero == GIV(nilObj)) { /* error: can't find home on chain; cannot return */ @@ -4928,10 +4937,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l912; + goto l910; } ourContext = marryFrameSP(localFP, localSP); - l912: /* end ensureFrameIsMarried:SP: */; + l910: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -4941,17 +4950,17 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l884; + goto l882; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l894; + goto l892; } ourContext1 = marryFrameSP(localFP, localSP); - l894: /* end ensureFrameIsMarried:SP: */; + l892: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -4963,7 +4972,7 @@ interpret(void) GIV(argumentCount) = 2; goto normalSend; /* return self */ - goto l884; + goto l882; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5000,30 +5009,30 @@ interpret(void) if (!(((contextToReturnTo & (tagMask())) == 0) && (((longAt(contextToReturnTo)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { frameToReturnTo = 0; - goto l898; + goto l896; } if (((((longAt((contextToReturnTo + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { if (isWidowedContext(contextToReturnTo)) { /* error: home's sender is dead; cannot return */ frameToReturnTo = 0; - goto l898; + goto l896; } /* begin frameOfMarriedContext: */ senderOop2 = longAt((contextToReturnTo + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop2) & 7) == 1)); frameToReturnTo = pointerForOop(senderOop2 - 1); - goto l898; + goto l896; } if (!(((((longAt((contextToReturnTo + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord()))))))) & 7) == 1))) { frameToReturnTo = 0; - goto l898; + goto l896; } thePage1 = makeBaseFrameFor(contextToReturnTo); markStackPageMostRecentlyUsed(thePage1); frameToReturnTo = (thePage1->baseFP); - l898: /* end establishFrameForContextToReturnTo: */; + l896: /* end establishFrameForContextToReturnTo: */; if (frameToReturnTo == 0) { /* error: home's sender is dead; cannot return */ @@ -5031,10 +5040,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l913; + goto l911; } ourContext2 = marryFrameSP(localFP, localSP); - l913: /* end ensureFrameIsMarried:SP: */; + l911: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5044,7 +5053,7 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l884; + goto l882; } } assert(pageListIsWellFormed()); @@ -5124,7 +5133,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l884: /* end case */; + l882: /* end case */; break; case 121: /* returnTrue */ @@ -5225,18 +5234,18 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l925; + goto l923; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l925; + goto l923; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l925: /* end findFrameAbove:inPage: */; + l923: /* end findFrameAbove:inPage: */; moveFramesInthroughtoPage(thePage, frameAbove, GIV(stackPage)); theFP = (thePage->headFP); theSP = (thePage->headSP); @@ -5249,10 +5258,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l916; + goto l914; } ourContext = marryFrameSP(localFP, localSP); - l916: /* end ensureFrameIsMarried:SP: */; + l914: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5262,7 +5271,7 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l922; + goto l920; } thePage = makeBaseFrameFor(contextToReturnTo); theFP = (thePage->headFP); @@ -5293,8 +5302,8 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); /* return self */ - l922: /* end baseFrameReturn */; - goto l915; + l920: /* end baseFrameReturn */; + goto l913; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)((byteAt((localFP + FoxFrameFlags) + 1))) << (shiftForWord()))))); @@ -5311,7 +5320,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l915: /* end case */; + l913: /* end case */; break; case 126: case 127: @@ -5339,10 +5348,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l927; + goto l925; } ourContext = marryFrameSP(localFP, localSP); - l927: /* end ensureFrameIsMarried:SP: */; + l925: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -5762,7 +5771,7 @@ interpret(void) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l942; + goto l929; } /* second probe */ @@ -5771,14 +5780,14 @@ interpret(void) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l942; + goto l929; } probe1 = (((usqInt) hash1) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe1 + MethodCacheSelector]) == GIV(messageSelector)) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l942; + goto l929; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -5795,7 +5804,7 @@ interpret(void) GIV(lkupClassTag) = handleForwardedSendFaultForTag(GIV(lkupClassTag)); } if (lookupInMethodCacheSelclassTag(GIV(messageSelector), GIV(lkupClassTag))) { - goto l933; + goto l939; } } /* begin classForClassTag: */ @@ -5808,12 +5817,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l938; + goto l932; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l938: /* end classForClassTag: */; + l932: /* end classForClassTag: */; lookupOrdinarySend(); /* begin internalizeIPandSP */ @@ -5821,8 +5830,8 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); - l942: ; - l933: /* end internalFindNewMethodOrdinary */; + l929: ; + l939: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -5835,28 +5844,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l941; + goto l934; } if (localPrimIndex == 256) { - goto l941; + goto l934; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l941; + goto l934; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l941; + goto l934; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l941; + goto l934; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l941; + goto l934; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -5892,7 +5901,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l941; + goto l934; } } /* begin internalActivateNewMethod */ @@ -5952,11 +5961,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l937; + goto l936; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l937: /* end getErrorObjectFromPrimFailCode */; + l936: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -5976,7 +5985,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l941: /* end internalExecuteNewMethod */; + l934: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6393,18 +6402,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -6514,7 +6527,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -6727,9 +6740,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt blockSize; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -6757,7 +6769,6 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l139: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -6796,7 +6807,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -7529,7 +7540,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l961; + goto l958; } if (bytecode == 172) { @@ -7538,7 +7549,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l961; + goto l958; } if (bytecode > 167) { @@ -7548,7 +7559,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l961; + goto l958; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -7556,7 +7567,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l961: /* end case */; + l958: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -7714,7 +7725,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l964; + goto l961; } if (bytecode == 172) { @@ -7724,14 +7735,14 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l964; + goto l961; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l964: /* end case */; + l961: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -9075,7 +9086,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -10627,7 +10638,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l965; + goto l962; } if (bytecode == 244) { @@ -10636,7 +10647,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l965; + goto l962; } if (bytecode == 243) { @@ -10646,7 +10657,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l965; + goto l962; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10654,7 +10665,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l965: /* end case */; + l962: /* end case */; break; case 339: /*83*/ /* bytecodePrimGreaterThanV4 */ @@ -10812,7 +10823,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + (bytecode - 207)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l968; + goto l965; } if (bytecode == 244) { @@ -10822,14 +10833,14 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l968; + goto l965; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l968: /* end case */; + l965: /* end case */; break; case 340: /*84*/ /* bytecodePrimLessOrEqualV4 */ @@ -12173,7 +12184,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -13386,7 +13397,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -14042,7 +14053,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif usqInt length; sqInt literal; sqInt localPrimIndex; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt methodReceiver; @@ -14110,12 +14121,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l991; + goto l975; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l991: /* end classAtIndex: */; + l975: /* end classAtIndex: */; /* begin lookupImplicitReceiverSend */ GIV(messageSelector) = (((GIV(messageSelector) & (tagMask())) == 0) && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) @@ -14138,18 +14149,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + candidateMixin = objOop2; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -14205,12 +14220,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif } GIV(newMethod) = objOop12; found = 1; - goto l989; + goto l990; } index += 1; } found = 0; - goto l989; + goto l990; } /* It is assumed that there are some nils in this dictionary, and search will @@ -14235,7 +14250,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); if (nextSelector == GIV(nilObj)) { found = 0; - goto l989; + goto l990; } if (((nextSelector & (tagMask())) == 0) && (((longAt(nextSelector)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -14257,24 +14272,24 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif } GIV(newMethod) = objOop3; found = 1; - goto l989; + goto l990; } index += 1; if (index == length) { if (wrapAround) { found = 0; - goto l989; + goto l990; } wrapAround = 1; index = SelectorStart; } } found = 0; - l989: /* end lookupMethodInDictionary: */; + l990: /* end lookupMethodInDictionary: */; if (found) { GIV(localAbsentReceiver) = candidateReceiver; actualLookupRule = lookupLexicalfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l975; + goto l977; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((sqInt)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -14294,7 +14309,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits2) << (shiftForWord()))))) : fetchClassOfNonImm(methodReceiver)); actualLookupRule = lookupProtectedstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l975: /* end lookupImplicitReceiverSend */; + l977: /* end lookupImplicitReceiverSend */; /* begin internalizeIPandSP */ localIP = pointerForOop(GIV(instructionPointer)); localSP = pointerForOop(GIV(stackPointer)); @@ -14325,28 +14340,28 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l974; + goto l986; } if (localPrimIndex == 256) { - goto l974; + goto l986; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l974; + goto l986; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l974; + goto l986; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l974; + goto l986; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l974; + goto l986; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14382,7 +14397,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l974; + goto l986; } } /* begin internalActivateNewMethod */ @@ -14442,11 +14457,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l981; + goto l996; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l981: /* end getErrorObjectFromPrimFailCode */; + l996: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14466,7 +14481,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l974: /* end internalExecuteNewMethod */; + l986: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14541,7 +14556,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l1020; + goto l1026; } /* second probe */ @@ -14553,7 +14568,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l1020; + goto l1026; } probe1 = (((usqInt) hash1) >> 2) & NSMethodCacheMask; if (((((GIV(nsMethodCache)[probe1 + NSMethodCacheSelector]) == GIV(messageSelector)) @@ -14563,7 +14578,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l1020; + goto l1026; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14590,12 +14605,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l1016; + goto l1011; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l1016: /* end classForClassTag: */; + l1011: /* end classForClassTag: */; /* begin lookupDynamicSuperSend */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14613,18 +14628,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord()))))) : fetchClassOfNonImm(GIV(localAbsentReceiver)))); @@ -14641,7 +14660,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToNSCache(actualLookupRule); - l1020: ; + l1026: ; /* begin shuffleArgumentsAndStoreAbsentReceiver: */ @@ -14667,28 +14686,28 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l1022; + goto l1010; } if (localPrimIndex == 256) { - goto l1022; + goto l1010; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l1022; + goto l1010; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l1022; + goto l1010; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l1022; + goto l1010; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l1022; + goto l1010; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14724,7 +14743,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l1022; + goto l1010; } } /* begin internalActivateNewMethod */ @@ -14784,11 +14803,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l1038; + goto l1022; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l1038: /* end getErrorObjectFromPrimFailCode */; + l1022: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14808,7 +14827,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l1022: /* end internalExecuteNewMethod */; + l1010: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14999,12 +15018,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l800; + goto l815; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l800: /* end classAtIndex: */; + l815: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -15022,18 +15041,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < 0) { count += 1; @@ -15080,28 +15103,28 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l809; + goto l799; } if (localPrimIndex == 256) { - goto l809; + goto l799; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l809; + goto l799; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l809; + goto l799; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l809; + goto l799; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l809; + goto l799; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -15137,7 +15160,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l809; + goto l799; } } /* begin internalActivateNewMethod */ @@ -15197,11 +15220,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l799; + goto l810; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l799: /* end getErrorObjectFromPrimFailCode */; + l810: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -15221,7 +15244,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l809: /* end internalExecuteNewMethod */; + l799: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -15245,15 +15268,15 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l825; + goto l824; } else { goto respondToUnknownBytecode; - goto l825; + goto l824; } } - l825: /* end case */; + l824: /* end case */; break; case 509: /*253*/ /* extPushClosureBytecode */ @@ -15262,9 +15285,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt byte; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -15284,12 +15306,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l854; + goto l853; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); - l854: /* end ensureFrameIsMarried:SP: */; + l853: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -15315,20 +15336,20 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l846; + goto l845; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l846: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l845: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -15438,12 +15459,12 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l859; + goto l873; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l859: /* end classAtIndex: */; + l873: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -15461,18 +15482,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -15519,28 +15544,28 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l868; + goto l857; } if (localPrimIndex == 256) { - goto l868; + goto l857; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l868; + goto l857; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l868; + goto l857; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l868; + goto l857; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l868; + goto l857; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -15576,7 +15601,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l868; + goto l857; } } /* begin internalActivateNewMethod */ @@ -15636,11 +15661,11 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l858; + goto l868; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l858: /* end getErrorObjectFromPrimFailCode */; + l868: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -15660,7 +15685,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l868: /* end internalExecuteNewMethod */; + l857: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -16120,16 +16145,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -16156,7 +16181,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -16265,7 +16290,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -16334,7 +16359,7 @@ positive64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -16722,7 +16747,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -17483,8 +17507,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17663,8 +17687,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17980,8 +18004,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -18385,7 +18409,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -18609,7 +18633,7 @@ primitiveClosureValue(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -18732,7 +18756,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -18852,7 +18876,7 @@ primitiveClosureValueWithArgs(void) sqInt i; sqInt index; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -19150,7 +19174,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -19160,7 +19184,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -19171,7 +19195,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -19188,7 +19212,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -19200,8 +19224,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -19219,7 +19242,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -19337,7 +19360,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -21267,8 +21290,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -21276,14 +21298,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -21308,8 +21330,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -21317,14 +21338,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -21351,8 +21372,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -21360,14 +21380,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -21399,7 +21419,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -21592,6 +21612,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -21824,7 +21891,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -23313,7 +23380,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -23551,7 +23618,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -23871,7 +23938,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -23965,7 +24032,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -24025,7 +24092,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -24178,8 +24245,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -24187,18 +24253,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -24221,8 +24287,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -24230,18 +24295,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -24253,8 +24318,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -24262,22 +24326,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -26116,7 +26180,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -29707,8 +29771,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -29716,14 +29779,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -29748,8 +29811,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -29757,14 +29819,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -29791,8 +29853,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -29800,14 +29861,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -30173,7 +30234,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -30262,7 +30323,7 @@ signed64BitValueOf(sqInt oop) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -30564,8 +30625,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -30972,9 +31032,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -31151,7 +31211,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -31223,6 +31283,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -31254,7 +31325,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -31375,7 +31446,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -31387,7 +31458,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -31398,7 +31469,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -31866,8 +31937,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31875,14 +31945,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -31905,8 +31975,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -31914,14 +31983,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -31967,8 +32036,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31976,14 +32044,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -32115,7 +32183,6 @@ copyAndForwardMourner(sqInt mourner) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -32145,12 +32212,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -32188,7 +32254,6 @@ copyAndForward(sqInt survivor) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -32234,12 +32299,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -32273,12 +32337,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -32477,7 +32541,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -33004,8 +33068,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -33440,8 +33503,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -33449,14 +33511,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -33482,8 +33544,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -33491,14 +33552,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -33513,8 +33574,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -33522,14 +33582,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -33903,7 +33963,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -33911,7 +33971,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -33922,8 +33982,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -33964,8 +34023,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -33973,14 +34031,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -34019,8 +34077,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -34067,8 +34124,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -34076,14 +34132,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -34131,8 +34187,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -34140,14 +34195,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -34192,8 +34247,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -34246,8 +34300,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -34255,14 +34308,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -34306,7 +34359,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -34325,7 +34378,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -34341,7 +34394,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -34441,8 +34494,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -34478,8 +34530,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -34487,14 +34538,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -34531,8 +34582,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -34540,14 +34590,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -34577,8 +34627,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -34586,14 +34635,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -34704,8 +34753,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -34713,14 +34761,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -34744,8 +34792,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -34753,14 +34800,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -34786,8 +34833,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -34795,14 +34841,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -34844,8 +34890,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -34853,14 +34898,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -35921,8 +35966,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -35930,14 +35974,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -35982,8 +36026,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -35991,14 +36034,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -36078,8 +36121,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -36087,14 +36129,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -36250,12 +36292,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -36298,8 +36340,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -36307,14 +36348,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -36365,12 +36406,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -36413,8 +36454,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -36422,14 +36462,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -36522,12 +36562,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -36586,8 +36626,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -36595,14 +36634,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -36652,7 +36691,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -36693,7 +36732,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -37287,8 +37326,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -37296,14 +37334,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -37372,8 +37410,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -37381,14 +37418,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -37409,8 +37446,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -37418,14 +37454,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -37448,8 +37484,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -37457,14 +37492,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -37847,8 +37882,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -37856,14 +37890,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -37895,8 +37929,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -37904,14 +37937,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -37945,8 +37978,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -37954,14 +37986,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -38247,7 +38279,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -38500,8 +38531,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -38509,14 +38539,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -38539,8 +38569,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -38548,14 +38577,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -38791,8 +38820,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -38800,14 +38828,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -38840,8 +38868,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -38849,14 +38876,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -38891,8 +38918,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -38900,14 +38926,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -38987,8 +39013,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -38996,14 +39021,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39033,8 +39058,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -39042,14 +39066,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -39081,8 +39105,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -39090,14 +39113,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -39695,7 +39718,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -40019,8 +40042,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40028,14 +40050,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40058,8 +40080,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -40067,14 +40088,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40099,8 +40120,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -40108,14 +40128,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -40173,7 +40193,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -40181,7 +40201,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -40220,10 +40240,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -40274,8 +40294,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40283,14 +40302,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -40326,11 +40345,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i1; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -41772,8 +41791,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -41795,8 +41813,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -41840,7 +41857,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -41848,7 +41865,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -41856,7 +41873,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -41864,11 +41881,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -41878,7 +41895,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -41886,11 +41903,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -41903,8 +41920,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -41912,17 +41928,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -41931,7 +41947,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -41950,7 +41966,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -41966,7 +41982,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -41987,8 +42003,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -41996,17 +42011,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -42014,8 +42029,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42023,17 +42037,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -42053,7 +42067,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -42111,8 +42124,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -42120,14 +42132,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -42253,8 +42265,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -42262,14 +42273,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -42299,8 +42310,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42308,14 +42318,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42338,8 +42348,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42347,14 +42356,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -42465,8 +42474,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -42474,14 +42482,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42540,8 +42548,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42549,14 +42556,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -42617,8 +42624,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -42626,14 +42632,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -42773,7 +42779,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -42801,7 +42807,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -42825,7 +42831,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -42853,7 +42859,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -42876,8 +42882,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42885,14 +42890,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -43378,7 +43383,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -43630,7 +43635,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -44001,8 +44006,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44038,7 +44042,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -44053,7 +44057,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -44301,8 +44305,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44324,8 +44327,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44348,8 +44350,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -44370,8 +44371,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -44449,8 +44449,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44458,14 +44457,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44487,8 +44486,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44496,14 +44494,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -44528,8 +44526,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44537,14 +44534,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -44656,8 +44653,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44753,8 +44749,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44762,14 +44757,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44808,8 +44803,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -44817,14 +44811,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44856,8 +44850,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44865,14 +44858,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -45013,8 +45006,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45493,8 +45485,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45502,14 +45493,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45540,8 +45531,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45549,14 +45539,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45589,8 +45579,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45598,14 +45587,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -45709,8 +45698,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45718,14 +45706,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45763,8 +45751,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45772,14 +45759,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45819,8 +45806,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45828,14 +45814,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -45961,8 +45947,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45970,14 +45955,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -46007,8 +45992,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46016,14 +46000,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46046,8 +46030,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46055,14 +46038,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -46138,8 +46121,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46147,14 +46129,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46182,8 +46164,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46191,14 +46172,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46221,8 +46202,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46230,14 +46210,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -46585,8 +46565,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46594,14 +46573,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -46631,8 +46610,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46640,14 +46618,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46670,8 +46648,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46679,14 +46656,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -46812,8 +46789,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46821,14 +46797,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46857,8 +46833,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46866,14 +46841,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46904,8 +46879,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46913,14 +46887,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -47008,8 +46982,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47017,14 +46990,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47065,8 +47038,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47074,14 +47046,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47124,8 +47096,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47133,14 +47104,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -47224,8 +47195,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47233,14 +47203,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -47270,8 +47240,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47279,14 +47248,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47309,8 +47278,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47318,14 +47286,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -47535,8 +47503,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47544,14 +47511,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -47579,8 +47546,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47588,14 +47554,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47616,8 +47582,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47625,14 +47590,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -47706,13 +47671,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -47720,15 +47685,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -47738,7 +47703,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -47762,8 +47727,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -47771,14 +47735,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47799,13 +47763,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -47813,15 +47777,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -47831,7 +47795,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -47855,8 +47819,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47864,14 +47827,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47893,13 +47856,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -47907,15 +47870,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -47925,7 +47888,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -47950,8 +47913,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47959,14 +47921,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -48392,7 +48354,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -48402,8 +48363,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -48454,7 +48414,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -48647,6 +48607,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -48747,7 +48717,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -48766,7 +48736,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -48782,7 +48752,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -48791,7 +48761,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -48810,7 +48780,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -48826,7 +48796,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -48890,8 +48860,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -49057,7 +49026,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -49739,11 +49708,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -49758,7 +49727,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -49774,8 +49743,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -49783,16 +49751,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -49818,8 +49786,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49827,14 +49794,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -49854,16 +49821,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -49872,11 +49839,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -49884,7 +49851,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -49954,8 +49921,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -49963,14 +49929,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -50069,8 +50035,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -50090,8 +50055,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -50099,14 +50063,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -50168,8 +50132,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -50248,7 +50211,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -50270,7 +50233,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -50319,7 +50282,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -50335,8 +50298,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50344,16 +50306,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -50424,8 +50386,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50433,14 +50394,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -50459,9 +50420,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -50477,9 +50435,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -50511,9 +50468,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -50524,8 +50480,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -50535,9 +50490,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -50595,7 +50549,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -50670,8 +50624,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -50727,8 +50680,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -50736,14 +50688,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -50808,8 +50760,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50817,14 +50768,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -50940,8 +50891,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50949,14 +50899,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -50995,7 +50945,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -51157,13 +51107,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l57; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l57: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l56; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -51171,15 +51121,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l56; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l56; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l56; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -51189,7 +51139,7 @@ updatePointers(void) numLiterals1 = ((header1 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l56: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -51216,8 +51166,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -51225,14 +51174,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -51244,7 +51193,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -51257,13 +51206,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l64; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l64: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l63; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -51271,15 +51220,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l63; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l63; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l63; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -51289,7 +51238,7 @@ updatePointers(void) numLiterals2 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l63: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -51317,8 +51266,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -51326,16 +51274,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -51376,13 +51324,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -51390,15 +51338,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -51408,7 +51356,7 @@ updatePointers(void) numLiterals3 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -51445,8 +51393,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -51481,7 +51428,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -51494,8 +51441,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -51503,18 +51449,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -51537,13 +51483,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l62; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l62: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l63; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -51551,15 +51497,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l63; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l63; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l63; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -51569,7 +51515,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l63: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -51598,8 +51544,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51607,14 +51552,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -51809,8 +51754,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51818,14 +51762,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -51910,7 +51854,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -52010,8 +51954,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -52178,7 +52122,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -52294,8 +52238,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -52303,24 +52246,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -52383,8 +52326,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -52613,8 +52556,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); @@ -53172,7 +53115,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -53266,8 +53208,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53275,14 +53216,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53303,8 +53244,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53312,14 +53252,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53342,8 +53282,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53351,14 +53290,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -54241,7 +54180,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -54251,7 +54190,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -54339,9 +54278,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -54447,6 +54386,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -55063,8 +55031,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -55072,14 +55039,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -55131,8 +55098,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -55140,14 +55106,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55201,8 +55167,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -55210,20 +55175,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -55256,8 +55221,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55265,14 +55229,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55297,8 +55261,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55306,14 +55269,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55340,8 +55303,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55349,16 +55311,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -55441,8 +55403,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -55519,8 +55482,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -55642,8 +55606,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -57174,8 +57139,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* To overflow the stack this must be a new frame, but in Cog base frames are married. */ assert(!(frameHasContext(GIV(framePointer)))); @@ -58360,7 +58326,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -58510,7 +58476,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -58695,7 +58661,7 @@ lookupMNU(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -58853,7 +58819,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -59033,7 +58999,7 @@ lookupOrdinarySend(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -59194,7 +59160,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -59347,7 +59313,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -59640,7 +59606,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -60130,8 +60096,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); GIV(method) = aMethodObj; @@ -60182,7 +60149,6 @@ marryFrameSP(char *theFP, char *theSP) numArgs = byteAt((theFP + FoxFrameFlags) + 1); numStack = (((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1)); if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) { - /* begin pushedReceiverOrClosureOfFrame: */ closureOrNil = longAt(theFP + (frameStackedReceiverOffset(theFP))); } else { @@ -60391,18 +60357,19 @@ longAt((methodPointer + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (sh objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* StackInterpreter>>#methodHeaderIndicatesLargeFrame: */ @@ -60718,6 +60685,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -60796,7 +60796,7 @@ positive32BitIntegerFor(unsigned int integerValue) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -61241,8 +61241,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -61250,14 +61249,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -61288,8 +61287,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -61297,14 +61295,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -61328,8 +61326,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -61337,14 +61334,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -62079,7 +62076,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -62090,7 +62087,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -62101,23 +62098,23 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l29; + goto l26; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l29; + goto l26; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l29; + goto l26; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -62133,39 +62130,39 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l29; + goto l26; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l29; + goto l26; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l29; + goto l26; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l29; + goto l26; } if (oop == GIV(nilObj)) { print("nil"); - goto l29; + goto l26; } if (oop == GIV(trueObj)) { print("true"); - goto l29; + goto l26; } if (oop == GIV(falseObj)) { print("false"); - goto l29; + goto l26; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l29; + goto l26; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -62178,7 +62175,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l29; + goto l26; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -62186,7 +62183,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l29; + goto l26; } } if ((nameLen == 9) @@ -62197,7 +62194,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l29; + goto l26; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -62211,7 +62208,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l29; + goto l26; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -62224,12 +62221,12 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l30; + goto l27; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -62240,7 +62237,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l30: ; + l27: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -62248,9 +62245,9 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l29: /* end printOopShortInner: */; + l26: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -62264,8 +62261,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62273,14 +62269,14 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l20; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -62332,7 +62328,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -62343,7 +62339,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -62354,23 +62350,23 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l32; + goto l29; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l32; + goto l29; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l32; + goto l29; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -62386,39 +62382,39 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l32; + goto l29; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l32; + goto l29; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l32; + goto l29; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l32; + goto l29; } if (oop == GIV(nilObj)) { print("nil"); - goto l32; + goto l29; } if (oop == GIV(trueObj)) { print("true"); - goto l32; + goto l29; } if (oop == GIV(falseObj)) { print("false"); - goto l32; + goto l29; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l32; + goto l29; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -62431,7 +62427,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l32; + goto l29; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -62439,7 +62435,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l32; + goto l29; } } if ((nameLen == 9) @@ -62450,7 +62446,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l32; + goto l29; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -62464,7 +62460,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l32; + goto l29; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -62477,12 +62473,12 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l33; + goto l30; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -62493,7 +62489,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l33: ; + l30: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -62501,9 +62497,9 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l32: /* end printOopShortInner: */; + l29: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -62517,8 +62513,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -62526,14 +62521,14 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l24; + goto l19; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l24: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -62586,7 +62581,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -62597,7 +62592,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -62608,23 +62603,23 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l35; + goto l32; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l35; + goto l32; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l35; + goto l32; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -62640,39 +62635,39 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l35; + goto l32; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l35; + goto l32; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l35; + goto l32; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l35; + goto l32; } if (oop == GIV(nilObj)) { print("nil"); - goto l35; + goto l32; } if (oop == GIV(trueObj)) { print("true"); - goto l35; + goto l32; } if (oop == GIV(falseObj)) { print("false"); - goto l35; + goto l32; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l35; + goto l32; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -62685,7 +62680,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l35; + goto l32; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -62693,7 +62688,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l35; + goto l32; } } if ((nameLen == 9) @@ -62704,7 +62699,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l35; + goto l32; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -62718,7 +62713,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l35; + goto l32; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -62731,12 +62726,12 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l37; + goto l34; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l36; + goto l33; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -62747,7 +62742,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l36: ; + l33: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -62755,9 +62750,9 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l37: ; + l34: ; } - l35: /* end printOopShortInner: */; + l32: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -62772,8 +62767,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -62781,14 +62775,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l28; + goto l21; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l28: /* end objectAfter:limit: */; + l21: /* end objectAfter:limit: */; } } @@ -64110,7 +64104,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -64460,6 +64454,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); return dataSize; } @@ -64570,11 +64565,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -64879,14 +64876,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -64903,6 +64909,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -64915,21 +64922,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); assert(isOopCompiledMethod(GIV(method))); @@ -64937,12 +64948,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? 256 : 0); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !0, __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -64958,6 +64972,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -64971,11 +64986,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -64995,6 +65013,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -65167,15 +65189,27 @@ schedulerPointer(void) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* StackInterpreter>>#sendInvokeCallbackContext: */ EXPORT(sqInt) @@ -65209,6 +65243,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) char *sp7; sqInt table; + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -65221,8 +65256,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin push: */ object3 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); longAtput((sp3 = GIV(stackPointer) - BytesPerWord), object3); @@ -65335,6 +65372,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ interpret(); return 1; @@ -65936,7 +65974,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -66893,7 +66931,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -67746,6 +67784,7 @@ transferTo(sqInt newProc) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin setMethod: */ @@ -68064,8 +68103,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -68073,14 +68111,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -68109,8 +68147,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -68118,14 +68155,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -68156,8 +68193,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -68165,14 +68201,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return activeContext; } @@ -68629,10 +68665,9 @@ primitiveClosureCopyWithCopiedValues(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt copiedValues; sqInt i; - sqInt initialIP; sqInt integerPointer; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -68667,7 +68702,6 @@ primitiveClosureCopyWithCopiedValues(void) return; } /* begin closureIn:numArgs:instructionPointer:copiedValues: */ - initialIP = (GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize); copiedValues = longAt(GIV(stackPointer)); /* begin numSlotsOf: */ assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); @@ -68713,7 +68747,7 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), longAt(GIV(stackPointer) + (2 * BytesPerWord))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)((GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -71361,7 +71395,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -71398,7 +71432,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -71856,7 +71890,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -72162,7 +72196,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -72475,8 +72509,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -72859,8 +72894,10 @@ primitiveTerminateTo(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -72946,7 +72983,6 @@ primitiveVMParameter(void) char *sp1; char *sp2; sqInt tagBits; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -72996,6 +73032,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -73005,165 +73042,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -73171,9 +73172,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -73181,213 +73182,118 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = GIV(nilObj); + valuePointer35 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = GIV(nilObj); + valuePointer36 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)((((GIV(preemptionYields) + valuePointer37 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = GIV(nilObj); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = GIV(nilObj); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = ConstZero; + valuePointer47 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer48 = ConstZero; + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -73416,7 +73322,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -73449,14 +73355,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -73532,7 +73441,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -73648,48 +73557,38 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l93; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l93: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -73755,11 +73654,11 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if ((((usqInt)arg)) > 0x1F) { /* begin primitiveFailFor: */ GIV(primFailCode) = PrimErrUnsupported; - goto l70; + goto l82; } GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l70: /* end setCogVMFlags: */; + l82: /* end setCogVMFlags: */; } } if (index == 49) { @@ -74007,8 +73906,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74016,14 +73914,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -74062,8 +73960,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74071,14 +73968,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74110,8 +74007,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74119,14 +74015,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -74175,6 +74071,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -74220,6 +74117,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/nsspurstack64src/vm/interp.h b/nsspurstack64src/vm/interp.h index 1bedee090..956ad0bc7 100644 --- a/nsspurstack64src/vm/interp.h +++ b/nsspurstack64src/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 8 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1152921504606846976 #define MaxSmallInteger 1152921504606846975 diff --git a/nsspurstack64src/vm/vmCallback.h b/nsspurstack64src/vm/vmCallback.h index 48d07f100..3bf23acc7 100644 --- a/nsspurstack64src/vm/vmCallback.h +++ b/nsspurstack64src/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/nsspurstacksrc/vm/gcc3x-interp.c b/nsspurstacksrc/vm/gcc3x-interp.c index 67ad037f5..9ae907c10 100644 --- a/nsspurstacksrc/vm/gcc3x-interp.c +++ b/nsspurstacksrc/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -471,6 +471,7 @@ static void primitiveForceDisplayUpdate(void); static void primitiveFormPrint(void); static void primitiveFractionalPart(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -644,7 +645,7 @@ static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -906,8 +907,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -974,6 +975,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1075,14 +1077,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1226,6 +1229,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1532,6 +1536,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1545,11 +1551,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1581,6 +1585,7 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; @@ -1602,7 +1607,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; #undef _iss #if SQ_USE_GLOBAL_STRUCT } fum; @@ -1631,6 +1635,7 @@ static struct foo * foo = &fum; static void (*primitiveFunctionPointer)(); sqInt checkForLeaks; sqInt checkAllocFiller; +sqInt debugCallbackPath; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; @@ -1642,6 +1647,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; char * breakSelector; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2223,7 +2231,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.2142"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.2165"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -4801,7 +4809,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l818; + goto l816; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -4850,7 +4858,7 @@ interpret(void) if (((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) && (home == (longAt(theFP2 + FoxThisContext)))) { ctxtOrNilOrZero = 0; - goto l825; + goto l823; } if (!((byteAt((theFP2 + FoxFrameFlags) + 3)) != 0)) { theMethod1 = longAt(theFP2 + FoxMethod); @@ -4867,10 +4875,10 @@ interpret(void) if ((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(theFP2))); ctxtOrNilOrZero = longAt(theFP2 + FoxThisContext); - goto l825; + goto l823; } ctxtOrNilOrZero = marryFrameSP(theFP2, theSP); - goto l825; + goto l823; } } theFPAbove = theFP2; @@ -4881,10 +4889,10 @@ interpret(void) && (((longAt(senderContext)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { /* begin nilObject */ ctxtOrNilOrZero = GIV(nilObj); - goto l825; + goto l823; } ctxtOrNilOrZero = findMethodWithPrimitiveFromContextUpToContext(198, senderContext, home); - l825: /* end findMethodWithPrimitive:FromFP:UpToContext: */; + l823: /* end findMethodWithPrimitive:FromFP:UpToContext: */; assert(!((onSamePage && (ctxtOrNilOrZero == (nilObject()))))); if (ctxtOrNilOrZero == 0) { @@ -4892,21 +4900,21 @@ interpret(void) theMethod = longAt((home + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))); if ((primitiveIndexOfMethodheader(theMethod, methodHeaderOf(theMethod))) == 198) { unwindContextOrNilOrZero = home; - goto l845; + goto l843; } unwindContextOrNilOrZero = 0; - goto l845; + goto l843; } if (!(onSamePage || (ctxtOrNilOrZero == GIV(nilObj)))) { if ((findMethodWithPrimitiveFromContextUpToContext(0, ctxtOrNilOrZero, home)) == GIV(nilObj)) { /* begin nilObject */ unwindContextOrNilOrZero = GIV(nilObj); - goto l845; + goto l843; } } unwindContextOrNilOrZero = ctxtOrNilOrZero; - l845: /* end findUnwindThroughContext: */; + l843: /* end findUnwindThroughContext: */; if (unwindContextOrNilOrZero == GIV(nilObj)) { /* error: can't find home on chain; cannot return */ @@ -4914,10 +4922,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l846; + goto l844; } ourContext = marryFrameSP(localFP, localSP); - l846: /* end ensureFrameIsMarried:SP: */; + l844: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -4927,17 +4935,17 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l818; + goto l816; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l828; + goto l826; } ourContext1 = marryFrameSP(localFP, localSP); - l828: /* end ensureFrameIsMarried:SP: */; + l826: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -4949,7 +4957,7 @@ interpret(void) GIV(argumentCount) = 2; goto normalSend; /* return self */ - goto l818; + goto l816; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -4986,30 +4994,30 @@ interpret(void) if (!(((contextToReturnTo & (tagMask())) == 0) && (((longAt(contextToReturnTo)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { frameToReturnTo = 0; - goto l832; + goto l830; } if (((longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (isWidowedContext(contextToReturnTo)) { /* error: home's sender is dead; cannot return */ frameToReturnTo = 0; - goto l832; + goto l830; } /* begin frameOfMarriedContext: */ senderOop2 = longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop2 & 1)); frameToReturnTo = pointerForOop(senderOop2 - 1); - goto l832; + goto l830; } if (!(((longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))))) & 1))) { frameToReturnTo = 0; - goto l832; + goto l830; } thePage1 = makeBaseFrameFor(contextToReturnTo); markStackPageMostRecentlyUsed(thePage1); frameToReturnTo = (thePage1->baseFP); - l832: /* end establishFrameForContextToReturnTo: */; + l830: /* end establishFrameForContextToReturnTo: */; if (frameToReturnTo == 0) { /* error: home's sender is dead; cannot return */ @@ -5017,10 +5025,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l847; + goto l845; } ourContext2 = marryFrameSP(localFP, localSP); - l847: /* end ensureFrameIsMarried:SP: */; + l845: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5030,7 +5038,7 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l818; + goto l816; } } assert(pageListIsWellFormed()); @@ -5110,7 +5118,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l818: /* end case */; + l816: /* end case */; BREAK; CASE(121) /* returnTrue */ @@ -5211,18 +5219,18 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l859; + goto l857; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l859; + goto l857; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l859: /* end findFrameAbove:inPage: */; + l857: /* end findFrameAbove:inPage: */; moveFramesInthroughtoPage(thePage, frameAbove, GIV(stackPage)); theFP = (thePage->headFP); theSP = (thePage->headSP); @@ -5235,10 +5243,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l850; + goto l848; } ourContext = marryFrameSP(localFP, localSP); - l850: /* end ensureFrameIsMarried:SP: */; + l848: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5248,7 +5256,7 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l856; + goto l854; } thePage = makeBaseFrameFor(contextToReturnTo); theFP = (thePage->headFP); @@ -5279,8 +5287,8 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); /* return self */ - l856: /* end baseFrameReturn */; - goto l849; + l854: /* end baseFrameReturn */; + goto l847; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)((byteAt((localFP + FoxFrameFlags) + 1))) << (shiftForWord()))))); @@ -5297,7 +5305,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l849: /* end case */; + l847: /* end case */; BREAK; CASE(126) CASE(127) @@ -5325,10 +5333,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l861; + goto l859; } ourContext = marryFrameSP(localFP, localSP); - l861: /* end ensureFrameIsMarried:SP: */; + l859: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -5750,7 +5758,7 @@ interpret(void) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l876; + goto l863; } /* second probe */ @@ -5759,14 +5767,14 @@ interpret(void) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l876; + goto l863; } probe1 = (((usqInt) hash1) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe1 + MethodCacheSelector]) == GIV(messageSelector)) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l876; + goto l863; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -5783,7 +5791,7 @@ interpret(void) GIV(lkupClassTag) = handleForwardedSendFaultForTag(GIV(lkupClassTag)); } if (lookupInMethodCacheSelclassTag(GIV(messageSelector), GIV(lkupClassTag))) { - goto l867; + goto l873; } } /* begin classForClassTag: */ @@ -5796,12 +5804,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l872; + goto l866; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l872: /* end classForClassTag: */; + l866: /* end classForClassTag: */; lookupOrdinarySend(); /* begin internalizeIPandSP */ @@ -5809,8 +5817,8 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); - l876: ; - l867: /* end internalFindNewMethodOrdinary */; + l863: ; + l873: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -5823,28 +5831,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l875; + goto l868; } if (localPrimIndex == 256) { - goto l875; + goto l868; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l875; + goto l868; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l875; + goto l868; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l875; + goto l868; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l875; + goto l868; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -5880,7 +5888,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l875; + goto l868; } } /* begin internalActivateNewMethod */ @@ -5940,11 +5948,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l874; + goto l865; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l874: /* end getErrorObjectFromPrimFailCode */; + l865: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -5964,7 +5972,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l875: /* end internalExecuteNewMethod */; + l868: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6379,18 +6387,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -6500,7 +6512,7 @@ interpret(void) CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -6713,9 +6725,8 @@ interpret(void) sqInt blockSize; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -6743,7 +6754,6 @@ interpret(void) context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l139: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -6782,7 +6792,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -7374,7 +7384,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l894; + goto l891; } if (bytecode == 172) { @@ -7383,7 +7393,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l894; + goto l891; } if (bytecode > 167) { @@ -7393,7 +7403,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l894; + goto l891; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -7401,7 +7411,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l894: /* end case */; + l891: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -7512,7 +7522,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l897; + goto l894; } if (bytecode == 172) { @@ -7522,14 +7532,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l897; + goto l894; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l897: /* end case */; + l894: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -8167,7 +8177,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -8429,7 +8439,7 @@ interpret(void) sqLong hdr1; sqInt index; sqInt index1; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots11; @@ -8689,7 +8699,7 @@ interpret(void) if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -10106,7 +10116,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l898; + goto l895; } if (bytecode == 244) { @@ -10115,7 +10125,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l898; + goto l895; } if (bytecode == 243) { @@ -10125,7 +10135,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l898; + goto l895; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10133,7 +10143,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l898: /* end case */; + l895: /* end case */; BREAK; CASE(339) /*83*/ /* bytecodePrimGreaterThanV4 */ @@ -10244,7 +10254,7 @@ interpret(void) localIP = (localIP + (bytecode - 207)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l901; + goto l898; } if (bytecode == 244) { @@ -10254,14 +10264,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l901; + goto l898; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l901: /* end case */; + l898: /* end case */; BREAK; CASE(340) /*84*/ /* bytecodePrimLessOrEqualV4 */ @@ -10899,7 +10909,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -11161,7 +11171,7 @@ interpret(void) sqLong hdr1; sqInt index; sqInt index1; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots11; @@ -11421,7 +11431,7 @@ interpret(void) if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -12634,7 +12644,7 @@ interpret(void) CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -13292,7 +13302,7 @@ interpret(void) usqInt length; sqInt literal; sqInt localPrimIndex; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; usqInt methodPointer; @@ -13363,12 +13373,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l928; + goto l912; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l928: /* end classAtIndex: */; + l912: /* end classAtIndex: */; /* begin lookupImplicitReceiverSend */ GIV(messageSelector) = (((GIV(messageSelector) & (tagMask())) == 0) && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) @@ -13388,18 +13398,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + candidateMixin = objOop2; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -13526,7 +13540,7 @@ interpret(void) if (found) { GIV(localAbsentReceiver) = candidateReceiver; actualLookupRule = lookupLexicalfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l911; + goto l914; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((int)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -13546,7 +13560,7 @@ interpret(void) ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits2) << (shiftForWord()))))) : fetchClassOfNonImm(methodReceiver)); actualLookupRule = lookupProtectedstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l911: /* end lookupImplicitReceiverSend */; + l914: /* end lookupImplicitReceiverSend */; /* begin internalizeIPandSP */ localIP = pointerForOop(GIV(instructionPointer)); localSP = pointerForOop(GIV(stackPointer)); @@ -13577,28 +13591,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l910; + goto l918; } if (localPrimIndex == 256) { - goto l910; + goto l918; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l910; + goto l918; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l910; + goto l918; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l910; + goto l918; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l910; + goto l918; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -13634,7 +13648,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l910; + goto l918; } } /* begin internalActivateNewMethod */ @@ -13694,11 +13708,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l902; + goto l920; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l902: /* end getErrorObjectFromPrimFailCode */; + l920: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -13718,7 +13732,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l910: /* end internalExecuteNewMethod */; + l918: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13796,7 +13810,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l955; + goto l957; } /* second probe */ @@ -13808,7 +13822,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l955; + goto l957; } probe1 = (((usqInt) hash1) >> 2) & NSMethodCacheMask; if (((((GIV(nsMethodCache)[probe1 + NSMethodCacheSelector]) == GIV(messageSelector)) @@ -13818,7 +13832,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l955; + goto l957; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -13845,12 +13859,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l953; + goto l943; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l953: /* end classForClassTag: */; + l943: /* end classForClassTag: */; /* begin lookupDynamicSuperSend */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -13865,18 +13879,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord()))))) : fetchClassOfNonImm(GIV(localAbsentReceiver)))); @@ -13893,7 +13911,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToNSCache(actualLookupRule); - l955: ; + l957: ; /* begin shuffleArgumentsAndStoreAbsentReceiver: */ @@ -13919,28 +13937,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l956; + goto l942; } if (localPrimIndex == 256) { - goto l956; + goto l942; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l956; + goto l942; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l956; + goto l942; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l956; + goto l942; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l956; + goto l942; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -13976,7 +13994,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l956; + goto l942; } } /* begin internalActivateNewMethod */ @@ -14060,7 +14078,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l956: /* end internalExecuteNewMethod */; + l942: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14254,12 +14272,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l741; + goto l750; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l741: /* end classAtIndex: */; + l750: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14274,18 +14292,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < 0) { count += 1; @@ -14332,28 +14354,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l747; + goto l735; } if (localPrimIndex == 256) { - goto l747; + goto l735; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l747; + goto l735; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l747; + goto l735; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l747; + goto l735; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l747; + goto l735; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14389,7 +14411,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l747; + goto l735; } } /* begin internalActivateNewMethod */ @@ -14449,11 +14471,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l738; + goto l739; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l738: /* end getErrorObjectFromPrimFailCode */; + l739: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14473,7 +14495,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l747: /* end internalExecuteNewMethod */; + l735: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14497,15 +14519,15 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l760; + goto l759; } else { goto respondToUnknownBytecode; - goto l760; + goto l759; } } - l760: /* end case */; + l759: /* end case */; BREAK; CASE(509) /*253*/ /* extPushClosureBytecode */ @@ -14514,9 +14536,8 @@ interpret(void) sqInt byte; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14536,12 +14557,11 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l789; + goto l788; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); - l789: /* end ensureFrameIsMarried:SP: */; + l788: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -14567,20 +14587,20 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l781; + goto l780; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l781: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l780: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -14693,12 +14713,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l799; + goto l807; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l799: /* end classAtIndex: */; + l807: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14713,18 +14733,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -14771,28 +14795,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l805; + goto l792; } if (localPrimIndex == 256) { - goto l805; + goto l792; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l805; + goto l792; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l805; + goto l792; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l805; + goto l792; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l805; + goto l792; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14828,7 +14852,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l805; + goto l792; } } /* begin internalActivateNewMethod */ @@ -14912,7 +14936,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l805: /* end internalExecuteNewMethod */; + l792: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -15373,16 +15397,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -15423,7 +15447,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -15579,7 +15603,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -15646,7 +15670,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -15715,7 +15739,7 @@ positive64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -16119,7 +16143,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -16157,7 +16180,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -16928,8 +16951,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17108,8 +17131,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17290,7 +17313,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -17475,8 +17498,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17880,7 +17903,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -17974,8 +17997,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -18197,7 +18220,7 @@ primitiveClosureValue(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -18320,7 +18343,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -18440,7 +18463,7 @@ primitiveClosureValueWithArgs(void) sqInt i; sqInt index; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -18738,7 +18761,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -18748,7 +18771,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -18759,7 +18782,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -18776,7 +18799,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -18788,8 +18811,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -18807,7 +18829,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -18925,7 +18947,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -19638,8 +19660,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -19705,7 +19727,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -19763,7 +19785,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -20491,8 +20513,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -20500,14 +20521,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -20532,8 +20553,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -20541,14 +20561,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -20575,8 +20595,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -20584,14 +20603,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -20623,7 +20642,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -20866,6 +20885,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -21098,7 +21164,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -21284,7 +21350,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -21459,7 +21525,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -22680,7 +22746,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -22916,7 +22982,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -23235,7 +23301,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -23329,7 +23395,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -23390,7 +23456,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -23543,8 +23609,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -23552,18 +23617,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -23586,8 +23651,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -23595,18 +23659,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -23618,8 +23682,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -23627,22 +23690,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -25476,7 +25539,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -25537,7 +25600,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -26810,7 +26873,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -28110,8 +28173,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -28119,14 +28181,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -28151,8 +28213,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -28160,14 +28221,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -28194,8 +28255,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -28203,14 +28263,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -28562,7 +28622,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -28651,7 +28711,7 @@ signed64BitValueOf(sqInt oop) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28953,8 +29013,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -29362,9 +29421,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -29539,7 +29598,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -29608,7 +29667,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -29704,7 +29763,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -29720,7 +29779,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -29731,7 +29790,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -30185,8 +30244,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -30194,14 +30252,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -30224,8 +30282,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -30233,14 +30290,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -30286,8 +30343,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -30295,14 +30351,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -30434,7 +30490,6 @@ copyAndForwardMourner(sqInt mourner) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -30464,12 +30519,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -30508,7 +30562,6 @@ copyAndForward(sqInt survivor) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -30554,12 +30607,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -30594,12 +30646,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -30796,7 +30848,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -31325,8 +31377,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -31771,8 +31822,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -31780,14 +31830,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -31813,8 +31863,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -31822,14 +31871,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -31844,8 +31893,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -31853,14 +31901,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -32234,7 +32282,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -32242,7 +32290,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -32253,8 +32301,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -32295,8 +32342,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -32304,14 +32350,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -32350,8 +32396,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -32398,8 +32443,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -32407,14 +32451,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -32463,8 +32507,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -32472,14 +32515,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -32525,8 +32568,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -32580,8 +32622,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -32589,14 +32630,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -32655,7 +32696,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -32672,7 +32713,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -32772,8 +32813,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -32809,8 +32849,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -32818,14 +32857,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -32862,8 +32901,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -32871,14 +32909,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -32908,8 +32946,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -32917,14 +32954,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -33035,8 +33072,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -33044,14 +33080,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -33075,8 +33111,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -33084,14 +33119,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -33117,8 +33152,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -33126,14 +33160,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -33175,8 +33209,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -33184,14 +33217,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -34254,8 +34287,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -34263,14 +34295,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -34315,8 +34347,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -34324,14 +34355,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -34411,8 +34442,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -34420,14 +34450,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -34583,12 +34613,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -34631,8 +34661,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -34640,14 +34669,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -34698,12 +34727,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -34746,8 +34775,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -34755,14 +34783,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -34855,12 +34883,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -34919,8 +34947,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -34928,14 +34955,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -34985,7 +35012,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -35026,7 +35053,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -35620,8 +35647,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -35629,14 +35655,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -35705,8 +35731,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -35714,14 +35739,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -35742,8 +35767,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -35751,14 +35775,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -35781,8 +35805,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -35790,14 +35813,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -36177,8 +36200,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -36186,14 +36208,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -36225,8 +36247,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -36234,14 +36255,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -36275,8 +36296,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -36284,14 +36304,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -36577,7 +36597,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -36831,8 +36850,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -36840,14 +36858,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -36870,8 +36888,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -36879,14 +36896,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -37122,8 +37139,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -37131,14 +37147,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -37171,8 +37187,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -37180,14 +37195,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -37222,8 +37237,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -37231,14 +37245,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -37318,8 +37332,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -37327,14 +37340,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -37364,8 +37377,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -37373,14 +37385,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -37412,8 +37424,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -37421,14 +37432,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -38016,7 +38027,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -38340,8 +38351,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -38349,14 +38359,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -38379,8 +38389,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -38388,14 +38397,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -38420,8 +38429,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -38429,14 +38437,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -38494,7 +38502,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -38502,7 +38510,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -38541,10 +38549,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -38595,8 +38603,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -38604,14 +38611,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -38648,11 +38655,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -40093,8 +40100,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -40116,8 +40122,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40161,7 +40166,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -40169,7 +40174,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -40177,7 +40182,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -40185,11 +40190,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -40199,7 +40204,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -40207,11 +40212,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -40224,8 +40229,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -40233,17 +40237,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -40267,7 +40271,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -40284,7 +40288,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -40305,8 +40309,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -40314,17 +40317,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -40332,8 +40335,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40341,17 +40343,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -40371,7 +40373,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -40431,8 +40432,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -40440,14 +40440,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -40573,8 +40573,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40582,14 +40581,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -40619,8 +40618,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40628,14 +40626,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40658,8 +40656,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40667,14 +40664,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -40780,8 +40777,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -40789,14 +40785,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40850,8 +40846,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40859,14 +40854,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40922,8 +40917,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40931,14 +40925,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -41079,7 +41073,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -41105,7 +41099,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -41130,7 +41124,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -41156,7 +41150,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -41179,8 +41173,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41188,14 +41181,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -41667,7 +41660,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -41907,7 +41900,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -42276,8 +42269,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42313,7 +42305,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -42328,7 +42320,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -42576,8 +42568,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42599,8 +42590,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -42623,8 +42613,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -42645,8 +42634,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -42724,8 +42712,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42733,14 +42720,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42762,8 +42749,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -42771,14 +42757,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -42803,8 +42789,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -42812,14 +42797,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -42928,8 +42913,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43015,8 +42999,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43024,14 +43007,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43066,8 +43049,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -43075,14 +43057,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43110,8 +43092,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43119,14 +43100,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -43269,8 +43250,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43752,8 +43732,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43761,14 +43740,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43799,8 +43778,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43808,14 +43786,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -43848,8 +43826,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43857,14 +43834,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -43968,8 +43945,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43977,14 +43953,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44022,8 +43998,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44031,14 +44006,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -44078,8 +44053,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44087,14 +44061,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -44220,8 +44194,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44229,14 +44202,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44266,8 +44239,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44275,14 +44247,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44305,8 +44277,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44314,14 +44285,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -44397,8 +44368,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44406,14 +44376,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44441,8 +44411,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44450,14 +44419,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -44480,8 +44449,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44489,14 +44457,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -44842,8 +44810,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44851,14 +44818,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44888,8 +44855,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44897,14 +44863,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44927,8 +44893,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44936,14 +44901,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -45069,8 +45034,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45078,14 +45042,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45114,8 +45078,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45123,14 +45086,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45161,8 +45124,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45170,14 +45132,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -45260,8 +45222,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45269,14 +45230,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45312,8 +45273,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45321,14 +45281,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45366,8 +45326,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45375,14 +45334,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -45466,8 +45425,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45475,14 +45433,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45512,8 +45470,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45521,14 +45478,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45551,8 +45508,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45560,14 +45516,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -45777,8 +45733,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45786,14 +45741,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45821,8 +45776,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45830,14 +45784,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45858,8 +45812,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45867,14 +45820,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -45948,13 +45901,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -45962,15 +45915,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -45980,7 +45933,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -46004,8 +45957,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -46013,14 +45965,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46041,13 +45993,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -46055,15 +46007,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -46073,7 +46025,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -46097,8 +46049,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46106,14 +46057,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46135,13 +46086,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -46149,15 +46100,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -46167,7 +46118,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -46192,8 +46143,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46201,14 +46151,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -46632,7 +46582,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -46642,8 +46591,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -46694,7 +46642,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -46887,6 +46835,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -47002,7 +46960,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -47019,7 +46977,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -47043,7 +47001,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -47060,7 +47018,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -47126,8 +47084,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -47290,7 +47247,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -47972,11 +47929,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -47991,7 +47948,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -48005,8 +47962,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -48014,16 +47970,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -48047,8 +48003,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48056,14 +48011,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -48083,16 +48038,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -48101,11 +48056,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -48113,7 +48068,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -48181,8 +48136,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -48190,14 +48144,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -48296,8 +48250,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -48317,8 +48270,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -48326,14 +48278,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -48391,8 +48343,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48469,7 +48420,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -48491,7 +48442,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -48540,7 +48491,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -48554,8 +48505,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48563,16 +48513,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -48637,8 +48587,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48646,14 +48595,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -48672,9 +48621,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -48690,9 +48636,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -48720,9 +48665,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -48733,8 +48677,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48744,9 +48687,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -48804,7 +48746,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -48879,8 +48821,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48936,8 +48877,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -48945,14 +48885,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -49015,8 +48955,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49024,14 +48963,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -49147,8 +49086,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49156,14 +49094,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -49202,7 +49140,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -49364,13 +49302,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l65; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l65: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l66; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -49378,15 +49316,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l66; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l66; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l66; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -49396,7 +49334,7 @@ updatePointers(void) assert((header1 & 1)); numLiterals1 = ((header1 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -49423,8 +49361,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -49432,14 +49369,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -49451,7 +49388,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -49464,13 +49401,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -49478,15 +49415,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots22); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -49496,7 +49433,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals2 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -49524,8 +49461,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49533,16 +49469,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l33; + goto l35; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l33: /* end objectAfter:limit: */; + l35: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -49583,13 +49519,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -49597,15 +49533,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -49615,7 +49551,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals3 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -49652,8 +49588,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -49688,7 +49623,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -49701,8 +49636,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -49710,18 +49644,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -49744,13 +49678,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -49758,15 +49692,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots2); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -49776,7 +49710,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -49805,8 +49739,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49814,14 +49747,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } } @@ -50016,8 +49949,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -50025,14 +49957,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -50117,7 +50049,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -50217,8 +50149,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -50385,7 +50317,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -50501,8 +50433,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -50510,24 +50441,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -50590,8 +50521,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -50820,8 +50751,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); @@ -51476,8 +51407,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -51485,14 +51415,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51513,8 +51443,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -51522,14 +51451,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -51552,8 +51481,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51561,14 +51489,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -52446,7 +52374,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -52456,7 +52384,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -52544,9 +52472,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -52652,6 +52580,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -53266,8 +53223,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -53275,14 +53231,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -53334,8 +53290,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -53343,14 +53298,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53404,8 +53359,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -53413,20 +53367,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -53459,8 +53413,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53468,14 +53421,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53500,8 +53453,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -53509,14 +53461,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53543,8 +53495,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -53552,16 +53503,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -53644,8 +53595,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -53722,8 +53674,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -53845,8 +53798,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -55406,8 +55360,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* To overflow the stack this must be a new frame, but in Cog base frames are married. */ assert(!(frameHasContext(GIV(framePointer)))); @@ -56590,7 +56545,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -56742,7 +56697,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -56929,7 +56884,7 @@ lookupMNU(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -57089,7 +57044,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -57271,7 +57226,7 @@ lookupOrdinarySend(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -57434,7 +57389,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -57589,7 +57544,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -57884,7 +57839,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -58374,8 +58329,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); GIV(method) = aMethodObj; @@ -58426,7 +58382,6 @@ marryFrameSP(char *theFP, char *theSP) numArgs = byteAt((theFP + FoxFrameFlags) + 1); numStack = (((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1)); if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) { - /* begin pushedReceiverOrClosureOfFrame: */ closureOrNil = longAt(theFP + (frameStackedReceiverOffset(theFP))); } else { @@ -58625,18 +58580,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* StackInterpreter>>#methodHeaderIndicatesLargeFrame: */ @@ -58847,7 +58803,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -59020,6 +58976,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -59081,7 +59070,7 @@ popthenPush(sqInt nItems, sqInt oop) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -59142,8 +59131,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -59255,7 +59244,7 @@ positive64BitIntegerFor(usqLong integerValue) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -59699,8 +59688,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -59708,14 +59696,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -59746,8 +59734,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -59755,14 +59742,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -59786,8 +59773,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59795,14 +59781,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -60531,7 +60517,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -60542,23 +60528,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -60574,38 +60560,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -60618,7 +60604,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -60626,7 +60612,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -60637,7 +60623,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -60651,7 +60637,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -60664,12 +60650,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -60680,7 +60666,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -60688,9 +60674,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -60704,8 +60690,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60713,14 +60698,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -60767,7 +60752,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -60778,23 +60763,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -60810,38 +60795,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -60854,7 +60839,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -60862,7 +60847,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -60873,7 +60858,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -60887,7 +60872,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -60900,12 +60885,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -60916,7 +60901,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -60924,9 +60909,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -60940,8 +60925,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60949,14 +60933,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -61004,7 +60988,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -61015,23 +60999,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -61047,38 +61031,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -61091,7 +61075,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -61099,7 +61083,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -61110,7 +61094,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -61124,7 +61108,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -61137,12 +61121,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -61153,7 +61137,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -61161,9 +61145,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -61178,8 +61162,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -61187,14 +61170,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -62503,7 +62486,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -62853,6 +62836,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); return dataSize; } @@ -62963,11 +62947,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -63177,7 +63163,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); /* begin fetchPointer:ofObject: */ methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); @@ -63273,14 +63259,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -63297,6 +63292,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -63309,21 +63305,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); assert(isOopCompiledMethod(GIV(method))); @@ -63331,12 +63331,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? 256 : 0); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !0, __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -63352,6 +63355,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -63365,11 +63369,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -63389,6 +63396,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -63556,15 +63567,27 @@ schedulerPointer(void) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* StackInterpreter>>#sendInvokeCallbackContext: */ EXPORT(sqInt) @@ -63598,6 +63621,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) char *sp7; sqInt table; + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -63610,8 +63634,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin push: */ object3 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); longAtput((sp3 = GIV(stackPointer) - BytesPerWord), object3); @@ -63724,6 +63750,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ interpret(); return 1; @@ -64326,7 +64353,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -65313,7 +65340,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -65428,7 +65455,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -66208,6 +66235,7 @@ transferTo(sqInt newProc) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin setMethod: */ @@ -66521,8 +66549,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -66530,14 +66557,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66566,8 +66593,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -66575,14 +66601,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66613,8 +66639,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -66622,14 +66647,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return activeContext; } @@ -67081,10 +67106,9 @@ primitiveClosureCopyWithCopiedValues(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt copiedValues; sqInt i; - sqInt initialIP; sqInt integerPointer; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -67119,7 +67143,6 @@ primitiveClosureCopyWithCopiedValues(void) return; } /* begin closureIn:numArgs:instructionPointer:copiedValues: */ - initialIP = (GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize); copiedValues = longAt(GIV(stackPointer)); /* begin numSlotsOf: */ assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); @@ -67165,7 +67188,7 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), longAt(GIV(stackPointer) + (2 * BytesPerWord))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)((GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -67204,8 +67227,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -69598,7 +69621,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -69955,7 +69978,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -69992,7 +70015,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -70452,7 +70475,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -70604,7 +70627,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -70808,7 +70831,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -71101,8 +71124,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -71485,8 +71509,10 @@ primitiveTerminateTo(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -71573,7 +71599,6 @@ primitiveVMParameter(void) char *sp; char *sp1; char *sp2; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -71623,6 +71648,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -71632,165 +71658,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -71798,9 +71788,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -71808,213 +71798,118 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = GIV(nilObj); + valuePointer35 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = GIV(nilObj); + valuePointer36 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)((((GIV(preemptionYields) + valuePointer37 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = GIV(nilObj); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = GIV(nilObj); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = ConstZero; + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = ConstZero; + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -72043,7 +71938,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -72076,14 +71971,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -72159,7 +72057,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -72277,47 +72175,37 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l95; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l95: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -72383,11 +72271,11 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if ((((usqInt)arg)) > 0x1F) { /* begin primitiveFailFor: */ GIV(primFailCode) = PrimErrUnsupported; - goto l72; + goto l84; } GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l72: /* end setCogVMFlags: */; + l84: /* end setCogVMFlags: */; } } if (index == 49) { @@ -72410,14 +72298,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l93; + goto l96; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l93: /* end floatValueOf: */; + l96: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -72643,8 +72531,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -72652,14 +72539,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -72694,8 +72581,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -72703,14 +72589,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72738,8 +72624,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -72747,14 +72632,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -72803,6 +72688,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -72848,6 +72734,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/nsspurstacksrc/vm/interp.c b/nsspurstacksrc/vm/interp.c index b9b5170ca..29546d04e 100644 --- a/nsspurstacksrc/vm/interp.c +++ b/nsspurstacksrc/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -468,6 +468,7 @@ static void primitiveForceDisplayUpdate(void); static void primitiveFormPrint(void); static void primitiveFractionalPart(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -641,7 +642,7 @@ static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -903,8 +904,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -971,6 +972,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1072,14 +1074,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1223,6 +1226,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1529,6 +1533,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1542,11 +1548,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1578,6 +1582,7 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 2049 */]; _iss sqIntptr_t nsMethodCache[NSMethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; @@ -1599,7 +1604,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; #undef _iss #if SQ_USE_GLOBAL_STRUCT } fum; @@ -1628,6 +1632,7 @@ static struct foo * foo = &fum; static void (*primitiveFunctionPointer)(); sqInt checkForLeaks; sqInt checkAllocFiller; +sqInt debugCallbackPath; sqInt desiredEdenBytes; sqInt desiredNumStackPages; sqInt extraVMMemory; @@ -1639,6 +1644,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; char * breakSelector; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2220,7 +2228,7 @@ static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { 0 }; sqInt checkedPluginName; char expensiveAsserts = 0; -const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.2142"; +const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.2165"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -4792,7 +4800,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l818; + goto l816; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -4841,7 +4849,7 @@ interpret(void) if (((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) && (home == (longAt(theFP2 + FoxThisContext)))) { ctxtOrNilOrZero = 0; - goto l825; + goto l823; } if (!((byteAt((theFP2 + FoxFrameFlags) + 3)) != 0)) { theMethod1 = longAt(theFP2 + FoxMethod); @@ -4858,10 +4866,10 @@ interpret(void) if ((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(theFP2))); ctxtOrNilOrZero = longAt(theFP2 + FoxThisContext); - goto l825; + goto l823; } ctxtOrNilOrZero = marryFrameSP(theFP2, theSP); - goto l825; + goto l823; } } theFPAbove = theFP2; @@ -4872,10 +4880,10 @@ interpret(void) && (((longAt(senderContext)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { /* begin nilObject */ ctxtOrNilOrZero = GIV(nilObj); - goto l825; + goto l823; } ctxtOrNilOrZero = findMethodWithPrimitiveFromContextUpToContext(198, senderContext, home); - l825: /* end findMethodWithPrimitive:FromFP:UpToContext: */; + l823: /* end findMethodWithPrimitive:FromFP:UpToContext: */; assert(!((onSamePage && (ctxtOrNilOrZero == (nilObject()))))); if (ctxtOrNilOrZero == 0) { @@ -4883,21 +4891,21 @@ interpret(void) theMethod = longAt((home + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))); if ((primitiveIndexOfMethodheader(theMethod, methodHeaderOf(theMethod))) == 198) { unwindContextOrNilOrZero = home; - goto l845; + goto l843; } unwindContextOrNilOrZero = 0; - goto l845; + goto l843; } if (!(onSamePage || (ctxtOrNilOrZero == GIV(nilObj)))) { if ((findMethodWithPrimitiveFromContextUpToContext(0, ctxtOrNilOrZero, home)) == GIV(nilObj)) { /* begin nilObject */ unwindContextOrNilOrZero = GIV(nilObj); - goto l845; + goto l843; } } unwindContextOrNilOrZero = ctxtOrNilOrZero; - l845: /* end findUnwindThroughContext: */; + l843: /* end findUnwindThroughContext: */; if (unwindContextOrNilOrZero == GIV(nilObj)) { /* error: can't find home on chain; cannot return */ @@ -4905,10 +4913,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l846; + goto l844; } ourContext = marryFrameSP(localFP, localSP); - l846: /* end ensureFrameIsMarried:SP: */; + l844: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -4918,17 +4926,17 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l818; + goto l816; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l828; + goto l826; } ourContext1 = marryFrameSP(localFP, localSP); - l828: /* end ensureFrameIsMarried:SP: */; + l826: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -4940,7 +4948,7 @@ interpret(void) GIV(argumentCount) = 2; goto normalSend; /* return self */ - goto l818; + goto l816; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -4977,30 +4985,30 @@ interpret(void) if (!(((contextToReturnTo & (tagMask())) == 0) && (((longAt(contextToReturnTo)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { frameToReturnTo = 0; - goto l832; + goto l830; } if (((longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { if (isWidowedContext(contextToReturnTo)) { /* error: home's sender is dead; cannot return */ frameToReturnTo = 0; - goto l832; + goto l830; } /* begin frameOfMarriedContext: */ senderOop2 = longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop2 & 1)); frameToReturnTo = pointerForOop(senderOop2 - 1); - goto l832; + goto l830; } if (!(((longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))))) & 1))) { frameToReturnTo = 0; - goto l832; + goto l830; } thePage1 = makeBaseFrameFor(contextToReturnTo); markStackPageMostRecentlyUsed(thePage1); frameToReturnTo = (thePage1->baseFP); - l832: /* end establishFrameForContextToReturnTo: */; + l830: /* end establishFrameForContextToReturnTo: */; if (frameToReturnTo == 0) { /* error: home's sender is dead; cannot return */ @@ -5008,10 +5016,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l847; + goto l845; } ourContext2 = marryFrameSP(localFP, localSP); - l847: /* end ensureFrameIsMarried:SP: */; + l845: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5021,7 +5029,7 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l818; + goto l816; } } assert(pageListIsWellFormed()); @@ -5101,7 +5109,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l818: /* end case */; + l816: /* end case */; break; case 121: /* returnTrue */ @@ -5202,18 +5210,18 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l859; + goto l857; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l859; + goto l857; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l859: /* end findFrameAbove:inPage: */; + l857: /* end findFrameAbove:inPage: */; moveFramesInthroughtoPage(thePage, frameAbove, GIV(stackPage)); theFP = (thePage->headFP); theSP = (thePage->headSP); @@ -5226,10 +5234,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l850; + goto l848; } ourContext = marryFrameSP(localFP, localSP); - l850: /* end ensureFrameIsMarried:SP: */; + l848: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5239,7 +5247,7 @@ interpret(void) GIV(argumentCount) = 1; goto normalSend; /* return self */ - goto l856; + goto l854; } thePage = makeBaseFrameFor(contextToReturnTo); theFP = (thePage->headFP); @@ -5270,8 +5278,8 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); /* return self */ - l856: /* end baseFrameReturn */; - goto l849; + l854: /* end baseFrameReturn */; + goto l847; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)((byteAt((localFP + FoxFrameFlags) + 1))) << (shiftForWord()))))); @@ -5288,7 +5296,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l849: /* end case */; + l847: /* end case */; break; case 126: case 127: @@ -5316,10 +5324,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l861; + goto l859; } ourContext = marryFrameSP(localFP, localSP); - l861: /* end ensureFrameIsMarried:SP: */; + l859: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -5741,7 +5749,7 @@ interpret(void) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l876; + goto l863; } /* second probe */ @@ -5750,14 +5758,14 @@ interpret(void) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l876; + goto l863; } probe1 = (((usqInt) hash1) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe1 + MethodCacheSelector]) == GIV(messageSelector)) && ((GIV(methodCache)[probe1 + MethodCacheClass]) == GIV(lkupClassTag))) { GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); - goto l876; + goto l863; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -5774,7 +5782,7 @@ interpret(void) GIV(lkupClassTag) = handleForwardedSendFaultForTag(GIV(lkupClassTag)); } if (lookupInMethodCacheSelclassTag(GIV(messageSelector), GIV(lkupClassTag))) { - goto l867; + goto l873; } } /* begin classForClassTag: */ @@ -5787,12 +5795,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l872; + goto l866; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l872: /* end classForClassTag: */; + l866: /* end classForClassTag: */; lookupOrdinarySend(); /* begin internalizeIPandSP */ @@ -5800,8 +5808,8 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); - l876: ; - l867: /* end internalFindNewMethodOrdinary */; + l863: ; + l873: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -5814,28 +5822,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l875; + goto l868; } if (localPrimIndex == 256) { - goto l875; + goto l868; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l875; + goto l868; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l875; + goto l868; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l875; + goto l868; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l875; + goto l868; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -5871,7 +5879,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l875; + goto l868; } } /* begin internalActivateNewMethod */ @@ -5931,11 +5939,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l874; + goto l865; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l874: /* end getErrorObjectFromPrimFailCode */; + l865: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -5955,7 +5963,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l875: /* end internalExecuteNewMethod */; + l868: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6370,18 +6378,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -6491,7 +6503,7 @@ interpret(void) case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -6704,9 +6716,8 @@ interpret(void) sqInt blockSize; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -6734,7 +6745,6 @@ interpret(void) context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l139: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -6773,7 +6783,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -7365,7 +7375,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l894; + goto l891; } if (bytecode == 172) { @@ -7374,7 +7384,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l894; + goto l891; } if (bytecode > 167) { @@ -7384,7 +7394,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l894; + goto l891; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -7392,7 +7402,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l894: /* end case */; + l891: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -7503,7 +7513,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l897; + goto l894; } if (bytecode == 172) { @@ -7513,14 +7523,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l897; + goto l894; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l897: /* end case */; + l894: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -8158,7 +8168,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -8420,7 +8430,7 @@ interpret(void) sqLong hdr1; sqInt index; sqInt index1; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots11; @@ -8680,7 +8690,7 @@ interpret(void) if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -10097,7 +10107,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l898; + goto l895; } if (bytecode == 244) { @@ -10106,7 +10116,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l898; + goto l895; } if (bytecode == 243) { @@ -10116,7 +10126,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l898; + goto l895; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10124,7 +10134,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l898: /* end case */; + l895: /* end case */; break; case 339: /*83*/ /* bytecodePrimGreaterThanV4 */ @@ -10235,7 +10245,7 @@ interpret(void) localIP = (localIP + (bytecode - 207)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l901; + goto l898; } if (bytecode == 244) { @@ -10245,14 +10255,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l901; + goto l898; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l901: /* end case */; + l898: /* end case */; break; case 340: /*84*/ /* bytecodePrimLessOrEqualV4 */ @@ -10890,7 +10900,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -11152,7 +11162,7 @@ interpret(void) sqLong hdr1; sqInt index; sqInt index1; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots11; @@ -11412,7 +11422,7 @@ interpret(void) if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -12625,7 +12635,7 @@ interpret(void) case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -13283,7 +13293,7 @@ interpret(void) usqInt length; sqInt literal; sqInt localPrimIndex; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; usqInt methodPointer; @@ -13354,12 +13364,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l928; + goto l912; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l928: /* end classAtIndex: */; + l912: /* end classAtIndex: */; /* begin lookupImplicitReceiverSend */ GIV(messageSelector) = (((GIV(messageSelector) & (tagMask())) == 0) && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) @@ -13379,18 +13389,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + candidateMixin = objOop2; + } + else { + /* begin nilObject */ + candidateMixin = GIV(nilObj); } - candidateMixin = literal; GIV(localAbsentReceiverOrZero) = 0; while (1) { assert(!((isForwarded(candidateMixin)))); @@ -13517,7 +13531,7 @@ interpret(void) if (found) { GIV(localAbsentReceiver) = candidateReceiver; actualLookupRule = lookupLexicalfromrule(GIV(messageSelector), candidateMixin, LookupRuleImplicit); - goto l911; + goto l914; } /* begin followObjField:ofObject: */ objOop1 = longAt((candidateMixin + BaseHeaderSize) + (((int)((usqInt)(EnclosingMixinIndex) << (shiftForWord()))))); @@ -13537,7 +13551,7 @@ interpret(void) ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits2) << (shiftForWord()))))) : fetchClassOfNonImm(methodReceiver)); actualLookupRule = lookupProtectedstartingAtrule(GIV(messageSelector), GIV(lkupClass), LookupRuleImplicit); - l911: /* end lookupImplicitReceiverSend */; + l914: /* end lookupImplicitReceiverSend */; /* begin internalizeIPandSP */ localIP = pointerForOop(GIV(instructionPointer)); localSP = pointerForOop(GIV(stackPointer)); @@ -13568,28 +13582,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l910; + goto l918; } if (localPrimIndex == 256) { - goto l910; + goto l918; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l910; + goto l918; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l910; + goto l918; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l910; + goto l918; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l910; + goto l918; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -13625,7 +13639,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l910; + goto l918; } } /* begin internalActivateNewMethod */ @@ -13685,11 +13699,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l902; + goto l920; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l902: /* end getErrorObjectFromPrimFailCode */; + l920: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -13709,7 +13723,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l910: /* end internalExecuteNewMethod */; + l918: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -13787,7 +13801,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l955; + goto l957; } /* second probe */ @@ -13799,7 +13813,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l955; + goto l957; } probe1 = (((usqInt) hash1) >> 2) & NSMethodCacheMask; if (((((GIV(nsMethodCache)[probe1 + NSMethodCacheSelector]) == GIV(messageSelector)) @@ -13809,7 +13823,7 @@ interpret(void) GIV(newMethod) = GIV(nsMethodCache)[probe1 + NSMethodCacheTargetMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(nsMethodCache)[probe1 + NSMethodCachePrimFunction])); GIV(localAbsentReceiverOrZero) = GIV(nsMethodCache)[probe1 + NSMethodCacheActualReceiver]; - goto l955; + goto l957; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -13836,12 +13850,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l953; + goto l943; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l953: /* end classForClassTag: */; + l943: /* end classForClassTag: */; /* begin lookupDynamicSuperSend */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -13856,18 +13870,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + methodMixin = objOop2; + } + else { + /* begin nilObject */ + methodMixin = GIV(nilObj); } - methodMixin = literal; methodMixinApplication = findApplicationOfTargetMixinstartingAtBehavior(methodMixin, (((tagBits1 = GIV(localAbsentReceiver) & (tagMask()))) != 0 ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits1) << (shiftForWord()))))) : fetchClassOfNonImm(GIV(localAbsentReceiver)))); @@ -13884,7 +13902,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); addNewMethodToNSCache(actualLookupRule); - l955: ; + l957: ; /* begin shuffleArgumentsAndStoreAbsentReceiver: */ @@ -13910,28 +13928,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l956; + goto l942; } if (localPrimIndex == 256) { - goto l956; + goto l942; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l956; + goto l942; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l956; + goto l942; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l956; + goto l942; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l956; + goto l942; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -13967,7 +13985,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l956; + goto l942; } } /* begin internalActivateNewMethod */ @@ -14051,7 +14069,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l956: /* end internalExecuteNewMethod */; + l942: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14245,12 +14263,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l741; + goto l750; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l741: /* end classAtIndex: */; + l750: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14265,18 +14283,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < 0) { count += 1; @@ -14323,28 +14345,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l747; + goto l735; } if (localPrimIndex == 256) { - goto l747; + goto l735; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l747; + goto l735; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l747; + goto l735; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l747; + goto l735; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l747; + goto l735; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14380,7 +14402,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l747; + goto l735; } } /* begin internalActivateNewMethod */ @@ -14440,11 +14462,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l738; + goto l739; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l738: /* end getErrorObjectFromPrimFailCode */; + l739: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -14464,7 +14486,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l747: /* end internalExecuteNewMethod */; + l735: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -14488,15 +14510,15 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l760; + goto l759; } else { goto respondToUnknownBytecode; - goto l760; + goto l759; } } - l760: /* end case */; + l759: /* end case */; break; case 509: /*253*/ /* extPushClosureBytecode */ @@ -14505,9 +14527,8 @@ interpret(void) sqInt byte; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14527,12 +14548,11 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); context = longAt(localFP + FoxThisContext); - goto l789; + goto l788; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); - l789: /* end ensureFrameIsMarried:SP: */; + l788: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -14558,20 +14578,20 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l781; + goto l780; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l781: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l780: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -14684,12 +14704,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { GIV(lkupClass) = null; - goto l799; + goto l807; } /* begin fetchPointer:ofObject: */ fieldIndex1 = GIV(lkupClassTag) & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l799: /* end classAtIndex: */; + l807: /* end classAtIndex: */; /* begin lookupOuterSend: */ GIV(localAbsentReceiver) = longAt(localFP + FoxReceiver); GIV(localAbsentReceiverOrZero) = 0; @@ -14704,18 +14724,22 @@ interpret(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + targetMixin = objOop2; + } + else { + /* begin nilObject */ + targetMixin = GIV(nilObj); } - targetMixin = literal; count = 0; while (count < depth) { count += 1; @@ -14762,28 +14786,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l805; + goto l792; } if (localPrimIndex == 256) { - goto l805; + goto l792; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l805; + goto l792; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l805; + goto l792; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l805; + goto l792; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l805; + goto l792; } /* begin externalizeIPandSP */ GIV(instructionPointer) = oopForPointer(localIP); @@ -14819,7 +14843,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); if (succeeded) { browserPluginReturnIfNeeded(); - goto l805; + goto l792; } } /* begin internalActivateNewMethod */ @@ -14903,7 +14927,7 @@ interpret(void) localSP = pointerForOop(GIV(stackPointer)); localFP = pointerForOop(GIV(framePointer)); } - l805: /* end internalExecuteNewMethod */; + l792: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -15364,16 +15388,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -15414,7 +15438,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -15570,7 +15594,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -15637,7 +15661,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -15706,7 +15730,7 @@ positive64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -16110,7 +16134,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -16148,7 +16171,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -16919,8 +16942,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17099,8 +17122,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17281,7 +17304,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -17466,8 +17489,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -17871,7 +17894,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -17965,8 +17988,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -18188,7 +18211,7 @@ primitiveClosureValue(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -18311,7 +18334,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -18431,7 +18454,7 @@ primitiveClosureValueWithArgs(void) sqInt i; sqInt index; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -18729,7 +18752,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -18739,7 +18762,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -18750,7 +18773,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -18767,7 +18790,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -18779,8 +18802,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -18798,7 +18820,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -18916,7 +18938,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -19629,8 +19651,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -19696,7 +19718,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -19754,7 +19776,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -20482,8 +20504,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -20491,14 +20512,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -20523,8 +20544,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -20532,14 +20552,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -20566,8 +20586,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -20575,14 +20594,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -20614,7 +20633,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -20857,6 +20876,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -21089,7 +21155,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -21275,7 +21341,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -21450,7 +21516,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -22671,7 +22737,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -22907,7 +22973,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -23226,7 +23292,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -23320,7 +23386,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -23381,7 +23447,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -23534,8 +23600,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -23543,18 +23608,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -23577,8 +23642,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -23586,18 +23650,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -23609,8 +23673,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -23618,22 +23681,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -25467,7 +25530,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -25528,7 +25591,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -26801,7 +26864,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -28101,8 +28164,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -28110,14 +28172,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -28142,8 +28204,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -28151,14 +28212,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -28185,8 +28246,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -28194,14 +28254,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -28553,7 +28613,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -28642,7 +28702,7 @@ signed64BitValueOf(sqInt oop) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28944,8 +29004,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -29353,9 +29412,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -29530,7 +29589,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -29599,7 +29658,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -29695,7 +29754,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -29711,7 +29770,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -29722,7 +29781,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -30176,8 +30235,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -30185,14 +30243,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -30215,8 +30273,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -30224,14 +30281,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -30277,8 +30334,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -30286,14 +30342,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -30425,7 +30481,6 @@ copyAndForwardMourner(sqInt mourner) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -30455,12 +30510,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -30499,7 +30553,6 @@ copyAndForward(sqInt survivor) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -30545,12 +30598,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -30585,12 +30637,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -30787,7 +30839,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -31316,8 +31368,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -31762,8 +31813,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -31771,14 +31821,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -31804,8 +31854,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -31813,14 +31862,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -31835,8 +31884,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -31844,14 +31892,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -32225,7 +32273,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -32233,7 +32281,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -32244,8 +32292,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -32286,8 +32333,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -32295,14 +32341,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -32341,8 +32387,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -32389,8 +32434,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -32398,14 +32442,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -32454,8 +32498,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -32463,14 +32506,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -32516,8 +32559,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -32571,8 +32613,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -32580,14 +32621,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -32646,7 +32687,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -32663,7 +32704,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -32763,8 +32804,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -32800,8 +32840,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -32809,14 +32848,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -32853,8 +32892,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -32862,14 +32900,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -32899,8 +32937,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -32908,14 +32945,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -33026,8 +33063,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -33035,14 +33071,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -33066,8 +33102,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -33075,14 +33110,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -33108,8 +33143,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -33117,14 +33151,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -33166,8 +33200,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -33175,14 +33208,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -34245,8 +34278,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -34254,14 +34286,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -34306,8 +34338,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -34315,14 +34346,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -34402,8 +34433,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -34411,14 +34441,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -34574,12 +34604,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -34622,8 +34652,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -34631,14 +34660,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -34689,12 +34718,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -34737,8 +34766,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -34746,14 +34774,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -34846,12 +34874,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -34910,8 +34938,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -34919,14 +34946,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -34976,7 +35003,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -35017,7 +35044,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -35611,8 +35638,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -35620,14 +35646,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -35696,8 +35722,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -35705,14 +35730,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -35733,8 +35758,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -35742,14 +35766,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -35772,8 +35796,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -35781,14 +35804,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -36168,8 +36191,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -36177,14 +36199,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -36216,8 +36238,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -36225,14 +36246,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -36266,8 +36287,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -36275,14 +36295,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -36568,7 +36588,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -36822,8 +36841,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -36831,14 +36849,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -36861,8 +36879,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -36870,14 +36887,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -37113,8 +37130,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -37122,14 +37138,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -37162,8 +37178,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -37171,14 +37186,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -37213,8 +37228,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -37222,14 +37236,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -37309,8 +37323,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -37318,14 +37331,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -37355,8 +37368,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -37364,14 +37376,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -37403,8 +37415,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -37412,14 +37423,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -38007,7 +38018,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -38331,8 +38342,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -38340,14 +38350,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -38370,8 +38380,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -38379,14 +38388,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -38411,8 +38420,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -38420,14 +38428,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -38485,7 +38493,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -38493,7 +38501,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -38532,10 +38540,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -38586,8 +38594,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -38595,14 +38602,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -38639,11 +38646,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -40084,8 +40091,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -40107,8 +40113,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40152,7 +40157,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -40160,7 +40165,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -40168,7 +40173,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -40176,11 +40181,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -40190,7 +40195,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -40198,11 +40203,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -40215,8 +40220,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -40224,17 +40228,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -40258,7 +40262,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -40275,7 +40279,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -40296,8 +40300,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -40305,17 +40308,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -40323,8 +40326,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40332,17 +40334,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -40362,7 +40364,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -40422,8 +40423,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -40431,14 +40431,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -40564,8 +40564,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40573,14 +40572,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -40610,8 +40609,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40619,14 +40617,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40649,8 +40647,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40658,14 +40655,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -40771,8 +40768,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -40780,14 +40776,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40841,8 +40837,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40850,14 +40845,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40913,8 +40908,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40922,14 +40916,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -41070,7 +41064,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -41096,7 +41090,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -41121,7 +41115,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -41147,7 +41141,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -41170,8 +41164,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41179,14 +41172,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -41658,7 +41651,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -41898,7 +41891,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -42267,8 +42260,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42304,7 +42296,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -42319,7 +42311,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -42567,8 +42559,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42590,8 +42581,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -42614,8 +42604,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -42636,8 +42625,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -42715,8 +42703,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42724,14 +42711,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42753,8 +42740,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -42762,14 +42748,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -42794,8 +42780,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -42803,14 +42788,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -42919,8 +42904,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43006,8 +42990,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43015,14 +42998,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43057,8 +43040,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -43066,14 +43048,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43101,8 +43083,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43110,14 +43091,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -43260,8 +43241,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43743,8 +43723,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43752,14 +43731,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43790,8 +43769,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43799,14 +43777,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -43839,8 +43817,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43848,14 +43825,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -43959,8 +43936,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43968,14 +43944,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44013,8 +43989,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44022,14 +43997,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -44069,8 +44044,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44078,14 +44052,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -44211,8 +44185,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44220,14 +44193,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44257,8 +44230,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44266,14 +44238,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44296,8 +44268,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44305,14 +44276,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -44388,8 +44359,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44397,14 +44367,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44432,8 +44402,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44441,14 +44410,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -44471,8 +44440,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44480,14 +44448,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -44833,8 +44801,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44842,14 +44809,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44879,8 +44846,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44888,14 +44854,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44918,8 +44884,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44927,14 +44892,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -45060,8 +45025,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45069,14 +45033,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45105,8 +45069,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45114,14 +45077,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45152,8 +45115,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45161,14 +45123,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -45251,8 +45213,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45260,14 +45221,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45303,8 +45264,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45312,14 +45272,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45357,8 +45317,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45366,14 +45325,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -45457,8 +45416,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45466,14 +45424,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45503,8 +45461,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45512,14 +45469,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45542,8 +45499,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45551,14 +45507,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -45768,8 +45724,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45777,14 +45732,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45812,8 +45767,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45821,14 +45775,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45849,8 +45803,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45858,14 +45811,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -45939,13 +45892,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -45953,15 +45906,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -45971,7 +45924,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -45995,8 +45948,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -46004,14 +45956,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46032,13 +45984,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -46046,15 +45998,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -46064,7 +46016,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -46088,8 +46040,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46097,14 +46048,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46126,13 +46077,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -46140,15 +46091,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -46158,7 +46109,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -46183,8 +46134,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46192,14 +46142,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -46623,7 +46573,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -46633,8 +46582,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -46685,7 +46633,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -46878,6 +46826,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -46993,7 +46951,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -47010,7 +46968,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -47034,7 +46992,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -47051,7 +47009,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -47117,8 +47075,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -47281,7 +47238,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -47963,11 +47920,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -47982,7 +47939,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -47996,8 +47953,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -48005,16 +47961,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -48038,8 +47994,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48047,14 +48002,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -48074,16 +48029,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -48092,11 +48047,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -48104,7 +48059,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -48172,8 +48127,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -48181,14 +48135,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -48287,8 +48241,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -48308,8 +48261,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -48317,14 +48269,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -48382,8 +48334,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48460,7 +48411,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -48482,7 +48433,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -48531,7 +48482,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -48545,8 +48496,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48554,16 +48504,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -48628,8 +48578,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48637,14 +48586,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -48663,9 +48612,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -48681,9 +48627,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -48711,9 +48656,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -48724,8 +48668,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48735,9 +48678,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -48795,7 +48737,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -48870,8 +48812,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48927,8 +48868,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -48936,14 +48876,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -49006,8 +48946,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49015,14 +48954,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -49138,8 +49077,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49147,14 +49085,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -49193,7 +49131,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -49355,13 +49293,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l65; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l65: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l66; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -49369,15 +49307,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l66; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l66; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l66; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -49387,7 +49325,7 @@ updatePointers(void) assert((header1 & 1)); numLiterals1 = ((header1 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -49414,8 +49352,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -49423,14 +49360,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -49442,7 +49379,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -49455,13 +49392,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -49469,15 +49406,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots22); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -49487,7 +49424,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals2 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -49515,8 +49452,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49524,16 +49460,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l33; + goto l35; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l33: /* end objectAfter:limit: */; + l35: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -49574,13 +49510,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -49588,15 +49524,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -49606,7 +49542,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals3 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -49643,8 +49579,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -49679,7 +49614,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -49692,8 +49627,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -49701,18 +49635,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -49735,13 +49669,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -49749,15 +49683,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots2); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -49767,7 +49701,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -49796,8 +49730,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49805,14 +49738,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } } @@ -50007,8 +49940,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -50016,14 +49948,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -50108,7 +50040,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -50208,8 +50140,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -50376,7 +50308,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -50492,8 +50424,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -50501,24 +50432,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -50581,8 +50512,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -50811,8 +50742,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); @@ -51467,8 +51398,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -51476,14 +51406,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51504,8 +51434,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -51513,14 +51442,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -51543,8 +51472,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51552,14 +51480,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -52437,7 +52365,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -52447,7 +52375,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -52535,9 +52463,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -52643,6 +52571,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -53257,8 +53214,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -53266,14 +53222,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -53325,8 +53281,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -53334,14 +53289,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53395,8 +53350,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -53404,20 +53358,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -53450,8 +53404,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53459,14 +53412,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53491,8 +53444,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -53500,14 +53452,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53534,8 +53486,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -53543,16 +53494,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -53635,8 +53586,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -53713,8 +53665,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -53836,8 +53789,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -55397,8 +55351,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* To overflow the stack this must be a new frame, but in Cog base frames are married. */ assert(!(frameHasContext(GIV(framePointer)))); @@ -56581,7 +56536,7 @@ lookupLexicalfromrule(sqInt selector, sqInt mixin, sqInt rule) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt mixinApplication; sqInt nextSelector; @@ -56733,7 +56688,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -56920,7 +56875,7 @@ lookupMNU(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -57080,7 +57035,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -57262,7 +57217,7 @@ lookupOrdinarySend(void) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -57425,7 +57380,7 @@ lookupProtectedstartingAtrule(sqInt selector, sqInt mixinApplication, sqInt rule sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -57580,7 +57535,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -57875,7 +57830,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -58365,8 +58320,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); GIV(method) = aMethodObj; @@ -58417,7 +58373,6 @@ marryFrameSP(char *theFP, char *theSP) numArgs = byteAt((theFP + FoxFrameFlags) + 1); numStack = (((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1)); if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) { - /* begin pushedReceiverOrClosureOfFrame: */ closureOrNil = longAt(theFP + (frameStackedReceiverOffset(theFP))); } else { @@ -58616,18 +58571,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* StackInterpreter>>#methodHeaderIndicatesLargeFrame: */ @@ -58838,7 +58794,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -59011,6 +58967,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -59072,7 +59061,7 @@ popthenPush(sqInt nItems, sqInt oop) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -59133,8 +59122,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -59246,7 +59235,7 @@ positive64BitIntegerFor(usqLong integerValue) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -59690,8 +59679,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -59699,14 +59687,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -59737,8 +59725,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -59746,14 +59733,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -59777,8 +59764,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59786,14 +59772,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -60522,7 +60508,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -60533,23 +60519,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -60565,38 +60551,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -60609,7 +60595,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -60617,7 +60603,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -60628,7 +60614,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -60642,7 +60628,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -60655,12 +60641,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -60671,7 +60657,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -60679,9 +60665,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -60695,8 +60681,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60704,14 +60689,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -60758,7 +60743,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -60769,23 +60754,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -60801,38 +60786,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -60845,7 +60830,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -60853,7 +60838,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -60864,7 +60849,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -60878,7 +60863,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -60891,12 +60876,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -60907,7 +60892,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -60915,9 +60900,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -60931,8 +60916,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60940,14 +60924,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -60995,7 +60979,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -61006,23 +60990,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -61038,38 +61022,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -61082,7 +61066,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -61090,7 +61074,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -61101,7 +61085,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -61115,7 +61099,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -61128,12 +61112,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -61144,7 +61128,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -61152,9 +61136,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -61169,8 +61153,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -61178,14 +61161,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -62494,7 +62477,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -62844,6 +62827,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); return dataSize; } @@ -62954,11 +62938,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -63168,7 +63154,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); /* begin fetchPointer:ofObject: */ methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); @@ -63264,14 +63250,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -63288,6 +63283,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -63300,21 +63296,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); assert(isOopCompiledMethod(GIV(method))); @@ -63322,12 +63322,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? 256 : 0); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !0, __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -63343,6 +63346,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -63356,11 +63360,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -63380,6 +63387,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -63547,15 +63558,27 @@ schedulerPointer(void) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* StackInterpreter>>#sendInvokeCallbackContext: */ EXPORT(sqInt) @@ -63589,6 +63612,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) char *sp7; sqInt table; + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -63601,8 +63625,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin push: */ object3 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); longAtput((sp3 = GIV(stackPointer) - BytesPerWord), object3); @@ -63715,6 +63741,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ interpret(); return 1; @@ -64317,7 +64344,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -65304,7 +65331,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -65419,7 +65446,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -66199,6 +66226,7 @@ transferTo(sqInt newProc) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin setMethod: */ @@ -66512,8 +66540,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -66521,14 +66548,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66557,8 +66584,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -66566,14 +66592,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66604,8 +66630,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -66613,14 +66638,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return activeContext; } @@ -67072,10 +67097,9 @@ primitiveClosureCopyWithCopiedValues(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt copiedValues; sqInt i; - sqInt initialIP; sqInt integerPointer; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -67110,7 +67134,6 @@ primitiveClosureCopyWithCopiedValues(void) return; } /* begin closureIn:numArgs:instructionPointer:copiedValues: */ - initialIP = (GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize); copiedValues = longAt(GIV(stackPointer)); /* begin numSlotsOf: */ assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); @@ -67156,7 +67179,7 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), longAt(GIV(stackPointer) + (2 * BytesPerWord))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)((GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -67195,8 +67218,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -69589,7 +69612,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -69946,7 +69969,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -69983,7 +70006,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -70443,7 +70466,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -70595,7 +70618,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -70799,7 +70822,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -71092,8 +71115,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -71476,8 +71500,10 @@ primitiveTerminateTo(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -71564,7 +71590,6 @@ primitiveVMParameter(void) char *sp; char *sp1; char *sp2; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -71614,6 +71639,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -71623,165 +71649,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -71789,9 +71779,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -71799,213 +71789,118 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = GIV(nilObj); + valuePointer35 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = GIV(nilObj); + valuePointer36 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)((((GIV(preemptionYields) + valuePointer37 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = GIV(nilObj); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = GIV(nilObj); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = ConstZero; + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = ConstZero; + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -72034,7 +71929,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -72067,14 +71962,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -72150,7 +72048,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -72268,47 +72166,37 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l95; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l95: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -72374,11 +72262,11 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if ((((usqInt)arg)) > 0x1F) { /* begin primitiveFailFor: */ GIV(primFailCode) = PrimErrUnsupported; - goto l72; + goto l84; } GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l72: /* end setCogVMFlags: */; + l84: /* end setCogVMFlags: */; } } if (index == 49) { @@ -72401,14 +72289,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l93; + goto l96; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l93: /* end floatValueOf: */; + l96: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -72634,8 +72522,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -72643,14 +72530,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -72685,8 +72572,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -72694,14 +72580,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72729,8 +72615,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -72738,14 +72623,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -72794,6 +72679,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -72839,6 +72725,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/nsspurstacksrc/vm/interp.h b/nsspurstacksrc/vm/interp.h index ae07a3bf8..8f7bf01e3 100644 --- a/nsspurstacksrc/vm/interp.h +++ b/nsspurstacksrc/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 4 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1073741824 #define MaxSmallInteger 1073741823 diff --git a/nsspurstacksrc/vm/vmCallback.h b/nsspurstacksrc/vm/vmCallback.h index 48d07f100..3bf23acc7 100644 --- a/nsspurstacksrc/vm/vmCallback.h +++ b/nsspurstacksrc/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/platforms/Cross/plugins/IA32ABI/arm32ia32abicc.c b/platforms/Cross/plugins/IA32ABI/arm32abicc.c similarity index 100% rename from platforms/Cross/plugins/IA32ABI/arm32ia32abicc.c rename to platforms/Cross/plugins/IA32ABI/arm32abicc.c diff --git a/platforms/Cross/plugins/IA32ABI/ia32abicc.c b/platforms/Cross/plugins/IA32ABI/ia32abicc.c index feca0fbf9..638bdfb64 100644 --- a/platforms/Cross/plugins/IA32ABI/ia32abicc.c +++ b/platforms/Cross/plugins/IA32ABI/ia32abicc.c @@ -252,7 +252,7 @@ thunkEntry(void *thunkp, sqIntptr_t *stackp) } /* - * Thunk allocation support. Since thunks must be exectuable and some OSs + * Thunk allocation support. Since thunks must be executable and some OSs * may not provide default execute permission on memory returned by malloc * we must provide memory that is guaranteed to be executable. The abstraction * is to answer an Alien that references an executable piece of memory that diff --git a/platforms/Cross/plugins/IA32ABI/ppc32abicc.c b/platforms/Cross/plugins/IA32ABI/ppc32abicc.c index 0bba2fbe9..a08cc7472 100644 --- a/platforms/Cross/plugins/IA32ABI/ppc32abicc.c +++ b/platforms/Cross/plugins/IA32ABI/ppc32abicc.c @@ -275,7 +275,7 @@ thunkEntry(void *thunkp, sqIntptr_t *stackp) } /* - * Thunk allocation support. Since thunks must be exectuable and some OSs + * Thunk allocation support. Since thunks must be executable and some OSs * may not provide default execute permission on memory returned by malloc * we must provide memory that is guaranteed to be executable. The abstraction * is to answer an Alien that references an executable piece of memory that diff --git a/platforms/Cross/plugins/IA32ABI/x64ia32abicc.c b/platforms/Cross/plugins/IA32ABI/x64sysvabicc.c similarity index 99% rename from platforms/Cross/plugins/IA32ABI/x64ia32abicc.c rename to platforms/Cross/plugins/IA32ABI/x64sysvabicc.c index 5095480c9..4febded67 100644 --- a/platforms/Cross/plugins/IA32ABI/x64ia32abicc.c +++ b/platforms/Cross/plugins/IA32ABI/x64sysvabicc.c @@ -243,7 +243,7 @@ thunkEntry(long a0, long a1, long a2, long a3, long a4, long a5, } /* - * Thunk allocation support. Since thunks must be exectuable and some OSs + * Thunk allocation support. Since thunks must be executable and some OSs * may not provide default execute permission on memory returned by malloc * we must provide memory that is guaranteed to be executable. The abstraction * is to answer an Alien that references an executable piece of memory that diff --git a/platforms/Cross/plugins/IA32ABI/x64win64ia32abicc.c b/platforms/Cross/plugins/IA32ABI/x64win64abicc.c similarity index 99% rename from platforms/Cross/plugins/IA32ABI/x64win64ia32abicc.c rename to platforms/Cross/plugins/IA32ABI/x64win64abicc.c index a4c887f9d..9b261509d 100644 --- a/platforms/Cross/plugins/IA32ABI/x64win64ia32abicc.c +++ b/platforms/Cross/plugins/IA32ABI/x64win64abicc.c @@ -250,7 +250,7 @@ extern void saveFloatRegsWin64(long long xmm0,long long xmm1,long long xmm2, lon } /* - * Thunk allocation support. Since thunks must be exectuable and some OSs + * Thunk allocation support. Since thunks must be executable and some OSs * may not provide default execute permission on memory returned by malloc * we must provide memory that is guaranteed to be executable. The abstraction * is to answer an Alien that references an executable piece of memory that diff --git a/platforms/Cross/plugins/IA32ABI/xabicc.c b/platforms/Cross/plugins/IA32ABI/xabicc.c index d6b49d603..d6bb51df5 100644 --- a/platforms/Cross/plugins/IA32ABI/xabicc.c +++ b/platforms/Cross/plugins/IA32ABI/xabicc.c @@ -8,14 +8,14 @@ #if i386|i486|i586|i686 # include "ia32abicc.c" #elif powerpc|ppc -# include "ppcia32abicc.c" +# include "ppc32abicc.c" #elif x86_64|x64|__x86_64|__x86_64__|_M_AMD64|_M_X64 # if WIN64 -# include "x64win64ia32abicc.c" +# include "x64win64abicc.c" # else -# include "x64ia32abicc.c" +# include "x64sysvabicc.c" # endif #elif __ARM_ARCH__|__arm__|__arm32__|ARM32 -# include "arm32ia32abicc.c" +# include "arm32abicc.c" #endif - \ No newline at end of file + diff --git a/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c b/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c index 14fb947d7..e25220277 100644 --- a/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c +++ b/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c @@ -9,6 +9,14 @@ additional support code, querying the surface handle from ioFindSurface but the functions provided below are critical for any BitBlt operations. + +Change History: +eem 3/15/2017 Allow functions registered with ioGetSurfaceFormat, + ioUnlockSurface and ioShowSurface to be omitted (defaulted to + 0) and have ioGetSurfaceFormat, ioUnlockSurface & ioShowSurface + return -1 in this case (the BitBlt primitives expect 0 for + failure). This allows e.g. Pharo's AthensCairoSurface to + avoid installing two null callbacks for unlock & show. */ #include @@ -79,7 +87,9 @@ EXPORT(int) ioGetSurfaceFormat (int surfaceID, int* width, int* height, int* dep if(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL; surface = surfaceArray + surfaceID; if(surface->dispatch == NULL) FAIL; - if(!surface->dispatch->getSurfaceFormat) FAIL; + /* Allow getSurfaceFormat to be defaulted to 0 */ + if(!surface->dispatch->getSurfaceFormat) + return -1; return surface->dispatch->getSurfaceFormat(surface->handle, width, height, depth, isMSB); } @@ -106,7 +116,9 @@ EXPORT(int) ioUnlockSurface(int surfaceID, int x, int y, int w, int h) if(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL; surface = surfaceArray + surfaceID; if(surface->dispatch == NULL) FAIL; - if(!surface->dispatch->unlockSurface) FAIL; + /* Allow unlockSurface to be defaulted to 0 */ + if(!surface->dispatch->unlockSurface) + return -1; return surface->dispatch->unlockSurface(surface->handle, x, y, w, h); } @@ -118,7 +130,9 @@ EXPORT(int) ioShowSurface(int surfaceID, int x, int y, int w, int h) if(surfaceID < 0 || surfaceID >= maxSurfaces) FAIL; surface = surfaceArray + surfaceID; if(surface->dispatch == NULL) FAIL; - if(!surface->dispatch->showSurface) FAIL; + /* Allow showSurface to be defaulted to 0 */ + if(!surface->dispatch->showSurface) + -1; return surface->dispatch->showSurface(surface->handle, x, y, w, h); } diff --git a/platforms/Cross/vm/sqVirtualMachine.c b/platforms/Cross/vm/sqVirtualMachine.c index a0f05c8c7..5bbd13bc1 100755 --- a/platforms/Cross/vm/sqVirtualMachine.c +++ b/platforms/Cross/vm/sqVirtualMachine.c @@ -6,6 +6,7 @@ #include #include "sqVirtualMachine.h" +#include "sqAssert.h" /*** Function prototypes ***/ @@ -191,8 +192,12 @@ sqInt characterValueOf(sqInt oop); sqInt isPinned(sqInt objOop); sqInt pinObject(sqInt objOop); sqInt unpinObject(sqInt objOop); -#endif char *cStringOrNullFor(sqInt); +#endif +#if VM_PROXY_MINOR > 13 /* More Spur */ +sqInt statNumGCs(void); +sqInt stringForCString(char *); +#endif void *ioLoadFunctionFrom(char *fnName, char *modName); @@ -242,17 +247,8 @@ void (*setInterruptCheckChain(void (*aFunction)(void)))() { return 0; } #endif #if VM_PROXY_MINOR > 10 -# if COGMTVM -sqInt disownVM(sqInt flags); -sqInt ownVM(sqInt threadIdAndFlags); -# else -sqInt disownVM(sqInt flags) { return 1; } -sqInt ownVM(sqInt threadIdAndFlags) -{ - extern sqInt amInVMThread(void); - return amInVMThread() ? 0 : -1; -} -# endif +extern sqInt disownVM(sqInt flags); +extern sqInt ownVM(sqInt threadIdAndFlags); #endif /* VM_PROXY_MINOR > 10 */ extern sqInt isYoung(sqInt); @@ -385,9 +381,13 @@ struct VirtualMachine* sqGetInterpreterProxy(void) VM->success = success; VM->superclassOf = superclassOf; +#if VM_PROXY_MINOR <= 13 /* reused in 14 and above */ + VM->compilerHookVector= 0; VM->setCompilerInitialized= 0; +#endif + #if VM_PROXY_MINOR > 1 /* InterpreterProxy methodsFor: 'BitBlt support' */ @@ -510,6 +510,11 @@ struct VirtualMachine* sqGetInterpreterProxy(void) VM->unpinObject = unpinObject; #endif +#if VM_PROXY_MINOR > 13 /* More Spur */ + VM->statNumGCs = statNumGCs; + VM->stringForCString = stringForCString; +#endif + return VM; } diff --git a/platforms/Cross/vm/sqVirtualMachine.h b/platforms/Cross/vm/sqVirtualMachine.h index 497e43278..49ce2d533 100755 --- a/platforms/Cross/vm/sqVirtualMachine.h +++ b/platforms/Cross/vm/sqVirtualMachine.h @@ -172,10 +172,16 @@ typedef struct VirtualMachine { sqInt (*success)(sqInt aBoolean); sqInt (*superclassOf)(sqInt classPointer); +# if VM_PROXY_MINOR > 13 + /* Reuse these now that Cog provides a production JIT. */ + sqInt (*statNumGCs)(void); + sqInt (*stringForCString)(char *nullTerminatedCString); +# else /* InterpreterProxy methodsFor: 'compiler' */ CompilerHook *(*compilerHookVector)(void); sqInt (*setCompilerInitialized)(sqInt initFlag); +# endif #if VM_PROXY_MINOR > 1 @@ -341,6 +347,7 @@ typedef struct VirtualMachine { sqInt (*pinObject)(sqInt objOop); sqInt (*unpinObject)(sqInt objOop); #endif + } VirtualMachine; #endif /* _SqueakVM_H */ diff --git a/platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c b/platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c index 49d254af2..ff14f9648 100644 --- a/platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c +++ b/platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c @@ -27,6 +27,16 @@ static char secureUserDirectory[PATH_MAX]; static char untrustedUserDirectory[PATH_MAX]; static Boolean gInitialized = false; +/***************************************************************************/ +/***************************************************************************/ +/***************************************************************************/ +/***************************************************************************/ +/* environment security */ +static int allowEnvironmentAccess = 1; /* full access to C environment */ + +sqInt ioDisableEnvironmentAccess(void) { return allowEnvironmentAccess = 0; } +sqInt ioHasEnvironmentAccess(void) { return allowEnvironmentAccess; } + /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ @@ -108,11 +118,7 @@ sqInt ioCanSetFileTypeOfSize(char* pathString, sqInt pathStringLength) { } /* disabling/querying */ -sqInt ioDisableFileAccess(void) { - allowFileAccess = 0; - return 0; -} - +sqInt ioDisableFileAccess(void) { return allowFileAccess = 0; } sqInt ioHasFileAccess(void) { return allowFileAccess; } /***************************************************************************/ @@ -128,11 +134,7 @@ sqInt ioCanRenameImage(void) { } sqInt ioCanWriteImage() { return allowImageWrite; } - -sqInt ioDisableImageWrite() { - allowImageWrite = 0; - return 0; -} +sqInt ioDisableImageWrite() { return allowImageWrite = 0; } /***************************************************************************/ @@ -157,11 +159,7 @@ sqInt ioCanListenOnPort(sqInt s, sqInt port) { return allowSocketAccess; } -sqInt ioDisableSocketAccess() { - allowSocketAccess = 0; - return 0; -} - +sqInt ioDisableSocketAccess() { return allowSocketAccess = 0; } sqInt ioHasSocketAccess() { return allowSocketAccess; } /***************************************************************************/ diff --git a/platforms/RiscOS/plugins/SecurityPlugin/sqRPCSecurity.c b/platforms/RiscOS/plugins/SecurityPlugin/sqRPCSecurity.c index d3b2b46b1..b550ea999 100644 --- a/platforms/RiscOS/plugins/SecurityPlugin/sqRPCSecurity.c +++ b/platforms/RiscOS/plugins/SecurityPlugin/sqRPCSecurity.c @@ -39,9 +39,13 @@ static char untrustedUserDirectory[MAXDIRNAMELENGTH]; /* imagepath/untrusted/ */ static int untrustedUserDirectoryLen; char name[MAXDIRNAMELENGTH]; -/* file security ***********************************************************/ +/* environment security *******************************************************/ +static int allowEnvironmentAccess = 1; /* full access to C environment */ +sqInt ioDisableEnvironmentAccess(void) { return allowEnvironmentAccess = 0; } +sqInt ioHasEnvironmentAccess(void) { return allowEnvironmentAccess; } +/* file security ***********************************************************/ static int allowFileAccess= 1; /* full access to files */ @@ -128,17 +132,8 @@ int ioCanSetFileTypeOfSize(char* pathString, int pathStringLength) { /* disabling/querying */ - - -int ioDisableFileAccess(void) { - allowFileAccess= 0; - return 1; -} - - -int ioHasFileAccess(void) { - return allowFileAccess; -} +int ioDisableFileAccess(void) { return allowFileAccess = 0; } +int ioHasFileAccess(void) { return allowFileAccess; } /* image security **********************************************************/ @@ -151,51 +146,22 @@ int ioCanRenameImage(void) { return allowImageWrite; /* only when we're allowed to save the image */ } -int ioCanWriteImage(void) { - return allowImageWrite; -} - -int ioDisableImageWrite(void) { - allowImageWrite= 0; - return 1; -} +int ioCanWriteImage(void) { return allowImageWrite; } +int ioDisableImageWrite(void) { return allowImageWrite = 0; } /* socket security - for now it's all or nothing ***************************/ - - static int allowSocketAccess= 1; /* allow access to sockets */ - - int ioCanCreateSocketOfType(int netType, int socketType) { return allowSocketAccess; } - - -int ioCanConnectToPort(int netAddr, int port) { - return allowSocketAccess; -} - - -int ioCanListenOnPort(int s, int port) { - return allowSocketAccess; -} - - -int ioDisableSocketAccess() { - allowSocketAccess= 0; - return 1; -} - - -int ioHasSocketAccess() { - return allowSocketAccess; -} +int ioCanConnectToPort(int netAddr, int port) { return allowSocketAccess; } +int ioCanListenOnPort(int s, int port) { return allowSocketAccess; } +int ioDisableSocketAccess() { return allowSocketAccess = 0; } +int ioHasSocketAccess() { return allowSocketAccess; } /* SecurityPlugin primitive support ****************************************/ - - char *ioGetSecureUserDirectory(void) { PRINTF(("\\t sec: getSecureUserDir - %s\n", secureUserDirectory)); return secureUserDirectory; diff --git a/platforms/iOS/plugins/SecurityPlugin/sqMacSecurity.c b/platforms/iOS/plugins/SecurityPlugin/sqMacSecurity.c index d8de4f12e..ca2aca510 100644 --- a/platforms/iOS/plugins/SecurityPlugin/sqMacSecurity.c +++ b/platforms/iOS/plugins/SecurityPlugin/sqMacSecurity.c @@ -58,6 +58,16 @@ static char secureUserDirectory[PATH_MAX]; static char untrustedUserDirectory[PATH_MAX]; static Boolean gInitialized = false; +/***************************************************************************/ +/***************************************************************************/ +/***************************************************************************/ +/***************************************************************************/ +/* environment security */ +static int allowEnvironmentAccess = 1; /* full access to C environment */ + +sqInt ioDisableEnvironmentAccess(void) { return allowEnvironmentAccess = 0; } +sqInt ioHasEnvironmentAccess(void) { return allowEnvironmentAccess; } + /***************************************************************************/ /***************************************************************************/ /***************************************************************************/ @@ -139,14 +149,8 @@ sqInt ioCanSetFileTypeOfSize(char* pathString, sqInt pathStringLength) { } /* disabling/querying */ -sqInt ioDisableFileAccess(void) { - allowFileAccess = 0; - return 0; -} - -sqInt ioHasFileAccess(void) { - return allowFileAccess; -} +sqInt ioDisableFileAccess(void) { return allowFileAccess = 0; } +sqInt ioHasFileAccess(void) { return allowFileAccess; } /***************************************************************************/ /***************************************************************************/ @@ -160,14 +164,8 @@ sqInt ioCanRenameImage(void) { return allowImageWrite; /* only when we're allowed to save the image */ } -sqInt ioCanWriteImage() { - return allowImageWrite; -} - -sqInt ioDisableImageWrite() { - allowImageWrite = 0; - return 0; -} +sqInt ioCanWriteImage() { return allowImageWrite; } +sqInt ioDisableImageWrite() { return allowImageWrite = 0; } /***************************************************************************/ @@ -192,14 +190,8 @@ sqInt ioCanListenOnPort(sqInt s, sqInt port) { return allowSocketAccess; } -sqInt ioDisableSocketAccess() { - allowSocketAccess = 0; - return 0; -} - -sqInt ioHasSocketAccess() { - return allowSocketAccess; -} +sqInt ioDisableSocketAccess() { return allowSocketAccess = 0; } +sqInt ioHasSocketAccess() { return allowSocketAccess; } /***************************************************************************/ /***************************************************************************/ diff --git a/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m b/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m index a45b3e6bb..0005916cd 100644 --- a/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m +++ b/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m @@ -84,11 +84,21 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { [self.squeakApplication setupEventQueue]; [self singleThreadStart]; // [self workerThreadStart]; - } - + +#ifdef PharoVM + [[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:self]; +#endif } +#ifdef PharoVM +- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center + shouldPresentNotification:(NSUserNotification *)notification +{ + return YES; +} +#endif + - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { return NO; } diff --git a/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m b/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m index c7f9101f8..a2f33833f 100644 --- a/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m +++ b/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m @@ -462,9 +462,7 @@ - (void)flagsChanged:(NSEvent *)theEvent { aKeyBoardStrokeDetails.keyCode = [theEvent keyCode]; aKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags]; self.lastSeenKeyBoardModifierDetails = aKeyBoardStrokeDetails; -#if PharoVM [(sqSqueakOSXApplication *) gDelegateApp.squeakApplication recordKeyDownEvent: theEvent fromView: self]; -#endif } - (void)doCommandBySelector:(SEL)aSelector { diff --git a/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c b/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c index fc0fccbab..d067142df 100644 --- a/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c +++ b/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c @@ -29,9 +29,13 @@ static char* fromSqueak(char* string, int len) return buf; } -/* file security ***********************************************************/ +/* environment security *******************************************************/ +static int allowEnvironmentAccess = 1; /* full access to C environment */ +sqInt ioDisableEnvironmentAccess(void) { return allowEnvironmentAccess = 0; } +sqInt ioHasEnvironmentAccess(void) { return allowEnvironmentAccess; } +/* file security ***********************************************************/ static sqInt allowFileAccess= 1; /* full access to files */ @@ -128,82 +132,37 @@ sqInt ioCanSetFileTypeOfSize(char* pathString, sqInt pathStringLength) /* disabling/querying */ -sqInt ioDisableFileAccess(void) -{ - allowFileAccess= 0; - return 1; -} - - -sqInt ioHasFileAccess(void) -{ - return allowFileAccess; -} +sqInt ioDisableFileAccess(void) { return allowFileAccess = 0; } +sqInt ioHasFileAccess(void) { return allowFileAccess; } /* image security **********************************************************/ - - static sqInt allowImageWrite= 1; /* allow writing the image */ - sqInt ioCanRenameImage(void) { return allowImageWrite; /* only when we're allowed to save the image */ } -sqInt ioCanWriteImage(void) -{ - return allowImageWrite; -} - -sqInt ioDisableImageWrite(void) -{ - allowImageWrite= 0; - return 1; -} +sqInt ioCanWriteImage(void) { return allowImageWrite; } +sqInt ioDisableImageWrite(void) { return allowImageWrite= 0; } /* socket security - for now it's all or nothing ***************************/ - - static sqInt allowSocketAccess= 1; /* allow access to sockets */ - sqInt ioCanCreateSocketOfType(sqInt netType, sqInt socketType) { return allowSocketAccess; } - - -sqInt ioCanConnectToPort(sqInt netAddr, sqInt port) -{ - return allowSocketAccess; -} - - -sqInt ioCanListenOnPort(sqInt s, sqInt port) -{ - return allowSocketAccess; -} - - -sqInt ioDisableSocketAccess() -{ - allowSocketAccess= 0; - return 1; -} - - -sqInt ioHasSocketAccess() -{ - return allowSocketAccess; -} +sqInt ioCanConnectToPort(sqInt addr, sqInt port) { return allowSocketAccess; } +sqInt ioCanListenOnPort(sqInt s, sqInt port) { return allowSocketAccess; } +sqInt ioDisableSocketAccess() { return allowSocketAccess = 0; } +sqInt ioHasSocketAccess() { return allowSocketAccess; } /* SecurityPlugin primitive support ****************************************/ - char *ioGetSecureUserDirectory(void) { if (secureUserDirectory[0] == '\0') diff --git a/platforms/unix/vm/Makefile.in b/platforms/unix/vm/Makefile.in index 0fbfff091..a94637cd6 100644 --- a/platforms/unix/vm/Makefile.in +++ b/platforms/unix/vm/Makefile.in @@ -65,7 +65,7 @@ $(TARGET) : $(OBJS) Makefile $(RANLIB) $(TARGET) $(blddir)/sqNamedPrims.h: $(vmmcfg)/plugins.int - $(blddir)/../../mkNamedPrims.sh $(vmmcfg)/plugins.int >$(blddir)/sqNamedPrims.h + $(topdir)/mkNamedPrims.sh $(vmmcfg)/plugins.int >$(blddir)/sqNamedPrims.h # rebuild sqNamedPrims.o if sqNamedPrims.h changes diff --git a/platforms/unix/vm/sqUnixHeartbeat.c b/platforms/unix/vm/sqUnixHeartbeat.c index b65d28832..4ac1d2797 100644 --- a/platforms/unix/vm/sqUnixHeartbeat.c +++ b/platforms/unix/vm/sqUnixHeartbeat.c @@ -313,8 +313,22 @@ beatStateMachine(void *careLess) extern char *revisionAsString(); errno = er; perror("pthread_setschedparam failed"); - fprintf(stderr, - "Read e.g. https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/r3732#linux\n"); +#if PharoVM +# define VMNAME "pharo" +#elif NewspeakVM +# define VMNAME "nsvm" +#else +# define VMNAME "squeak" +#endif + fprintf(stderr, "This VM uses a thread heartbeat who requires a special configuration to work.\n"); + fprintf(stderr, "You need to allow it to run higher priority threads (real time), to allow clock to work properly\n"); + fprintf(stderr, "You need to add a conf file to /etc/security/limits.d, executing this:\n\n"); + fprintf(stderr, "sudo cat >/etc/security/limits.d/%s.conf <operands))[0]; reg = ((self_in_concretizeArithCwR->operands))[1]; @@ -2341,9 +2344,9 @@ concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64op static usqInt NoDbgRegParms concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { - usqIntptr_t offset; - usqIntptr_t reg; - usqIntptr_t value; + sqInt offset; + usqInt reg; + usqInt value; value = ((self_in_concretizeMoveCwR->operands))[0]; reg = ((self_in_concretizeMoveCwR->operands))[1]; @@ -2460,9 +2463,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - usqIntptr_t alignment; - usqIntptr_t maximumSpan; - usqIntptr_t target; + usqInt alignment; + sqInt maximumSpan; + usqInt target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -4001,7 +4004,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -4059,7 +4062,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -4126,7 +4129,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -4790,7 +4793,7 @@ static sqInt NoDbgRegParms configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs, sqInt addrDelta) { sqInt caseEndAddress; - sqInt jumpTargetAddress; + sqInt jumpTargetAddr; sqInt operand; sqInt pc; usqIntptr_t targetEntry; @@ -4829,8 +4832,8 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod && (((byteAt(pc - 7)) | (modRMRO(((AbstractInstruction *) backEnd), 0, 0, 7))) == (modRMRO(((AbstractInstruction *) backEnd), ModRegInd, 5, 7))))); ((AbstractInstruction *) backEnd); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress = cPICMissTrampolineFor(numArgs); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddress); + jumpTargetAddr = cPICMissTrampolineFor(numArgs); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddr); return 0; } @@ -4848,8 +4851,8 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod static sqInt NoDbgRegParms configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, sqInt numArgs, sqInt addrDelta) { - sqInt jumpTargetAddress; - sqInt jumpTargetAddress1; + sqInt jumpTargetAddr; + sqInt jumpTargetAddr1; sqInt operand; sqInt pc; sqInt target; @@ -4862,12 +4865,12 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, ? 0 : methodOperand); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress = (((sqInt)cPIC)) + (sizeof(CogMethod)); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + firstCPICCaseOffset, jumpTargetAddress); + jumpTargetAddr = (((sqInt)cPIC)) + (sizeof(CogMethod)); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + firstCPICCaseOffset, jumpTargetAddr); storeLiteralbeforeFollowingAddress(backEnd, operand, ((((sqInt)cPIC)) + firstCPICCaseOffset) - 5); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress1 = cPICMissTrampolineFor(numArgs); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddress1); + jumpTargetAddr1 = cPICMissTrampolineFor(numArgs); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddr1); /* begin relocateMethodReferenceBeforeAddress:by: */ pc = ((((sqInt)cPIC)) + cPICEndOfCodeOffset) - 5; assert((((byteAt(pc - 6)) == 141) @@ -5107,7 +5110,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -5193,11 +5196,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { usqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -5393,7 +5396,7 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) /* Cogit>>#findMapLocationForMcpc:inMethod: */ static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -5929,7 +5932,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -5945,7 +5948,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, 3133021973U + h, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -5991,7 +5994,7 @@ generateCogFullBlock(void) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -6040,7 +6043,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -6086,17 +6089,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; - usqIntptr_t delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqIntptr_t location; - usqIntptr_t mapEntry; + usqInt location; + sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -7126,7 +7129,7 @@ gMoveCwR(sqInt wordConstant, sqInt reg) /* 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; @@ -9049,7 +9052,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -9874,7 +9877,7 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; @@ -10038,12 +10041,12 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; zoneSize = limitAddress - baseAddress; initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; @@ -12791,6 +12794,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *jumpImm; @@ -12834,7 +12838,17 @@ genPrimitiveIdentityHash(void) genoperand(RetN, 0); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } /* CogObjectRepresentationFor64BitSpur>>#genPrimitiveImmediateAsInteger */ @@ -14383,6 +14397,8 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { zeroOpcodeIndex(); @@ -16896,7 +16912,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - usqIntptr_t shiftCountReg; + usqInt shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == RCX @@ -16923,8 +16939,8 @@ computeSizeOfPushCw(AbstractInstruction * self_in_computeSizeOfPushCw) static usqInt NoDbgRegParms concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithCqRWithROraxOpcode, sqInt regOpcode, sqInt raxOpcode) { - usqIntptr_t reg; - usqIntptr_t value; + usqInt reg; + usqInt value; value = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[0]; reg = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[1]; @@ -16975,10 +16991,10 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) { - usqIntptr_t base; - usqIntptr_t index; + usqInt base; + usqInt index; sqInt offset; - usqIntptr_t src; + usqInt src; src = ((self_in_concretizeMoveRX32rR->operands))[0]; index = ((self_in_concretizeMoveRX32rR->operands))[1]; @@ -17012,9 +17028,9 @@ concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) static usqInt NoDbgRegParms concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) { - usqIntptr_t base; - usqIntptr_t dest; - usqIntptr_t index; + usqInt base; + usqInt dest; + usqInt index; sqInt offset; index = ((self_in_concretizeMoveX32rRR->operands))[0]; @@ -17049,8 +17065,8 @@ concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -17069,8 +17085,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - usqIntptr_t offset; - usqIntptr_t operand; + sqInt offset; + usqInt operand; operand = ((self_in_concretizePrefetchAw->operands))[0]; if (!((operand != null) @@ -17097,8 +17113,8 @@ concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x64opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -17112,8 +17128,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) { - usqIntptr_t r1; - usqIntptr_t r2; + usqInt r1; + usqInt r2; r1 = ((self_in_concretizeXCHGRR->operands))[0]; r2 = ((self_in_concretizeXCHGRR->operands))[1]; @@ -17142,64 +17158,64 @@ concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt addressOperand2; + usqInt addressOperand3; + usqInt addressOperand4; + usqInt addressOperand5; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; + usqInt baseReg; + usqInt baseReg1; AbstractInstruction *dependentChain; - 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 destReg16; - usqIntptr_t destReg17; - usqIntptr_t destReg18; - usqIntptr_t destReg19; - usqIntptr_t destReg2; - usqIntptr_t destReg20; - usqIntptr_t destReg21; - usqIntptr_t destReg22; - usqIntptr_t destReg23; - usqIntptr_t destReg24; - usqIntptr_t destReg25; - usqIntptr_t destReg26; - usqIntptr_t destReg27; - usqIntptr_t destReg28; - usqIntptr_t destReg29; - usqIntptr_t destReg3; - usqIntptr_t destReg30; - usqIntptr_t destReg31; - usqIntptr_t destReg32; - 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; + usqInt dest; + usqInt dest1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg13; + usqInt destReg14; + usqInt destReg15; + usqInt destReg16; + usqInt destReg17; + usqInt destReg18; + usqInt destReg19; + usqInt destReg2; + usqInt destReg20; + usqInt destReg21; + usqInt destReg22; + usqInt destReg23; + usqInt destReg24; + usqInt destReg25; + usqInt destReg26; + usqInt destReg27; + usqInt destReg28; + usqInt destReg29; + usqInt destReg3; + usqInt destReg30; + usqInt destReg31; + usqInt destReg32; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; + usqInt distance; + usqInt distance1; + usqInt distance2; + usqInt distance3; + usqInt distance4; sqInt i; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -17268,8 +17284,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget9; sqInt offset; sqInt offset1; - usqIntptr_t offset10; - usqIntptr_t offset11; + usqInt offset10; + usqInt offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -17280,28 +17296,28 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - usqIntptr_t offset12; + usqInt offset12; sqInt offset120; sqInt offset121; sqInt offset122; sqInt offset123; sqInt offset124; sqInt offset125; - usqIntptr_t offset126; - usqIntptr_t offset127; - usqIntptr_t offset128; - usqIntptr_t offset129; - usqIntptr_t offset13; - usqIntptr_t offset14; - usqIntptr_t offset15; + usqInt offset126; + usqInt offset127; + usqInt offset128; + usqInt offset129; + usqInt offset13; + usqInt offset14; + usqInt offset15; sqInt offset16; - usqIntptr_t offset17; - usqIntptr_t offset18; - usqIntptr_t offset19; + usqInt offset17; + usqInt offset18; + usqInt offset19; sqInt offset2; - usqIntptr_t offset20; - usqIntptr_t offset21; - usqIntptr_t offset22; + usqInt offset20; + sqInt offset21; + sqInt offset22; sqInt offset23; sqInt offset24; sqInt offset25; @@ -17309,7 +17325,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - usqIntptr_t offset3; + usqInt offset3; sqInt offset30; sqInt offset31; sqInt offset32; @@ -17320,74 +17336,74 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset37; sqInt offset38; sqInt offset39; - usqIntptr_t offset4; + usqInt offset4; sqInt offset40; sqInt offset41; sqInt offset42; - usqIntptr_t offset5; + sqInt offset5; sqInt offset6; sqInt offset7; - usqIntptr_t offset8; - usqIntptr_t offset9; - 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 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 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 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; - usqIntptr_t save0; - usqIntptr_t save01; - usqIntptr_t save1; - usqIntptr_t save11; - usqIntptr_t save12; - usqIntptr_t save13; - usqIntptr_t shiftCountReg; - usqIntptr_t shiftCountReg1; + usqInt offset8; + usqInt offset9; + usqInt operand; + usqInt operand1; + usqInt reg; + usqInt reg1; + usqInt reg10; + usqInt reg11; + usqInt reg12; + usqInt reg13; + usqInt reg14; + usqInt reg15; + usqInt reg16; + usqInt reg17; + usqInt reg18; + usqInt reg19; + usqInt reg2; + usqInt reg20; + usqInt reg21; + usqInt reg22; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt reg8; + usqInt reg9; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS10; + usqInt regLHS11; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regLHS5; + usqInt regLHS6; + usqInt regLHS7; + usqInt regLHS8; + usqInt regLHS9; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS10; + usqInt regRHS11; + usqInt regRHS2; + usqInt regRHS3; + usqInt regRHS4; + usqInt regRHS5; + usqInt regRHS6; + usqInt regRHS7; + usqInt regRHS8; + usqInt regRHS9; + usqInt regToShift; + usqInt regToShift1; + usqInt save0; + usqInt save01; + usqInt save1; + usqInt save11; + usqInt save12; + usqInt save13; + usqInt shiftCountReg; + usqInt shiftCountReg1; sqInt skip; sqInt skip1; sqInt skip10; @@ -17417,49 +17433,49 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt skip7; sqInt skip8; sqInt skip9; - 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 srcReg16; - usqIntptr_t srcReg17; - usqIntptr_t srcReg18; - usqIntptr_t srcReg19; - usqIntptr_t srcReg2; - usqIntptr_t srcReg20; - usqIntptr_t srcReg21; - usqIntptr_t srcReg22; - usqIntptr_t srcReg23; - usqIntptr_t srcReg24; - usqIntptr_t srcReg25; - usqIntptr_t srcReg26; - usqIntptr_t srcReg27; - usqIntptr_t srcReg28; - usqIntptr_t srcReg29; - usqIntptr_t srcReg3; - usqIntptr_t srcReg30; - usqIntptr_t srcReg31; - usqIntptr_t srcReg32; - 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 value11; - usqIntptr_t value2; - usqIntptr_t value3; - usqIntptr_t value4; - usqIntptr_t value5; - usqIntptr_t value6; + usqInt src; + usqInt src1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg20; + usqInt srcReg21; + usqInt srcReg22; + usqInt srcReg23; + usqInt srcReg24; + usqInt srcReg25; + usqInt srcReg26; + usqInt srcReg27; + usqInt srcReg28; + usqInt srcReg29; + usqInt srcReg3; + usqInt srcReg30; + usqInt srcReg31; + usqInt srcReg32; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; + usqInt value; + usqInt value1; + usqInt value11; + usqInt value2; + usqInt value3; + usqInt value4; + usqInt value5; + usqInt value6; usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { @@ -20548,9 +20564,9 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - usqIntptr_t reg1; - usqIntptr_t reg2; - usqIntptr_t regDivisor; + usqInt reg1; + usqInt reg2; + usqInt regDivisor; switch ((self_in_dispatchConcretizeProcessorSpecific->opcode)) { @@ -21667,15 +21683,15 @@ rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, s /* prevent type inference for avoiding warning on abs */ /* CogX64Compiler>>#rewriteCPICJumpAt:target: */ -static sqInt NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +static AbstractInstruction * NoDbgRegParms +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { sqInt callDistance; - callDistance = jumpTargetAddress - addressFollowingJump; + callDistance = jumpTargetAddr - addressFollowingJump; assert((SQABS(callDistance)) < 128); byteAtput(addressFollowingJump - 1, callDistance & 0xFF); - return 2; + return self_in_rewriteCPICJumpAttarget; } @@ -24045,7 +24061,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -24074,7 +24090,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 3) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 3) | 1)); introspectionDataIndex += 2; } return 0; @@ -24665,7 +24681,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -25264,7 +25280,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -25283,8 +25299,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -25484,7 +25500,11 @@ compileCogFullBlockMethod(sqInt numCopied) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -25558,7 +25578,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -26970,7 +26994,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -27204,7 +27229,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -27245,7 +27271,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc = ssTop(); ssPop(1); if ((((desc->type)) == SSConstant) @@ -27316,7 +27343,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -27880,7 +27908,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -28166,7 +28195,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -28355,7 +28385,8 @@ genSpecialSelectorComparison(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((((argInt = ((ssTop())->constant)))) & 7) == 1)); @@ -28549,7 +28580,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -28620,7 +28652,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -28693,7 +28726,8 @@ genStorePopMaybeContextRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCh ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -28730,7 +28764,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -28755,7 +28790,8 @@ genStorePopRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCheck(sqInt po if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -28894,19 +28930,18 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; - return fixup; -} + } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ static void NoDbgRegParms @@ -29080,7 +29115,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -29090,7 +29126,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -29098,7 +29135,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -29137,7 +29175,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -29202,7 +29240,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -29335,8 +29374,7 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); if ((isBranch(descriptor)) @@ -29684,13 +29722,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1ULL << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -29732,7 +29763,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -29756,7 +29788,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -30051,6 +30084,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/spur64src/vm/cointerp.c b/spur64src/vm/cointerp.c index a6d8df364..86e4bb5aa 100644 --- a/spur64src/vm/cointerp.c +++ b/spur64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -450,6 +450,7 @@ extern sqInt ceContextinstVar(sqInt maybeContext, sqInt slotIndex); extern sqInt ceContextinstVarvalue(sqInt maybeMarriedContext, sqInt slotIndex, sqInt anOop); extern sqInt ceInterpretMethodFromPICreceiver(sqInt aMethodObj, sqInt rcvr); extern sqInt ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr); +extern sqInt ceNewHashOf(sqInt anObject); extern sqInt ceNonLocalReturn(sqInt returnValue); extern sqInt ceReturnToInterpreter(sqInt anOop); extern sqInt ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs); @@ -721,6 +722,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -889,6 +891,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -914,9 +917,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1165,6 +1168,7 @@ static void NoDbgRegParms markLoopFrom(sqInt objOop); static void NoDbgRegParms NeverInline markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged); static void markWeaklingsAndMarkAndFireEphemerons(void); extern sqInt maybeSplObj(sqInt index); +static sqInt NoDbgRegParms newHashBitsOf(sqInt objOop); static sqInt newObjectHash(void); static sqInt newSpaceIsEmpty(void); extern sqInt nilObject(void); @@ -1176,8 +1180,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1245,6 +1249,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1339,14 +1344,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1469,6 +1475,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1645,8 +1652,8 @@ _iss usqInt freeStart; _iss usqInt newMethod; _iss sqInt messageSelector; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt trueObj; @@ -1714,6 +1721,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1722,7 +1730,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1749,6 +1756,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1763,11 +1772,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1802,6 +1809,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1824,7 +1832,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1855,6 +1862,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1870,6 +1878,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2482,7 +2493,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5089,7 +5100,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l738; + goto l737; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5137,10 +5148,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l765; + goto l764; } ourContext = marryFrameSP(localFP, localSP); - l765: /* end ensureFrameIsMarried:SP: */; + l764: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5149,7 +5160,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l738; + goto l737; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5158,10 +5169,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l758; + goto l757; } ourContext1 = marryFrameSP(localFP, localSP); - l758: /* end ensureFrameIsMarried:SP: */; + l757: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5172,7 +5183,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l738; + goto l737; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5224,10 +5235,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l751; + goto l750; } ourContext2 = marryFrameSP(localFP, localSP); - l751: /* end ensureFrameIsMarried:SP: */; + l750: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5236,7 +5247,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l738; + goto l737; } } assert(pageListIsWellFormed()); @@ -5341,11 +5352,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l748; + goto l747; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l748: /* end maybeReturnToMachineCodeFrame */; + l747: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5360,7 +5371,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l738: /* end case */; + l737: /* end case */; break; case 121: case 345: /*89*/ @@ -5479,27 +5490,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l776; + goto l775; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l776; + goto l775; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l776: /* end findFrameAbove:inPage: */; + l775: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l771; + goto l770; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l771: /* end newStackPage */; + l770: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5522,7 +5533,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l767; + goto l766; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5558,7 +5569,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l767; + goto l766; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5576,7 +5587,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l767; + goto l766; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5601,7 +5612,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l767; + goto l766; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5619,7 +5630,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l767: /* end case */; + l766: /* end case */; break; case 126: case 127: @@ -5653,10 +5664,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l777; + goto l776; } ourContext = marryFrameSP(theFP, theSP); - l777: /* end ensureFrameIsMarried:SP: */; + l776: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6098,12 +6109,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l795; + goto l794; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l795: /* end classAtIndex: */; + l794: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6124,7 +6135,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l779; + goto l778; } /* second probe */ @@ -6134,7 +6145,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l779; + goto l778; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6142,10 +6153,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l779; + goto l778; } ok = 0; - l779: /* end inlineLookupInMethodCacheSel:classTag: */; + l778: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6215,7 +6226,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l796; + goto l795; } } /* begin classAtIndex: */ @@ -6228,12 +6239,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l792; + goto l791; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l792: /* end classAtIndex: */; + l791: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6245,7 +6256,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l796: /* end internalFindNewMethodOrdinary */; + l795: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6258,28 +6269,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l800; + goto l799; } if (localPrimIndex == 256) { - goto l800; + goto l799; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l800; + goto l799; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l800; + goto l799; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l800; + goto l799; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l800; + goto l799; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6341,7 +6352,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l800; + goto l799; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6421,11 +6432,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l794; + goto l793; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l794: /* end getErrorObjectFromPrimFailCode */; + l793: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6449,7 +6460,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l800: /* end internalExecuteNewMethod */; + l799: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6894,18 +6905,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7021,7 +7036,7 @@ interpret(void) case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7240,7 +7255,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -8092,7 +8107,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l814; + goto l812; } if (bytecode == 172) { @@ -8101,7 +8116,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l814; + goto l812; } if (bytecode > 167) { @@ -8111,7 +8126,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l814; + goto l812; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8119,7 +8134,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l814: /* end case */; + l812: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -8277,7 +8292,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l817; + goto l815; } if (bytecode == 172) { @@ -8287,14 +8302,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l817; + goto l815; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l817: /* end case */; + l815: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -10654,7 +10669,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l818; + goto l816; } if (bytecode == 239) { @@ -10663,7 +10678,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l818; + goto l816; } if (bytecode == 238) { @@ -10673,7 +10688,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l818; + goto l816; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10681,7 +10696,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l818: /* end case */; + l816: /* end case */; break; case 355: /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -10839,7 +10854,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l821; + goto l819; } if (bytecode == 239) { @@ -10849,14 +10864,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l821; + goto l819; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l821: /* end case */; + l819: /* end case */; break; case 356: /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -12752,7 +12767,7 @@ interpret(void) case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -12899,6 +12914,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l621; } @@ -13675,7 +13691,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -13714,7 +13730,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -13726,10 +13741,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l689; + goto l679; } context = marryFrameSP(theFP, theSP); - l689: /* end ensureFrameIsMarried:SP: */; + l679: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -13757,13 +13772,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l683; + goto l688; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l683: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l688: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -13821,7 +13836,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -13846,10 +13861,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l699; + goto l698; } context = marryFrameSP(theFP, theSP); - l699: /* end ensureFrameIsMarried:SP: */; + l698: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -13877,13 +13892,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l695; + goto l694; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l695: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l694: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14003,11 +14018,11 @@ interpret(void) value = result; } object2 = value; - goto l705; + goto l704; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l705; + goto l704; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14030,7 +14045,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l705; + goto l704; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -14038,24 +14053,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l705; + goto l704; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l705; + goto l704; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); - goto l705; + goto l704; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l705; + goto l704; } error("bad index"); object2 = 0; - l705: /* end instVar:ofContext: */; + l704: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -14159,7 +14174,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l717; + goto l716; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14180,7 +14195,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l717; + goto l716; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14213,7 +14228,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l717: /* end instVar:ofContext:put: */; + l716: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -14231,7 +14246,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l720; + goto l719; } # endif /* IMMUTABILITY */ @@ -14251,7 +14266,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l720: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l719: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -14350,7 +14365,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l727; + goto l726; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14371,7 +14386,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l727; + goto l726; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14404,7 +14419,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l727: /* end instVar:ofContext:put: */; + l726: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -14422,7 +14437,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l730; + goto l729; } # endif /* IMMUTABILITY */ @@ -14442,7 +14457,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l730: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l729: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -14464,7 +14479,7 @@ interpret(void) VM_LABEL(extJumpIfNotInstanceOfBehaviorsBytecode); goto respondToUnknownBytecode; - goto l731; + goto l730; assert(((extB & 128) == 0) || (extB < 0)); @@ -14493,7 +14508,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l731; + goto l730; } } if (!inverse) { @@ -14502,7 +14517,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l731; + goto l730; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -14511,7 +14526,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l731: /* end case */; + l730: /* end case */; break; } } @@ -15187,7 +15202,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -15209,10 +15223,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -15753,8 +15767,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -15775,8 +15790,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -16129,6 +16145,19 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) return 0; } + +/* We know anObject has not a hash yet (or this trampoline would not be + called. Sets the hash, then answers it as a smallinteger */ + + /* CoInterpreter>>#ceNewHashOf: */ +sqInt +ceNewHashOf(sqInt anObject) +{ + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); + return (((usqInt)(newHashBitsOf(anObject)) << 3) | 1); +} + /* CoInterpreter>>#ceNonLocalReturn: */ sqInt ceNonLocalReturn(sqInt returnValue) @@ -16399,8 +16428,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -16556,7 +16586,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -16670,7 +16699,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -16912,7 +16940,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -17040,18 +17067,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -17135,7 +17166,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18325,7 +18355,6 @@ flushExternalPrimitiveOf(sqInt methodObj) header = ((((CogMethod *) header1))->methodHeader); } if (header & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (methodObj + ((LiteralStart + (((header >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primIdx1 = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -18442,7 +18471,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -19521,7 +19550,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -20122,18 +20151,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -20160,7 +20190,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -20589,7 +20619,7 @@ positive32BitValueOf(sqInt oop) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -20650,7 +20680,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -21100,7 +21130,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -21590,7 +21620,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -21744,6 +21774,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -21944,6 +21977,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -22192,15 +22226,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -22257,6 +22303,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -22269,8 +22316,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -22445,6 +22494,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -22803,7 +22853,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -22881,7 +22931,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -23270,8 +23320,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -23444,6 +23495,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -23764,8 +23816,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -23773,14 +23824,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -23809,8 +23860,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -23818,14 +23868,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -23856,8 +23906,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -23865,14 +23914,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -25552,8 +25601,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -25561,14 +25609,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -25592,8 +25640,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -25601,14 +25648,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -25634,8 +25681,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -25643,14 +25689,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l18; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -25673,6 +25719,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -26124,16 +26171,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -26160,7 +26207,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -26236,7 +26283,7 @@ magnitude64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -26610,7 +26657,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -27361,8 +27407,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -27541,8 +27587,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -27858,8 +27904,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28258,7 +28304,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -28488,7 +28534,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -28754,7 +28800,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -29017,7 +29063,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -29452,7 +29498,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -29462,7 +29508,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -29473,7 +29519,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -29490,7 +29536,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -29502,8 +29548,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -29521,7 +29566,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -29639,7 +29684,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -31457,8 +31502,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31466,14 +31510,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -31498,8 +31542,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -31507,14 +31550,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -31541,8 +31584,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -31550,14 +31592,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -31589,7 +31631,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -31753,7 +31795,7 @@ primitiveFullClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32018,7 +32060,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32280,7 +32322,7 @@ primitiveFullClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -32603,6 +32645,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -32835,7 +32924,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -34195,7 +34284,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -34433,7 +34522,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -34744,7 +34833,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -34838,7 +34927,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -34898,7 +34987,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -35042,8 +35131,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -35051,18 +35139,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -35085,8 +35173,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -35094,18 +35181,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -35117,8 +35204,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -35126,22 +35212,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -35366,7 +35452,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -35382,28 +35468,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = numSlots2; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ assert(!(isFreeObject(stack))); longAtput(stack, (longAt(stack)) | (1ULL << (markedBitFullShift()))); @@ -35420,28 +35506,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = numSlots3; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -35451,7 +35537,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -35461,7 +35546,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -35500,7 +35584,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & (smallIntegerTag())) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -35522,7 +35606,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -35560,28 +35644,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = numSlots; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -35596,13 +35680,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 3); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -36581,7 +36665,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -39935,8 +40019,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -39944,14 +40027,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39976,8 +40059,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -39985,14 +40067,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40019,8 +40101,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -40028,14 +40109,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -40294,7 +40375,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -40552,8 +40633,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40561,14 +40641,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40589,8 +40669,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -40598,14 +40677,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40628,8 +40707,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -40637,14 +40715,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -40787,18 +40865,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3))) != 7)) { return 0; @@ -40880,8 +40962,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41288,7 +41369,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; sqInt newFormat; sqInt normalizedInstFormat; @@ -41539,6 +41620,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -41570,7 +41662,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -41691,7 +41783,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -41703,7 +41795,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -41714,7 +41806,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -42182,8 +42274,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42191,14 +42282,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42221,8 +42312,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42230,14 +42320,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -42283,8 +42373,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42292,14 +42381,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -42423,16 +42512,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -42462,12 +42550,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -42505,7 +42592,6 @@ copyAndForward(sqInt survivor) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -42551,12 +42637,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -42590,12 +42675,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -42795,7 +42880,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -43323,8 +43408,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -43768,8 +43852,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43777,14 +43860,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43810,8 +43893,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -43819,14 +43901,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43841,8 +43923,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -43850,14 +43931,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -44231,7 +44312,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -44239,7 +44320,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -44250,8 +44331,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44292,8 +44372,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44301,14 +44380,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44347,8 +44426,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -44395,8 +44473,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44404,14 +44481,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -44459,8 +44536,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -44468,14 +44544,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44520,8 +44596,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -44574,8 +44649,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -44583,14 +44657,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -44634,7 +44708,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -44653,7 +44727,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -44669,7 +44743,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -44769,8 +44843,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44806,8 +44879,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44815,14 +44887,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44859,8 +44931,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -44868,14 +44939,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44905,8 +44976,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44914,14 +44984,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -45032,8 +45102,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45041,14 +45110,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45072,8 +45141,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45081,14 +45149,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45114,8 +45182,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45123,14 +45190,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -45172,8 +45239,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45181,14 +45247,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -46274,8 +46340,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46283,14 +46348,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46335,8 +46400,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46344,14 +46408,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46431,8 +46495,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46440,14 +46503,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -46603,12 +46666,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46651,8 +46714,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46660,14 +46722,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46718,12 +46780,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46766,8 +46828,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46775,14 +46836,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46876,12 +46937,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -46941,8 +47002,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46950,14 +47010,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -47007,7 +47067,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -47048,7 +47108,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -47642,8 +47702,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47651,14 +47710,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -48087,8 +48146,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48096,14 +48154,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48135,8 +48193,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48144,14 +48201,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48185,8 +48242,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -48194,14 +48250,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -48487,7 +48543,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -48742,8 +48797,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48751,14 +48805,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48781,8 +48835,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48790,14 +48843,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -49033,8 +49086,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49042,14 +49094,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49082,8 +49134,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49091,14 +49142,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49133,8 +49184,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49142,14 +49192,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49229,8 +49279,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49238,14 +49287,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49275,8 +49324,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49284,14 +49332,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49323,8 +49371,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49332,14 +49379,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49909,7 +49956,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -50234,8 +50281,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50243,14 +50289,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50273,8 +50319,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50282,14 +50327,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50314,8 +50359,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50323,14 +50367,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -50388,7 +50432,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -50396,7 +50440,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -50435,10 +50479,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i2 = 2; i2 < GIV(numClassTablePages); i2 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i2; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -50489,8 +50533,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50498,14 +50541,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } @@ -52010,8 +52053,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -52033,8 +52075,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -52078,7 +52119,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -52086,7 +52127,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -52094,7 +52135,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -52102,11 +52143,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -52116,7 +52157,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -52124,11 +52165,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -52141,8 +52182,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -52150,17 +52190,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -52169,7 +52209,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -52188,7 +52228,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -52204,7 +52244,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -52225,8 +52265,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -52234,17 +52273,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -52252,8 +52291,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -52261,17 +52299,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -52291,7 +52329,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -52349,8 +52386,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -52358,14 +52394,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -52491,8 +52527,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -52500,14 +52535,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -52537,8 +52572,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -52546,14 +52580,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52576,8 +52610,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -52585,14 +52618,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -52698,8 +52731,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -52707,14 +52739,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52768,8 +52800,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -52777,14 +52808,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -52840,8 +52871,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -52849,14 +52879,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -52888,7 +52918,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -52996,7 +53026,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -53024,7 +53054,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -53048,7 +53078,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -53076,7 +53106,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -53099,8 +53129,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53108,14 +53137,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -53609,7 +53638,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -53863,7 +53892,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -53985,6 +54014,19 @@ maybeSplObj(sqInt index) : 0); } + /* SpurMemoryManager>>#newHashBitsOf: */ +static sqInt NoDbgRegParms +newHashBitsOf(sqInt objOop) +{ + sqInt hash; + + hash = (newObjectHash()) & (identityHashHalfWordMask()); + /* begin setHashBitsOf:to: */ + assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))); + long32Atput(objOop + 4, ((((long32At(objOop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); + return hash; +} + /* Use a slight variation on D.H. Lehmer's linear congruential generator from 1951. See e.g. http://en.wikipedia.org/wiki/Linear_congruential_generator. */ @@ -54225,8 +54267,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54262,7 +54303,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -54277,7 +54318,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -54541,8 +54582,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54564,8 +54604,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -54588,8 +54627,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -54610,8 +54648,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -54689,8 +54726,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54698,14 +54734,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54727,8 +54763,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -54736,14 +54771,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -54768,8 +54803,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -54777,14 +54811,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -54896,8 +54930,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54993,8 +55026,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55002,14 +55034,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55048,8 +55080,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -55057,14 +55088,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55096,8 +55127,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55105,14 +55135,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -55253,8 +55283,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55740,8 +55769,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55749,14 +55777,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55787,8 +55815,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55796,14 +55823,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55836,8 +55863,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55845,14 +55871,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55956,8 +55982,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55965,14 +55990,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56010,8 +56035,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56019,14 +56043,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56066,8 +56090,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56075,14 +56098,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56208,8 +56231,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56217,14 +56239,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56254,8 +56276,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56263,14 +56284,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56293,8 +56314,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56302,14 +56322,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56385,8 +56405,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56394,14 +56413,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56429,8 +56448,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56438,14 +56456,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -56468,8 +56486,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56477,14 +56494,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -56832,8 +56849,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56841,14 +56857,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56878,8 +56894,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56887,14 +56902,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56917,8 +56932,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56926,14 +56940,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57059,8 +57073,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57068,14 +57081,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57104,8 +57117,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57113,14 +57125,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57151,8 +57163,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57160,14 +57171,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57250,8 +57261,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57259,14 +57269,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57302,8 +57312,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57311,14 +57320,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57356,8 +57365,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57365,14 +57373,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57456,8 +57464,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57465,14 +57472,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57502,8 +57509,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57511,14 +57517,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57541,8 +57547,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57550,14 +57555,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57767,8 +57772,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57776,14 +57780,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57811,8 +57815,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57820,14 +57823,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57848,8 +57851,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57857,14 +57859,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57939,13 +57941,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57953,15 +57955,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57978,7 +57980,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -58002,8 +58004,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -58011,14 +58012,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58039,13 +58040,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -58053,15 +58054,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -58078,7 +58079,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -58102,8 +58103,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58111,14 +58111,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58140,13 +58140,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -58154,15 +58154,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -58179,7 +58179,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -58204,8 +58204,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58213,14 +58212,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58633,7 +58632,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -58643,8 +58641,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -58695,7 +58692,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -58888,6 +58885,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -58988,7 +58995,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -59007,7 +59014,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -59023,7 +59030,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -59032,7 +59039,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -59051,7 +59058,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -59067,7 +59074,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -59131,8 +59138,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -59298,7 +59304,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -59980,11 +59986,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -59999,7 +60005,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -60015,8 +60021,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -60024,16 +60029,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -60059,8 +60064,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60068,14 +60072,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -60095,16 +60099,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -60113,11 +60117,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -60125,7 +60129,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -60195,8 +60199,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -60204,14 +60207,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -60310,8 +60313,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -60331,8 +60333,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -60340,14 +60341,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -60409,8 +60410,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60489,7 +60489,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -60511,7 +60511,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -60560,7 +60560,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -60576,8 +60576,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60585,16 +60584,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -60665,8 +60664,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -60674,14 +60672,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -60700,9 +60698,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -60718,9 +60713,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -60752,9 +60746,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -60765,8 +60758,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60776,9 +60768,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -60836,7 +60827,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -60911,8 +60902,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60968,8 +60958,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -60977,14 +60966,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -61049,8 +61038,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61058,14 +61046,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -61182,8 +61170,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61191,14 +61178,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -61238,7 +61225,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -61404,13 +61391,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l56; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l56: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l57; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -61418,15 +61405,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l57; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l57; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l57; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -61443,7 +61430,7 @@ updatePointers(void) numLiterals1 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l57: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -61470,8 +61457,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -61479,14 +61465,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -61498,7 +61484,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -61511,13 +61497,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l63; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l63: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l64; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -61525,15 +61511,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l64; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l64; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l64; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -61550,7 +61536,7 @@ updatePointers(void) numLiterals2 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l64: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -61578,8 +61564,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -61587,16 +61572,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -61637,13 +61622,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -61651,15 +61636,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -61676,7 +61661,7 @@ updatePointers(void) numLiterals3 = ((header4 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -61713,8 +61698,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -61749,7 +61733,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -61762,8 +61746,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -61771,18 +61754,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -61805,13 +61788,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l63; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -61819,15 +61802,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l62; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l62; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -61844,7 +61827,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -61873,8 +61856,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61882,14 +61864,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -62091,8 +62073,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62100,14 +62081,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -62192,7 +62173,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -62292,8 +62273,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -62460,7 +62441,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -62576,8 +62557,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62585,24 +62565,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -62665,8 +62645,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -62895,8 +62875,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); @@ -63202,7 +63182,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -63296,8 +63275,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63305,14 +63283,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63333,8 +63311,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -63342,14 +63319,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -63372,8 +63349,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -63381,14 +63357,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -64103,7 +64079,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -64113,7 +64089,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -64201,9 +64177,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -64309,6 +64285,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -64932,8 +64937,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -64941,14 +64945,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -65000,8 +65004,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -65009,14 +65012,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -65070,8 +65073,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -65079,20 +65081,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -65125,8 +65127,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -65134,14 +65135,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -65166,8 +65167,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -65175,14 +65175,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -65209,8 +65209,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -65218,16 +65217,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -65352,8 +65351,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -65427,8 +65427,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -65518,8 +65519,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66838,8 +66840,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -67893,7 +67896,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68068,7 +68071,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68236,7 +68239,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68402,7 +68405,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -68567,7 +68570,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -68914,8 +68917,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -68968,11 +68972,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -68998,11 +69000,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -69201,18 +69201,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -69485,6 +69486,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -69938,8 +69972,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -69947,14 +69980,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -69985,8 +70018,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -69994,14 +70026,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70025,8 +70057,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -70034,14 +70065,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -70769,7 +70800,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -70780,7 +70811,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -70791,23 +70822,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -70823,39 +70854,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -70868,7 +70899,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -70876,7 +70907,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -70887,7 +70918,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -70901,7 +70932,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -70914,12 +70945,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -70930,7 +70961,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -70938,9 +70969,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -70954,8 +70985,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -70963,14 +70993,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71017,7 +71047,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -71028,7 +71058,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -71039,23 +71069,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71071,39 +71101,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71116,7 +71146,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71124,7 +71154,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -71135,7 +71165,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71149,7 +71179,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71162,12 +71192,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71178,7 +71208,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71186,9 +71216,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71202,8 +71232,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71211,14 +71240,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71266,7 +71295,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -71277,7 +71306,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -71288,23 +71317,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71320,39 +71349,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71365,7 +71394,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71373,7 +71402,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -71384,7 +71413,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71398,7 +71427,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71411,12 +71440,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71427,7 +71456,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71435,9 +71464,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71452,8 +71481,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71461,14 +71489,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -72786,11 +72814,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73044,14 +73074,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -73068,6 +73107,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -73080,21 +73120,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -73110,12 +73154,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -73131,6 +73178,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -73144,11 +73192,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73174,6 +73225,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -74563,7 +74618,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -78090,7 +78145,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -78127,7 +78182,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -78428,7 +78483,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -78734,7 +78789,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -79046,8 +79101,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -79097,8 +79153,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -79184,7 +79242,6 @@ primitiveVMParameter(void) char *sp1; char *sp2; sqInt tagBits; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -79234,6 +79291,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -79243,165 +79301,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -79409,9 +79431,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -79419,22 +79441,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -79442,192 +79464,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -79656,7 +79583,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -79689,14 +79616,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -79772,7 +79702,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -79885,48 +79815,38 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l84; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l84: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -79981,7 +79901,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -80003,12 +79924,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l65; + goto l77; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l65: /* end setCogVMFlags: */; + l77: /* end setCogVMFlags: */; } } if (index == 49) { @@ -80241,8 +80162,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -80250,14 +80170,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -80296,8 +80216,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -80305,14 +80224,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -80344,8 +80263,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -80353,14 +80271,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -80385,6 +80303,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -80432,6 +80351,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spur64src/vm/cointerp.h b/spur64src/vm/cointerp.h index 9b816dafa..98b1fcd77 100644 --- a/spur64src/vm/cointerp.h +++ b/spur64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ @@ -37,6 +37,7 @@ extern sqInt ceContextinstVar(sqInt maybeContext, sqInt slotIndex); extern sqInt ceContextinstVarvalue(sqInt maybeMarriedContext, sqInt slotIndex, sqInt anOop); extern sqInt ceInterpretMethodFromPICreceiver(sqInt aMethodObj, sqInt rcvr); extern sqInt ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr); +extern sqInt ceNewHashOf(sqInt anObject); extern sqInt ceNonLocalReturn(sqInt returnValue); extern sqInt ceReturnToInterpreter(sqInt anOop); extern sqInt ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs); @@ -139,6 +140,7 @@ extern usqInt scavengeThresholdAddress(void); extern usqInt specialObjectsArrayAddress(void); extern sqInt withoutForwardingOnandwithsendToCogit(sqInt obj1, sqInt obj2, sqInt aBool, sqInt (*selector)(sqInt,sqInt,sqInt)); extern sqInt byteSwapped(sqInt w); +extern sqInt fetchClassTagOf(sqInt oop); extern sqInt floatObjectOf(double aFloat); extern sqInt headerIndicatesAlternateBytecodeSet(sqInt methodHeader); extern sqInt instantiateClassindexableSize(sqInt classObj, usqInt nElements); @@ -227,7 +229,7 @@ extern void NeverInline NeverInline markAndTrace(sqInt objOop); extern sqInt maybeSplObj(sqInt index); extern sqInt nilObject(void); extern sqInt nonIndexablePointerFormat(void); -extern usqInt numBytesOf(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); extern sqInt numStrongSlotsOfWeakling(sqInt objOop); @@ -282,8 +284,9 @@ extern sqInt argumentCountOf(sqInt methodPointer); extern sqInt canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader); extern sqInt checkAllAccessibleObjectsOkay(void); extern sqInt checkOkayInterpreterObjects(sqInt writeBack); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt disownVM(sqInt flags); extern sqInt doSignalSemaphoreWithIndex(sqInt index); extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ; extern usqLong getNextWakeupUsecs(void); @@ -307,6 +310,7 @@ extern sqInt methodClassOf(sqInt methodPointer); extern sqInt methodPrimitiveIndex(void); extern sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); extern sqInt objCouldBeClassObj(sqInt objOop); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); @@ -348,6 +352,9 @@ VM_EXPORT sqInt breakSelectorLength ; VM_EXPORT sqInt checkAllocFiller; VM_EXPORT sqInt checkedPluginName; VM_EXPORT sqInt checkForLeaks; +VM_EXPORT sqInt debugCallbackInvokes; +VM_EXPORT sqInt debugCallbackPath; +VM_EXPORT sqInt debugCallbackReturns; VM_EXPORT sqInt deferDisplayUpdates; VM_EXPORT sqInt desiredCogCodeSize; VM_EXPORT sqInt desiredEdenBytes; diff --git a/spur64src/vm/gcc3x-cointerp.c b/spur64src/vm/gcc3x-cointerp.c index b77953a5a..6238fb481 100644 --- a/spur64src/vm/gcc3x-cointerp.c +++ b/spur64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -453,6 +453,7 @@ extern sqInt ceContextinstVar(sqInt maybeContext, sqInt slotIndex); extern sqInt ceContextinstVarvalue(sqInt maybeMarriedContext, sqInt slotIndex, sqInt anOop); extern sqInt ceInterpretMethodFromPICreceiver(sqInt aMethodObj, sqInt rcvr); extern sqInt ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr); +extern sqInt ceNewHashOf(sqInt anObject); extern sqInt ceNonLocalReturn(sqInt returnValue); extern sqInt ceReturnToInterpreter(sqInt anOop); extern sqInt ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs); @@ -724,6 +725,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -892,6 +894,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -917,9 +920,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1168,6 +1171,7 @@ static void NoDbgRegParms markLoopFrom(sqInt objOop); static void NoDbgRegParms NeverInline markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged); static void markWeaklingsAndMarkAndFireEphemerons(void); extern sqInt maybeSplObj(sqInt index); +static sqInt NoDbgRegParms newHashBitsOf(sqInt objOop); static sqInt newObjectHash(void); static sqInt newSpaceIsEmpty(void); extern sqInt nilObject(void); @@ -1179,8 +1183,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1248,6 +1252,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1342,14 +1347,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1472,6 +1478,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1648,8 +1655,8 @@ _iss usqInt freeStart; _iss usqInt newMethod; _iss sqInt messageSelector; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt trueObj; @@ -1717,6 +1724,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1725,7 +1733,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1752,6 +1759,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1766,11 +1775,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1805,6 +1812,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1827,7 +1835,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1858,6 +1865,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1873,6 +1881,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2485,7 +2496,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5098,7 +5109,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l738; + goto l737; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5146,10 +5157,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l765; + goto l764; } ourContext = marryFrameSP(localFP, localSP); - l765: /* end ensureFrameIsMarried:SP: */; + l764: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5158,7 +5169,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l738; + goto l737; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5167,10 +5178,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l758; + goto l757; } ourContext1 = marryFrameSP(localFP, localSP); - l758: /* end ensureFrameIsMarried:SP: */; + l757: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5181,7 +5192,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l738; + goto l737; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5233,10 +5244,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l751; + goto l750; } ourContext2 = marryFrameSP(localFP, localSP); - l751: /* end ensureFrameIsMarried:SP: */; + l750: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5245,7 +5256,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l738; + goto l737; } } assert(pageListIsWellFormed()); @@ -5350,11 +5361,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l748; + goto l747; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l748: /* end maybeReturnToMachineCodeFrame */; + l747: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5369,7 +5380,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l738: /* end case */; + l737: /* end case */; BREAK; CASE(121) CASE(345) /*89*/ @@ -5488,27 +5499,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l776; + goto l775; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l776; + goto l775; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l776: /* end findFrameAbove:inPage: */; + l775: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l771; + goto l770; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l771: /* end newStackPage */; + l770: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5531,7 +5542,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l767; + goto l766; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5567,7 +5578,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l767; + goto l766; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5585,7 +5596,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l767; + goto l766; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5610,7 +5621,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l767; + goto l766; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5628,7 +5639,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l767: /* end case */; + l766: /* end case */; BREAK; CASE(126) CASE(127) @@ -5662,10 +5673,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l777; + goto l776; } ourContext = marryFrameSP(theFP, theSP); - l777: /* end ensureFrameIsMarried:SP: */; + l776: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6107,12 +6118,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l795; + goto l794; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l795: /* end classAtIndex: */; + l794: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6133,7 +6144,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l779; + goto l778; } /* second probe */ @@ -6143,7 +6154,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l779; + goto l778; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6151,10 +6162,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l779; + goto l778; } ok = 0; - l779: /* end inlineLookupInMethodCacheSel:classTag: */; + l778: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6224,7 +6235,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l796; + goto l795; } } /* begin classAtIndex: */ @@ -6237,12 +6248,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l792; + goto l791; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l792: /* end classAtIndex: */; + l791: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6254,7 +6265,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l796: /* end internalFindNewMethodOrdinary */; + l795: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6267,28 +6278,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l800; + goto l799; } if (localPrimIndex == 256) { - goto l800; + goto l799; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l800; + goto l799; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l800; + goto l799; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l800; + goto l799; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l800; + goto l799; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6350,7 +6361,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l800; + goto l799; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6430,11 +6441,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l794; + goto l793; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l794: /* end getErrorObjectFromPrimFailCode */; + l793: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6458,7 +6469,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l800: /* end internalExecuteNewMethod */; + l799: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6903,18 +6914,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7030,7 +7045,7 @@ interpret(void) CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7249,7 +7264,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -8101,7 +8116,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l814; + goto l812; } if (bytecode == 172) { @@ -8110,7 +8125,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l814; + goto l812; } if (bytecode > 167) { @@ -8120,7 +8135,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l814; + goto l812; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8128,7 +8143,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l814: /* end case */; + l812: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -8286,7 +8301,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l817; + goto l815; } if (bytecode == 172) { @@ -8296,14 +8311,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l817; + goto l815; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l817: /* end case */; + l815: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -10663,7 +10678,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l818; + goto l816; } if (bytecode == 239) { @@ -10672,7 +10687,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l818; + goto l816; } if (bytecode == 238) { @@ -10682,7 +10697,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l818; + goto l816; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10690,7 +10705,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l818: /* end case */; + l816: /* end case */; BREAK; CASE(355) /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -10848,7 +10863,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l821; + goto l819; } if (bytecode == 239) { @@ -10858,14 +10873,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l821; + goto l819; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l821: /* end case */; + l819: /* end case */; BREAK; CASE(356) /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -12761,7 +12776,7 @@ interpret(void) CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -12908,6 +12923,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l621; } @@ -13684,7 +13700,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -13723,7 +13739,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -13735,10 +13750,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l689; + goto l679; } context = marryFrameSP(theFP, theSP); - l689: /* end ensureFrameIsMarried:SP: */; + l679: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -13766,13 +13781,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l683; + goto l688; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l683: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l688: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -13830,7 +13845,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -13855,10 +13870,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l699; + goto l698; } context = marryFrameSP(theFP, theSP); - l699: /* end ensureFrameIsMarried:SP: */; + l698: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -13886,13 +13901,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l695; + goto l694; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l695: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l694: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14012,11 +14027,11 @@ interpret(void) value = result; } object2 = value; - goto l705; + goto l704; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l705; + goto l704; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14039,7 +14054,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l705; + goto l704; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -14047,24 +14062,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l705; + goto l704; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l705; + goto l704; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); - goto l705; + goto l704; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l705; + goto l704; } error("bad index"); object2 = 0; - l705: /* end instVar:ofContext: */; + l704: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -14168,7 +14183,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l717; + goto l716; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14189,7 +14204,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l717; + goto l716; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14222,7 +14237,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l717: /* end instVar:ofContext:put: */; + l716: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -14240,7 +14255,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l720; + goto l719; } # endif /* IMMUTABILITY */ @@ -14260,7 +14275,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l720: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l719: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -14359,7 +14374,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l727; + goto l726; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14380,7 +14395,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l727; + goto l726; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14413,7 +14428,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l727: /* end instVar:ofContext:put: */; + l726: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -14431,7 +14446,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l730; + goto l729; } # endif /* IMMUTABILITY */ @@ -14451,7 +14466,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l730: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l729: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -14473,7 +14488,7 @@ interpret(void) VM_LABEL(extJumpIfNotInstanceOfBehaviorsBytecode); goto respondToUnknownBytecode; - goto l731; + goto l730; assert(((extB & 128) == 0) || (extB < 0)); @@ -14502,7 +14517,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l731; + goto l730; } } if (!inverse) { @@ -14511,7 +14526,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l731; + goto l730; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -14520,7 +14535,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l731: /* end case */; + l730: /* end case */; BREAK; } } @@ -15196,7 +15211,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -15218,10 +15232,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -15762,8 +15776,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -15784,8 +15799,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -16138,6 +16154,19 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) return 0; } + +/* We know anObject has not a hash yet (or this trampoline would not be + called. Sets the hash, then answers it as a smallinteger */ + + /* CoInterpreter>>#ceNewHashOf: */ +sqInt +ceNewHashOf(sqInt anObject) +{ + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); + return (((usqInt)(newHashBitsOf(anObject)) << 3) | 1); +} + /* CoInterpreter>>#ceNonLocalReturn: */ sqInt ceNonLocalReturn(sqInt returnValue) @@ -16408,8 +16437,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -16565,7 +16595,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -16679,7 +16708,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -16921,7 +16949,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -17049,18 +17076,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -17144,7 +17175,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18334,7 +18364,6 @@ flushExternalPrimitiveOf(sqInt methodObj) header = ((((CogMethod *) header1))->methodHeader); } if (header & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (methodObj + ((LiteralStart + (((header >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primIdx1 = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -18451,7 +18480,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -19530,7 +19559,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -20131,18 +20160,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -20169,7 +20199,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -20598,7 +20628,7 @@ positive32BitValueOf(sqInt oop) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -20659,7 +20689,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -21109,7 +21139,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -21599,7 +21629,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -21753,6 +21783,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -21953,6 +21986,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -22201,15 +22235,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -22266,6 +22312,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -22278,8 +22325,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -22454,6 +22503,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -22812,7 +22862,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -22890,7 +22940,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -23279,8 +23329,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -23453,6 +23504,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -23773,8 +23825,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -23782,14 +23833,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -23818,8 +23869,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -23827,14 +23877,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -23865,8 +23915,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -23874,14 +23923,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -25561,8 +25610,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -25570,14 +25618,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -25601,8 +25649,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -25610,14 +25657,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -25643,8 +25690,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -25652,14 +25698,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l18; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -25682,6 +25728,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -26133,16 +26180,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -26169,7 +26216,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -26245,7 +26292,7 @@ magnitude64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -26619,7 +26666,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -27370,8 +27416,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -27550,8 +27596,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -27867,8 +27913,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28267,7 +28313,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -28497,7 +28543,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -28763,7 +28809,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -29026,7 +29072,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -29461,7 +29507,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -29471,7 +29517,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -29482,7 +29528,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -29499,7 +29545,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -29511,8 +29557,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -29530,7 +29575,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -29648,7 +29693,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -31466,8 +31511,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31475,14 +31519,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -31507,8 +31551,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -31516,14 +31559,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -31550,8 +31593,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -31559,14 +31601,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -31598,7 +31640,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -31762,7 +31804,7 @@ primitiveFullClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32027,7 +32069,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32289,7 +32331,7 @@ primitiveFullClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -32612,6 +32654,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -32844,7 +32933,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -34204,7 +34293,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -34442,7 +34531,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -34753,7 +34842,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -34847,7 +34936,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -34907,7 +34996,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -35051,8 +35140,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -35060,18 +35148,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -35094,8 +35182,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -35103,18 +35190,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -35126,8 +35213,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -35135,22 +35221,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -35375,7 +35461,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -35391,28 +35477,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = numSlots2; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ assert(!(isFreeObject(stack))); longAtput(stack, (longAt(stack)) | (1ULL << (markedBitFullShift()))); @@ -35429,28 +35515,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = numSlots3; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -35460,7 +35546,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -35470,7 +35555,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -35509,7 +35593,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & (smallIntegerTag())) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -35531,7 +35615,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -35569,28 +35653,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = numSlots; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -35605,13 +35689,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 3); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -36590,7 +36674,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -39944,8 +40028,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -39953,14 +40036,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39985,8 +40068,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -39994,14 +40076,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40028,8 +40110,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -40037,14 +40118,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -40303,7 +40384,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -40561,8 +40642,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40570,14 +40650,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40598,8 +40678,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -40607,14 +40686,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40637,8 +40716,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -40646,14 +40724,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -40796,18 +40874,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3))) != 7)) { return 0; @@ -40889,8 +40971,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41297,7 +41378,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; sqInt newFormat; sqInt normalizedInstFormat; @@ -41548,6 +41629,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -41579,7 +41671,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -41700,7 +41792,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -41712,7 +41804,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -41723,7 +41815,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -42191,8 +42283,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42200,14 +42291,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42230,8 +42321,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42239,14 +42329,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -42292,8 +42382,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42301,14 +42390,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -42432,16 +42521,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -42471,12 +42559,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -42514,7 +42601,6 @@ copyAndForward(sqInt survivor) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -42560,12 +42646,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -42599,12 +42684,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -42804,7 +42889,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -43332,8 +43417,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -43777,8 +43861,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43786,14 +43869,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43819,8 +43902,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -43828,14 +43910,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43850,8 +43932,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -43859,14 +43940,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -44240,7 +44321,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -44248,7 +44329,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -44259,8 +44340,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44301,8 +44381,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44310,14 +44389,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44356,8 +44435,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -44404,8 +44482,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44413,14 +44490,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -44468,8 +44545,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -44477,14 +44553,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44529,8 +44605,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -44583,8 +44658,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -44592,14 +44666,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -44643,7 +44717,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -44662,7 +44736,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -44678,7 +44752,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -44778,8 +44852,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44815,8 +44888,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44824,14 +44896,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44868,8 +44940,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -44877,14 +44948,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44914,8 +44985,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -44923,14 +44993,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -45041,8 +45111,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45050,14 +45119,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45081,8 +45150,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45090,14 +45158,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45123,8 +45191,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45132,14 +45199,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -45181,8 +45248,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45190,14 +45256,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -46283,8 +46349,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46292,14 +46357,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46344,8 +46409,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46353,14 +46417,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46440,8 +46504,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46449,14 +46512,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -46612,12 +46675,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46660,8 +46723,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46669,14 +46731,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46727,12 +46789,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46775,8 +46837,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46784,14 +46845,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46885,12 +46946,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -46950,8 +47011,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46959,14 +47019,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -47016,7 +47076,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -47057,7 +47117,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -47651,8 +47711,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47660,14 +47719,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -48096,8 +48155,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48105,14 +48163,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48144,8 +48202,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48153,14 +48210,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48194,8 +48251,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -48203,14 +48259,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -48496,7 +48552,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -48751,8 +48806,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48760,14 +48814,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48790,8 +48844,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48799,14 +48852,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -49042,8 +49095,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49051,14 +49103,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49091,8 +49143,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49100,14 +49151,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49142,8 +49193,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49151,14 +49201,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49238,8 +49288,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49247,14 +49296,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49284,8 +49333,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49293,14 +49341,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49332,8 +49380,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49341,14 +49388,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49918,7 +49965,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -50243,8 +50290,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50252,14 +50298,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50282,8 +50328,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50291,14 +50336,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50323,8 +50368,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50332,14 +50376,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -50397,7 +50441,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -50405,7 +50449,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -50444,10 +50488,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i2 = 2; i2 < GIV(numClassTablePages); i2 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i2; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -50498,8 +50542,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50507,14 +50550,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } @@ -52019,8 +52062,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -52042,8 +52084,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -52087,7 +52128,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -52095,7 +52136,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -52103,7 +52144,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -52111,11 +52152,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -52125,7 +52166,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -52133,11 +52174,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -52150,8 +52191,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -52159,17 +52199,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -52178,7 +52218,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -52197,7 +52237,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -52213,7 +52253,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -52234,8 +52274,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -52243,17 +52282,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -52261,8 +52300,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -52270,17 +52308,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -52300,7 +52338,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -52358,8 +52395,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -52367,14 +52403,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -52500,8 +52536,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -52509,14 +52544,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -52546,8 +52581,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -52555,14 +52589,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52585,8 +52619,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -52594,14 +52627,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -52707,8 +52740,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -52716,14 +52748,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52777,8 +52809,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -52786,14 +52817,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -52849,8 +52880,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -52858,14 +52888,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -52897,7 +52927,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -53005,7 +53035,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -53033,7 +53063,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -53057,7 +53087,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -53085,7 +53115,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -53108,8 +53138,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53117,14 +53146,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -53618,7 +53647,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -53872,7 +53901,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -53994,6 +54023,19 @@ maybeSplObj(sqInt index) : 0); } + /* SpurMemoryManager>>#newHashBitsOf: */ +static sqInt NoDbgRegParms +newHashBitsOf(sqInt objOop) +{ + sqInt hash; + + hash = (newObjectHash()) & (identityHashHalfWordMask()); + /* begin setHashBitsOf:to: */ + assert(((hash >= 0) && (hash <= (identityHashHalfWordMask())))); + long32Atput(objOop + 4, ((((long32At(objOop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash); + return hash; +} + /* Use a slight variation on D.H. Lehmer's linear congruential generator from 1951. See e.g. http://en.wikipedia.org/wiki/Linear_congruential_generator. */ @@ -54234,8 +54276,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54271,7 +54312,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -54286,7 +54327,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -54550,8 +54591,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54573,8 +54613,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -54597,8 +54636,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -54619,8 +54657,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -54698,8 +54735,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54707,14 +54743,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54736,8 +54772,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -54745,14 +54780,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -54777,8 +54812,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -54786,14 +54820,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -54905,8 +54939,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55002,8 +55035,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55011,14 +55043,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55057,8 +55089,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -55066,14 +55097,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55105,8 +55136,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55114,14 +55144,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -55262,8 +55292,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55749,8 +55778,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55758,14 +55786,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55796,8 +55824,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55805,14 +55832,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55845,8 +55872,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55854,14 +55880,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55965,8 +55991,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55974,14 +55999,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56019,8 +56044,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56028,14 +56052,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56075,8 +56099,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56084,14 +56107,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56217,8 +56240,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56226,14 +56248,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56263,8 +56285,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56272,14 +56293,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56302,8 +56323,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56311,14 +56331,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56394,8 +56414,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56403,14 +56422,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56438,8 +56457,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56447,14 +56465,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -56477,8 +56495,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56486,14 +56503,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -56841,8 +56858,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56850,14 +56866,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56887,8 +56903,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56896,14 +56911,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56926,8 +56941,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56935,14 +56949,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57068,8 +57082,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57077,14 +57090,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57113,8 +57126,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57122,14 +57134,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57160,8 +57172,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57169,14 +57180,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57259,8 +57270,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57268,14 +57278,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57311,8 +57321,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57320,14 +57329,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57365,8 +57374,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57374,14 +57382,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57465,8 +57473,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57474,14 +57481,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57511,8 +57518,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57520,14 +57526,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57550,8 +57556,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57559,14 +57564,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57776,8 +57781,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57785,14 +57789,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57820,8 +57824,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57829,14 +57832,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57857,8 +57860,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57866,14 +57868,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57948,13 +57950,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57962,15 +57964,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57987,7 +57989,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -58011,8 +58013,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -58020,14 +58021,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58048,13 +58049,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -58062,15 +58063,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -58087,7 +58088,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -58111,8 +58112,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58120,14 +58120,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58149,13 +58149,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -58163,15 +58163,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -58188,7 +58188,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -58213,8 +58213,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58222,14 +58221,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58642,7 +58641,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -58652,8 +58650,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -58704,7 +58701,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -58897,6 +58894,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -58997,7 +59004,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -59016,7 +59023,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -59032,7 +59039,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -59041,7 +59048,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -59060,7 +59067,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -59076,7 +59083,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -59140,8 +59147,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -59307,7 +59313,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -59989,11 +59995,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -60008,7 +60014,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -60024,8 +60030,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -60033,16 +60038,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -60068,8 +60073,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60077,14 +60081,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -60104,16 +60108,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -60122,11 +60126,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -60134,7 +60138,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -60204,8 +60208,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -60213,14 +60216,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -60319,8 +60322,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -60340,8 +60342,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -60349,14 +60350,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -60418,8 +60419,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60498,7 +60498,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -60520,7 +60520,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -60569,7 +60569,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -60585,8 +60585,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60594,16 +60593,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -60674,8 +60673,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -60683,14 +60681,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -60709,9 +60707,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -60727,9 +60722,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -60761,9 +60755,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -60774,8 +60767,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60785,9 +60777,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -60845,7 +60836,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -60920,8 +60911,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60977,8 +60967,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -60986,14 +60975,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -61058,8 +61047,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61067,14 +61055,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -61191,8 +61179,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61200,14 +61187,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -61247,7 +61234,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -61413,13 +61400,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l56; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l56: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l57; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -61427,15 +61414,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l57; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l57; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l57; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -61452,7 +61439,7 @@ updatePointers(void) numLiterals1 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l57: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -61479,8 +61466,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -61488,14 +61474,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -61507,7 +61493,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -61520,13 +61506,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l63; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l63: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l64; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -61534,15 +61520,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l64; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l64; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l64; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -61559,7 +61545,7 @@ updatePointers(void) numLiterals2 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l64: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -61587,8 +61573,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -61596,16 +61581,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -61646,13 +61631,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -61660,15 +61645,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -61685,7 +61670,7 @@ updatePointers(void) numLiterals3 = ((header4 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -61722,8 +61707,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -61758,7 +61742,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -61771,8 +61755,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -61780,18 +61763,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -61814,13 +61797,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l63; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -61828,15 +61811,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l62; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l62; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -61853,7 +61836,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -61882,8 +61865,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61891,14 +61873,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -62100,8 +62082,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62109,14 +62090,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -62201,7 +62182,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -62301,8 +62282,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -62469,7 +62450,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -62585,8 +62566,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62594,24 +62574,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -62674,8 +62654,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -62904,8 +62884,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); @@ -63211,7 +63191,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -63305,8 +63284,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63314,14 +63292,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63342,8 +63320,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -63351,14 +63328,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -63381,8 +63358,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -63390,14 +63366,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -64112,7 +64088,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -64122,7 +64098,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -64210,9 +64186,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -64318,6 +64294,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -64941,8 +64946,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -64950,14 +64954,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -65009,8 +65013,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -65018,14 +65021,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -65079,8 +65082,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -65088,20 +65090,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -65134,8 +65136,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -65143,14 +65144,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -65175,8 +65176,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -65184,14 +65184,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -65218,8 +65218,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -65227,16 +65226,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -65361,8 +65360,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -65436,8 +65436,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -65527,8 +65528,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66847,8 +66849,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -67902,7 +67905,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68077,7 +68080,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68245,7 +68248,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68411,7 +68414,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -68576,7 +68579,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -68923,8 +68926,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -68977,11 +68981,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -69007,11 +69009,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -69210,18 +69210,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -69494,6 +69495,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -69947,8 +69981,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -69956,14 +69989,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -69994,8 +70027,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -70003,14 +70035,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70034,8 +70066,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -70043,14 +70074,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -70778,7 +70809,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -70789,7 +70820,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -70800,23 +70831,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -70832,39 +70863,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -70877,7 +70908,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -70885,7 +70916,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -70896,7 +70927,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -70910,7 +70941,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -70923,12 +70954,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -70939,7 +70970,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -70947,9 +70978,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -70963,8 +70994,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -70972,14 +71002,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71026,7 +71056,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -71037,7 +71067,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -71048,23 +71078,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71080,39 +71110,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71125,7 +71155,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71133,7 +71163,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -71144,7 +71174,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71158,7 +71188,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71171,12 +71201,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71187,7 +71217,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71195,9 +71225,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71211,8 +71241,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71220,14 +71249,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71275,7 +71304,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -71286,7 +71315,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -71297,23 +71326,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71329,39 +71358,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71374,7 +71403,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71382,7 +71411,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -71393,7 +71422,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71407,7 +71436,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71420,12 +71449,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71436,7 +71465,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71444,9 +71473,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71461,8 +71490,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71470,14 +71498,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -72795,11 +72823,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73053,14 +73083,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -73077,6 +73116,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -73089,21 +73129,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -73119,12 +73163,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -73140,6 +73187,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -73153,11 +73201,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73183,6 +73234,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -74572,7 +74627,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -78099,7 +78154,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -78136,7 +78191,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -78437,7 +78492,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -78743,7 +78798,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -79055,8 +79110,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -79106,8 +79162,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -79193,7 +79251,6 @@ primitiveVMParameter(void) char *sp1; char *sp2; sqInt tagBits; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -79243,6 +79300,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -79252,165 +79310,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -79418,9 +79440,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -79428,22 +79450,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -79451,192 +79473,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -79665,7 +79592,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -79698,14 +79625,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -79781,7 +79711,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -79894,48 +79824,38 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l84; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l84: /* end tenuringThreshold: */; } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -79990,7 +79910,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -80012,12 +79933,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l65; + goto l77; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l65: /* end setCogVMFlags: */; + l77: /* end setCogVMFlags: */; } } if (index == 49) { @@ -80250,8 +80171,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -80259,14 +80179,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -80305,8 +80225,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -80314,14 +80233,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -80353,8 +80272,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -80362,14 +80280,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -80394,6 +80312,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -80441,6 +80360,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spur64src/vm/interp.h b/spur64src/vm/interp.h index 033112181..eba59b8de 100644 --- a/spur64src/vm/interp.h +++ b/spur64src/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 8 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1152921504606846976 #define MaxSmallInteger 1152921504606846975 diff --git a/spur64src/vm/vmCallback.h b/spur64src/vm/vmCallback.h index 48d07f100..3bf23acc7 100644 --- a/spur64src/vm/vmCallback.h +++ b/spur64src/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/spurlowcode64src/vm/cogit.h b/spurlowcode64src/vm/cogit.h index 39493bfaa..7e8c42158 100644 --- a/spurlowcode64src/vm/cogit.h +++ b/spurlowcode64src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ @@ -94,6 +94,8 @@ extern sqInt mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj); extern void recordCallOffsetIn(CogMethod *cogMethod); extern void rewritePrimInvocationInto(CogMethod *cogMethod, void (*primFunctionPointer)(void)); extern void voidCogCompiledCode(void); +extern double getCogCodeZoneThreshold(void); +extern sqInt setCogCodeZoneThreshold(double ratio); extern void callCogCodePopReceiverArg0Regs(void); extern void callCogCodePopReceiverArg1Arg0Regs(void); @@ -146,6 +148,7 @@ VM_EXPORT sqInt traceStores; #define getCFramePointer() CFramePointer #define getCStackPointer() CStackPointer #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define noCheckEntryOffset() cmNoCheckEntryOffset #define noContextSwitchBlockEntryOffset() blockNoContextSwitchOffset #define printOnTrace() (traceFlags & 1) diff --git a/spurlowcode64src/vm/cogitX64.c b/spurlowcode64src/vm/cogitX64.c index 2ec79ae6a..6c212f9df 100644 --- a/spurlowcode64src/vm/cogitX64.c +++ b/spurlowcode64src/vm/cogitX64.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -265,7 +265,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 79 : 74) +#define NumTrampolines (IMMUTABILITY ? 80 : 75) #define OrCqR 108 #define OrCwR 116 #define OrRR 102 @@ -277,6 +277,7 @@ char *__cogitBuildInfo = __buildInfo; #define PrimCallMayCallBack 4 #define PrimCallNeedsNewMethod 1 #define PrimCallNeedsPrimitiveFunction 2 +#define PrimErrBadArgument 3 #define PrimErrNoMemory 9 #define PrimErrWritePastObject 17 #define PushCq 83 @@ -373,8 +374,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; unsigned char machineCode [14]; } AbstractInstruction; @@ -444,10 +445,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -613,7 +616,7 @@ static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -633,7 +636,7 @@ static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointe static void generateClosedPICPrototype(void); static CogMethod * generateCogFullBlock(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateOpenPICPrototype(void); static void generateRunTimeTrampolines(void); static void generateStackPointerCapture(void); @@ -691,7 +694,7 @@ static BytecodeDescriptor * loadBytesAndGetDescriptor(void); static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc); static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); -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); @@ -774,7 +777,7 @@ static sqInt NoDbgRegParms counters(CogMethod * self_in_counters); extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void NoDbgRegParms clearSavedPICUsageCount(CogMethod *cogMethod); static void compactCompiledCode(void); @@ -783,7 +786,6 @@ static void followForwardedLiteralsInOpenPICList(void); extern void freeMethod(CogMethod *cogMethod); static void freeOlderMethodsForCompaction(void); static sqInt kosherYoungReferrers(void); -static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); extern CogMethod * methodFor(void *address); extern sqInt methodsCompiledToMachineCodeInto(sqInt arrayObj); extern sqInt numMethods(void); @@ -1015,9 +1017,12 @@ static SimStackEntry * NoDbgRegParms storeToReg(SimStackEntry * self_in_storeToR static CogSimStackNativeEntry * NoDbgRegParms ensureIsMarkedAsSpilled(CogSimStackNativeEntry * self_in_ensureIsMarkedAsSpilled); static CogSimStackNativeEntry * NoDbgRegParms ensureSpilledSPscratchRegister(CogSimStackNativeEntry * self_in_ensureSpilledSPscratchRegister, sqInt spRegister, sqInt scratchRegister); static sqInt NoDbgRegParms nativeFloatRegisterMask(CogSimStackNativeEntry * self_in_nativeFloatRegisterMask); +static sqInt NoDbgRegParms nativeFloatRegisterOrNone(CogSimStackNativeEntry * self_in_nativeFloatRegisterOrNone); static CogSimStackNativeEntry * NoDbgRegParms nativePopToReg(CogSimStackNativeEntry * self_in_nativePopToReg, sqInt reg); static CogSimStackNativeEntry * NoDbgRegParms nativePopToRegsecondReg(CogSimStackNativeEntry * self_in_nativePopToRegsecondReg, sqInt reg, sqInt secondReg); static sqInt NoDbgRegParms nativeRegisterMask(CogSimStackNativeEntry * self_in_nativeRegisterMask); +static sqInt NoDbgRegParms nativeRegisterOrNone(CogSimStackNativeEntry * self_in_nativeRegisterOrNone); +static sqInt NoDbgRegParms nativeRegisterSecondOrNone(CogSimStackNativeEntry * self_in_nativeRegisterSecondOrNone); static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToReg(CogSimStackNativeEntry * self_in_nativeStackPopToReg, sqInt reg); static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToRegsecondReg(CogSimStackNativeEntry * self_in_nativeStackPopToRegsecondReg, sqInt reg, sqInt secondReg); static sqInt NoDbgRegParms spillingNeedsScratchRegister(CogSimStackNativeEntry * self_in_spillingNeedsScratchRegister); @@ -1087,7 +1092,7 @@ static AbstractInstruction * NoDbgRegParms relocateCallBeforeReturnPCby(Abstract static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta); static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); static sqInt NoDbgRegParms rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); -static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress); +static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr); static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms rewriteJumpFullAttarget(AbstractInstruction * self_in_rewriteJumpFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -1208,8 +1213,12 @@ static sqInt NoDbgRegParms v4LongForwardBranchDistance(BytecodeDescriptor *descr static sqInt NoDbgRegParms v4LongBranchIfNotInstanceOfDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj); static sqInt NoDbgRegParms v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj); extern void voidCogCompiledCode(void); +extern double getCogCodeZoneThreshold(void); +static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); +extern sqInt setCogCodeZoneThreshold(double ratio); static BlockStart * NoDbgRegParms addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span); static void NoDbgRegParms adjustArgumentsForPerform(sqInt numArgs); +static sqInt NoDbgRegParms allocateFloatRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask); static sqInt NoDbgRegParms allocateRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms anyReferencesToRegisterinTopNItems(sqInt reg, sqInt n); @@ -1242,6 +1251,7 @@ static BytecodeFixup * NoDbgRegParms ensureNonMergeFixupAt(sqInt targetPC); static void ensureReceiverResultRegContainsSelf(void); static void NoDbgRegParms evaluateat(BytecodeDescriptor *descriptor, sqInt pc); static sqInt NoDbgRegParms eventualTargetOf(sqInt targetBytecodePC); +static sqInt NoDbgRegParms freeAnyFloatRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms freeAnyRegNotConflictingWith(sqInt regMask); static sqInt genBlockReturn(void); static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void) ; @@ -1263,294 +1273,14 @@ static sqInt NoDbgRegParms genJumpBackTo(sqInt targetBytecodePC); static sqInt NoDbgRegParms genJumpIfto(sqInt boolean, sqInt targetBytecodePC); static sqInt NoDbgRegParms genJumpTo(sqInt targetBytecodePC); static void NoDbgRegParms genLoadTempin(sqInt objectIndex, sqInt destReg); -static sqInt genLowcodeAdd32(void); -static sqInt genLowcodeAdd64(void); -static sqInt genLowcodeAlloca32(void); -static sqInt genLowcodeAlloca64(void); -static sqInt genLowcodeAnd32(void); -static sqInt genLowcodeAnd64(void); -static sqInt genLowcodeArithmeticRightShift32(void); -static sqInt genLowcodeArithmeticRightShift64(void); -static sqInt genLowcodeBeginCall(void); static sqInt NoDbgRegParms genLowcodeBinaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeBoolean32ToOop(void); -static sqInt genLowcodeBoolean64ToOop(void); -static sqInt genLowcodeByteSizeOf(void); -static sqInt genLowcodeCallArgumentFloat32(void); -static sqInt genLowcodeCallArgumentFloat64(void); -static sqInt genLowcodeCallArgumentInt32(void); -static sqInt genLowcodeCallArgumentInt64(void); -static sqInt genLowcodeCallArgumentPointer(void); -static sqInt genLowcodeCallArgumentSpace(void); -static sqInt genLowcodeCallArgumentStructure(void); -static sqInt genLowcodeCallInstruction(void); -static sqInt genLowcodeCallPhysical(void); -static sqInt genLowcodeCheckSessionIdentifier(void); -static sqInt genLowcodeCompareAndSwap32(void); -static sqInt genLowcodeDiv32(void); -static sqInt genLowcodeDiv64(void); -static sqInt genLowcodeDuplicateFloat32(void); -static sqInt genLowcodeDuplicateFloat64(void); -static sqInt genLowcodeDuplicateInt32(void); -static sqInt genLowcodeDuplicateInt64(void); -static sqInt genLowcodeDuplicatePointer(void); -static sqInt genLowcodeEffectiveAddress32(void); -static sqInt genLowcodeEffectiveAddress64(void); -static sqInt genLowcodeEndCall(void); -static sqInt genLowcodeEndCallNoCleanup(void); -static sqInt genLowcodeFirstFieldPointer(void); -static sqInt genLowcodeFirstIndexableFieldPointer(void); -static sqInt genLowcodeFloat32Add(void); -static sqInt genLowcodeFloat32Div(void); -static sqInt genLowcodeFloat32Equal(void); -static sqInt genLowcodeFloat32Great(void); -static sqInt genLowcodeFloat32GreatEqual(void); -static sqInt genLowcodeFloat32Less(void); -static sqInt genLowcodeFloat32LessEqual(void); -static sqInt genLowcodeFloat32Mul(void); -static sqInt genLowcodeFloat32Neg(void); -static sqInt genLowcodeFloat32NotEqual(void); -static sqInt genLowcodeFloat32Sqrt(void); -static sqInt genLowcodeFloat32Sub(void); -static sqInt genLowcodeFloat32ToFloat64(void); -static sqInt genLowcodeFloat32ToInt32(void); -static sqInt genLowcodeFloat32ToInt64(void); -static sqInt genLowcodeFloat32ToOop(void); -static sqInt genLowcodeFloat32ToUInt32(void); -static sqInt genLowcodeFloat32ToUInt64(void); -static sqInt genLowcodeFloat64Add(void); -static sqInt genLowcodeFloat64Div(void); -static sqInt genLowcodeFloat64Equal(void); -static sqInt genLowcodeFloat64Great(void); -static sqInt genLowcodeFloat64GreatEqual(void); -static sqInt genLowcodeFloat64Less(void); -static sqInt genLowcodeFloat64LessEqual(void); -static sqInt genLowcodeFloat64Mul(void); -static sqInt genLowcodeFloat64Neg(void); -static sqInt genLowcodeFloat64NotEqual(void); -static sqInt genLowcodeFloat64Sqrt(void); -static sqInt genLowcodeFloat64Sub(void); -static sqInt genLowcodeFloat64ToFloat32(void); -static sqInt genLowcodeFloat64ToInt32(void); -static sqInt genLowcodeFloat64ToInt64(void); -static sqInt genLowcodeFloat64ToOop(void); -static sqInt genLowcodeFloat64ToUInt32(void); -static sqInt genLowcodeFloat64ToUInt64(void); -static sqInt genLowcodeFree(void); -static sqInt genLowcodeInstantiateIndexable32Oop(void); -static sqInt genLowcodeInstantiateIndexableOop(void); -static sqInt genLowcodeInstantiateOop(void); -static sqInt genLowcodeInt32Equal(void); -static sqInt genLowcodeInt32Great(void); -static sqInt genLowcodeInt32GreatEqual(void); -static sqInt genLowcodeInt32Less(void); -static sqInt genLowcodeInt32LessEqual(void); -static sqInt genLowcodeInt32NotEqual(void); -static sqInt genLowcodeInt32ToFloat32(void); -static sqInt genLowcodeInt32ToFloat64(void); -static sqInt genLowcodeInt32ToOop(void); -static sqInt genLowcodeInt32ToPointer(void); -static sqInt genLowcodeInt64Equal(void); -static sqInt genLowcodeInt64Great(void); -static sqInt genLowcodeInt64GreatEqual(void); -static sqInt genLowcodeInt64Less(void); -static sqInt genLowcodeInt64LessEqual(void); -static sqInt genLowcodeInt64NotEqual(void); -static sqInt genLowcodeInt64ToFloat32(void); -static sqInt genLowcodeInt64ToFloat64(void); -static sqInt genLowcodeInt64ToOop(void); -static sqInt genLowcodeInt64ToPointer(void); -static sqInt genLowcodeIsBytes(void); -static sqInt genLowcodeIsFloatObject(void); -static sqInt genLowcodeIsIndexable(void); -static sqInt genLowcodeIsIntegerObject(void); -static sqInt genLowcodeIsPointers(void); -static sqInt genLowcodeIsWords(void); -static sqInt genLowcodeIsWordsOrBytes(void); -static sqInt genLowcodeLeftShift32(void); -static sqInt genLowcodeLeftShift64(void); -static sqInt genLowcodeLoadArgumentAddress(void); -static sqInt genLowcodeLoadArgumentFloat32(void); -static sqInt genLowcodeLoadArgumentFloat64(void); -static sqInt genLowcodeLoadArgumentInt16(void); -static sqInt genLowcodeLoadArgumentInt32(void); -static sqInt genLowcodeLoadArgumentInt64(void); -static sqInt genLowcodeLoadArgumentInt8(void); -static sqInt genLowcodeLoadArgumentPointer(void); -static sqInt genLowcodeLoadArgumentUInt16(void); -static sqInt genLowcodeLoadArgumentUInt32(void); -static sqInt genLowcodeLoadArgumentUInt64(void); -static sqInt genLowcodeLoadArgumentUInt8(void); -static sqInt genLowcodeLoadFloat32FromMemory(void); -static sqInt genLowcodeLoadFloat64FromMemory(void); -static sqInt genLowcodeLoadInt16FromMemory(void); -static sqInt genLowcodeLoadInt32FromMemory(void); -static sqInt genLowcodeLoadInt64FromMemory(void); -static sqInt genLowcodeLoadInt8FromMemory(void); -static sqInt genLowcodeLoadLocalAddress(void); -static sqInt genLowcodeLoadLocalFloat32(void); -static sqInt genLowcodeLoadLocalFloat64(void); -static sqInt genLowcodeLoadLocalInt16(void); -static sqInt genLowcodeLoadLocalInt32(void); -static sqInt genLowcodeLoadLocalInt64(void); -static sqInt genLowcodeLoadLocalInt8(void); -static sqInt genLowcodeLoadLocalPointer(void); -static sqInt genLowcodeLoadLocalUInt16(void); -static sqInt genLowcodeLoadLocalUInt32(void); -static sqInt genLowcodeLoadLocalUInt64(void); -static sqInt genLowcodeLoadLocalUInt8(void); -static sqInt genLowcodeLoadObjectAt(void); -static sqInt genLowcodeLoadObjectField(void); -static sqInt genLowcodeLoadPointerFromMemory(void); -static sqInt genLowcodeLoadUInt16FromMemory(void); -static sqInt genLowcodeLoadUInt32FromMemory(void); -static sqInt genLowcodeLoadUInt64FromMemory(void); -static sqInt genLowcodeLoadUInt8FromMemory(void); -static sqInt genLowcodeLocalFrameSize(void); -static sqInt genLowcodeLockRegisters(void); -static sqInt genLowcodeLockVM(void); -static sqInt genLowcodeMalloc32(void); -static sqInt genLowcodeMalloc64(void); -static sqInt genLowcodeMemcpy32(void); -static sqInt genLowcodeMemcpy64(void); -static sqInt genLowcodeMemcpyFixed(void); -static sqInt genLowcodeMoveFloat32ToPhysical(void); -static sqInt genLowcodeMoveFloat64ToPhysical(void); -static sqInt genLowcodeMoveInt32ToPhysical(void); -static sqInt genLowcodeMoveInt64ToPhysical(void); -static sqInt genLowcodeMovePointerToPhysical(void); -static sqInt genLowcodeMul32(void); -static sqInt genLowcodeMul64(void); -static sqInt genLowcodeNeg32(void); -static sqInt genLowcodeNeg64(void); -static sqInt genLowcodeNot32(void); -static sqInt genLowcodeNot64(void); static sqInt NoDbgRegParms genLowcodeNullaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeOopEqual(void); -static sqInt genLowcodeOopNotEqual(void); -static sqInt genLowcodeOopSmallIntegerToInt32(void); -static sqInt genLowcodeOopSmallIntegerToInt64(void); -static sqInt genLowcodeOopToBoolean32(void); -static sqInt genLowcodeOopToBoolean64(void); -static sqInt genLowcodeOopToFloat32(void); -static sqInt genLowcodeOopToFloat64(void); -static sqInt genLowcodeOopToInt32(void); -static sqInt genLowcodeOopToInt64(void); -static sqInt genLowcodeOopToPointer(void); -static sqInt genLowcodeOopToPointerReinterpret(void); -static sqInt genLowcodeOopToUInt32(void); -static sqInt genLowcodeOopToUInt64(void); -static sqInt genLowcodeOr32(void); -static sqInt genLowcodeOr64(void); -static sqInt genLowcodePerformCallout(void); -static sqInt genLowcodePerformCalloutIndirect(void); -static sqInt genLowcodePin(void); -static sqInt genLowcodePlaftormCode(void); -static sqInt genLowcodePointerAddConstantOffset(void); -static sqInt genLowcodePointerAddOffset32(void); -static sqInt genLowcodePointerAddOffset64(void); -static sqInt genLowcodePointerEqual(void); -static sqInt genLowcodePointerNotEqual(void); -static sqInt genLowcodePointerToInt32(void); -static sqInt genLowcodePointerToInt64(void); -static sqInt genLowcodePointerToOop(void); -static sqInt genLowcodePointerToOopReinterprer(void); -static sqInt genLowcodePopFloat32(void); -static sqInt genLowcodePopFloat64(void); -static sqInt genLowcodePopInt32(void); -static sqInt genLowcodePopInt64(void); -static sqInt genLowcodePopMultipleNative(void); -static sqInt genLowcodePopPointer(void); -static sqInt genLowcodePushCalloutResultFloat32(void); -static sqInt genLowcodePushCalloutResultFloat64(void); -static sqInt genLowcodePushCalloutResultInt32(void); -static sqInt genLowcodePushCalloutResultInt64(void); -static sqInt genLowcodePushCalloutResultPointer(void); -static sqInt genLowcodePushConstantUInt32(void); -static sqInt genLowcodePushConstantUInt64(void); -static sqInt genLowcodePushNullPointer(void); -static sqInt genLowcodePushOne32(void); -static sqInt genLowcodePushOne64(void); -static sqInt genLowcodePushOneFloat32(void); -static sqInt genLowcodePushOneFloat64(void); -static sqInt genLowcodePushPhysicalFloat32(void); -static sqInt genLowcodePushPhysicalFloat64(void); -static sqInt genLowcodePushPhysicalInt32(void); -static sqInt genLowcodePushPhysicalInt64(void); -static sqInt genLowcodePushPhysicalPointer(void); -static sqInt genLowcodePushSessionIdentifier(void); -static sqInt genLowcodePushZero32(void); -static sqInt genLowcodePushZero64(void); -static sqInt genLowcodePushZeroFloat32(void); -static sqInt genLowcodePushZeroFloat64(void); -static sqInt genLowcodeRem32(void); -static sqInt genLowcodeRem64(void); -static sqInt genLowcodeRightShift32(void); -static sqInt genLowcodeRightShift64(void); -static sqInt genLowcodeSignExtend32From16(void); -static sqInt genLowcodeSignExtend32From8(void); -static sqInt genLowcodeSignExtend64From16(void); -static sqInt genLowcodeSignExtend64From32(void); -static sqInt genLowcodeSignExtend64From8(void); -static sqInt genLowcodeSmallInt32ToOop(void); -static sqInt genLowcodeStoreFloat32ToMemory(void); -static sqInt genLowcodeStoreFloat64ToMemory(void); -static sqInt genLowcodeStoreInt16ToMemory(void); -static sqInt genLowcodeStoreInt32ToMemory(void); -static sqInt genLowcodeStoreInt64ToMemory(void); -static sqInt genLowcodeStoreInt8ToMemory(void); -static sqInt genLowcodeStoreLocalFloat32(void); -static sqInt genLowcodeStoreLocalFloat64(void); -static sqInt genLowcodeStoreLocalInt16(void); -static sqInt genLowcodeStoreLocalInt32(void); -static sqInt genLowcodeStoreLocalInt64(void); -static sqInt genLowcodeStoreLocalInt8(void); -static sqInt genLowcodeStoreLocalPointer(void); -static sqInt genLowcodeStoreObjectField(void); -static sqInt genLowcodeStoreObjectFieldAt(void); -static sqInt genLowcodeStorePointerToMemory(void); -static sqInt genLowcodeSub32(void); -static sqInt genLowcodeSub64(void); static sqInt NoDbgRegParms genLowcodeTrinaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeTruncate32To16(void); -static sqInt genLowcodeTruncate32To8(void); -static sqInt genLowcodeTruncate64To16(void); -static sqInt genLowcodeTruncate64To32(void); -static sqInt genLowcodeTruncate64To8(void); -static sqInt genLowcodeUdiv32(void); -static sqInt genLowcodeUdiv64(void); -static sqInt genLowcodeUint32Great(void); -static sqInt genLowcodeUint32GreatEqual(void); -static sqInt genLowcodeUint32Less(void); -static sqInt genLowcodeUint32LessEqual(void); -static sqInt genLowcodeUint32ToFloat32(void); -static sqInt genLowcodeUint32ToFloat64(void); -static sqInt genLowcodeUint32ToOop(void); -static sqInt genLowcodeUint64Great(void); -static sqInt genLowcodeUint64GreatEqual(void); -static sqInt genLowcodeUint64Less(void); -static sqInt genLowcodeUint64LessEqual(void); -static sqInt genLowcodeUint64ToFloat32(void); -static sqInt genLowcodeUint64ToFloat64(void); -static sqInt genLowcodeUint64ToOop(void); -static sqInt genLowcodeUmul32(void); -static sqInt genLowcodeUmul64(void); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive2(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive3(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive4(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive5(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeUnlockVM(void); -static sqInt genLowcodeUnpin(void); -static sqInt genLowcodeUrem32(void); -static sqInt genLowcodeUrem64(void); -static sqInt genLowcodeXor32(void); -static sqInt genLowcodeXor64(void); -static sqInt genLowcodeZeroExtend32From16(void); -static sqInt genLowcodeZeroExtend32From8(void); -static sqInt genLowcodeZeroExtend64From16(void); -static sqInt genLowcodeZeroExtend64From32(void); -static sqInt genLowcodeZeroExtend64From8(void); static sqInt NoDbgRegParms genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable); static sqInt NoDbgRegParms genMethodAbortTrampolineFor(sqInt numArgs); static sqInt NoDbgRegParms genPICAbortTrampolineFor(sqInt numArgs); @@ -1592,7 +1322,7 @@ static sqInt NoDbgRegParms genStorePopRemoteInstVarofObjectAtneedsStoreCheckneed static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1625,8 +1355,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void ssFlushAll(void); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1634,6 +1362,7 @@ static void NoDbgRegParms ssNativeFlushTo(sqInt index); static void NoDbgRegParms ssNativePop(sqInt n); static void NoDbgRegParms ssNativePush(sqInt n); static CogSimStackNativeEntry * ssNativeTop(void); +static CogSimStackNativeEntry * NoDbgRegParms ssNativeValue(sqInt n); static void NoDbgRegParms ssPopNativeSize(sqInt popSize); static void NoDbgRegParms ssPop(sqInt n); static sqInt NoDbgRegParms ssPushAnnotatedConstant(sqInt literal); @@ -1663,6 +1392,7 @@ static void voidReceiverResultRegContainsSelf(void); /*** Variables ***/ static AbstractInstruction * abstractOpcodes; +static usqInt allocationThreshold; static AbstractInstruction aMethodLabel; static AbstractInstruction * const backEnd = &aMethodLabel; static usqInt baseAddress; @@ -1670,7 +1400,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt breakBlock; static sqInt breakMethod; @@ -1709,6 +1438,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1751,6 +1481,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt cPICCaseSize; static sqInt cPICEndOfCodeOffset; @@ -2360,6 +2091,7 @@ static AbstractInstruction * stackCheckLabel; static AbstractInstruction * stackOverflowCall; static sqInt superSendTrampolines[NumSendTrampolines]; static sqInt tempOop; +static double thresholdRatio = 0.5; int traceFlags = 8 /* prim trace log on by default */; sqInt traceStores; static char *trampolineAddresses[NumTrampolines*2]; @@ -2397,6 +2129,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -2742,9 +2475,9 @@ computeSizeOfArithCwR(AbstractInstruction * self_in_computeSizeOfArithCwR) static usqInt NoDbgRegParms concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64opcode) { - usqIntptr_t reg; + usqInt reg; sqInt reverse; - usqIntptr_t value; + usqInt value; value = ((self_in_concretizeArithCwR->operands))[0]; reg = ((self_in_concretizeArithCwR->operands))[1]; @@ -2780,9 +2513,9 @@ concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64op static usqInt NoDbgRegParms concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { - usqIntptr_t offset; - usqIntptr_t reg; - usqIntptr_t value; + sqInt offset; + usqInt reg; + usqInt value; value = ((self_in_concretizeMoveCwR->operands))[0]; reg = ((self_in_concretizeMoveCwR->operands))[1]; @@ -2899,9 +2632,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - usqIntptr_t alignment; - usqIntptr_t maximumSpan; - usqIntptr_t target; + usqInt alignment; + sqInt maximumSpan; + usqInt target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -3278,7 +3011,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -4443,7 +4176,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -4501,7 +4234,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -4568,7 +4301,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -5723,7 +5456,7 @@ static sqInt NoDbgRegParms configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs, sqInt addrDelta) { sqInt caseEndAddress; - sqInt jumpTargetAddress; + sqInt jumpTargetAddr; sqInt operand; sqInt pc; usqIntptr_t targetEntry; @@ -5762,8 +5495,8 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod && (((byteAt(pc - 7)) | (modRMRO(((AbstractInstruction *) backEnd), 0, 0, 7))) == (modRMRO(((AbstractInstruction *) backEnd), ModRegInd, 5, 7))))); ((AbstractInstruction *) backEnd); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress = cPICMissTrampolineFor(numArgs); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddress); + jumpTargetAddr = cPICMissTrampolineFor(numArgs); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddr); return 0; } @@ -5781,8 +5514,8 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod static sqInt NoDbgRegParms configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, sqInt numArgs, sqInt addrDelta) { - sqInt jumpTargetAddress; - sqInt jumpTargetAddress1; + sqInt jumpTargetAddr; + sqInt jumpTargetAddr1; sqInt operand; sqInt pc; sqInt target; @@ -5795,12 +5528,12 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, ? 0 : methodOperand); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress = (((sqInt)cPIC)) + (sizeof(CogMethod)); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + firstCPICCaseOffset, jumpTargetAddress); + jumpTargetAddr = (((sqInt)cPIC)) + (sizeof(CogMethod)); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + firstCPICCaseOffset, jumpTargetAddr); storeLiteralbeforeFollowingAddress(backEnd, operand, ((((sqInt)cPIC)) + firstCPICCaseOffset) - 5); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress1 = cPICMissTrampolineFor(numArgs); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddress1); + jumpTargetAddr1 = cPICMissTrampolineFor(numArgs); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddr1); /* begin relocateMethodReferenceBeforeAddress:by: */ pc = ((((sqInt)cPIC)) + cPICEndOfCodeOffset) - 5; assert((((byteAt(pc - 6)) == 141) @@ -6040,7 +5773,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -6126,11 +5859,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { usqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -6326,7 +6059,7 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) /* Cogit>>#findMapLocationForMcpc:inMethod: */ static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -6862,7 +6595,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -6878,7 +6611,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, 3133021973U + h, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -6924,7 +6657,7 @@ generateCogFullBlock(void) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -6973,7 +6706,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -7019,17 +6752,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; + usqInt location; sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -8234,7 +7967,7 @@ gMoveCwR(sqInt wordConstant, sqInt reg) /* 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; @@ -9186,7 +8919,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -10172,7 +9905,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -10997,14 +10730,14 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; sqInt roundedBytes; roundedBytes = (numBytes + 7) & -8; - if ((mzFreeStart + roundedBytes) >= (limitAddress - (methodCount * BytesPerWord))) { + if ((mzFreeStart + roundedBytes) >= ((((limitAddress - (methodCount * BytesPerWord)) < allocationThreshold) ? (limitAddress - (methodCount * BytesPerWord)) : allocationThreshold))) { return 0; } allocation = mzFreeStart; @@ -11187,15 +10920,15 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; - zoneSize = limitAddress - baseAddress; - initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; + zoneSize = ((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - baseAddress; + initialFreeSpace = (((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - mzFreeStart) + methodBytesFreedSinceLastCompaction; freedSoFar = initialFreeSpace; /* 4 needs to be e.g. a start-up parameter */ @@ -11246,17 +10979,6 @@ kosherYoungReferrers(void) return 1; } - /* CogMethodZone>>#manageFrom:to: */ -static void NoDbgRegParms -manageFromto(sqInt theStartAddress, sqInt theLimitAddress) -{ - mzFreeStart = (baseAddress = theStartAddress); - youngReferrers = (limitAddress = theLimitAddress); - openPICList = null; - methodBytesFreedSinceLastCompaction = 0; - methodCount = 0; -} - /* CogMethodZone>>#methodFor: */ CogMethod * methodFor(void *address) @@ -14436,6 +14158,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *jumpImm; @@ -14479,7 +14202,17 @@ genPrimitiveIdentityHash(void) genoperand(RetN, 0); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } /* CogObjectRepresentationFor64BitSpur>>#genPrimitiveImmediateAsInteger */ @@ -16028,7 +15761,9 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ - ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(1, "newHashTrampoline", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 1); + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); + ceInlineNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceInlineNewHash", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { @@ -18518,6 +18253,16 @@ nativeFloatRegisterMask(CogSimStackNativeEntry * self_in_nativeFloatRegisterMask : 0); } + /* CogSimStackNativeEntry>>#nativeFloatRegisterOrNone */ +static sqInt NoDbgRegParms +nativeFloatRegisterOrNone(CogSimStackNativeEntry * self_in_nativeFloatRegisterOrNone) +{ + return ((((self_in_nativeFloatRegisterOrNone->type)) == SSRegisterSingleFloat) + || (((self_in_nativeFloatRegisterOrNone->type)) == SSRegisterDoubleFloat) + ? (self_in_nativeFloatRegisterOrNone->registerr) + : NoReg); +} + /* CogSimStackNativeEntry>>#nativePopToReg: */ static CogSimStackNativeEntry * NoDbgRegParms nativePopToReg(CogSimStackNativeEntry * self_in_nativePopToReg, sqInt reg) @@ -18741,6 +18486,25 @@ nativeRegisterMask(CogSimStackNativeEntry * self_in_nativeRegisterMask) : 0)); } + /* CogSimStackNativeEntry>>#nativeRegisterOrNone */ +static sqInt NoDbgRegParms +nativeRegisterOrNone(CogSimStackNativeEntry * self_in_nativeRegisterOrNone) +{ + return ((((self_in_nativeRegisterOrNone->type)) == SSRegister) + || (((self_in_nativeRegisterOrNone->type)) == SSRegisterPair) + ? (self_in_nativeRegisterOrNone->registerr) + : NoReg); +} + + /* CogSimStackNativeEntry>>#nativeRegisterSecondOrNone */ +static sqInt NoDbgRegParms +nativeRegisterSecondOrNone(CogSimStackNativeEntry * self_in_nativeRegisterSecondOrNone) +{ + return (((self_in_nativeRegisterSecondOrNone->type)) == SSRegisterPair + ? (self_in_nativeRegisterSecondOrNone->registerSecond) + : NoReg); +} + /* CogSimStackNativeEntry>>#nativeStackPopToReg: */ static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToReg(CogSimStackNativeEntry * self_in_nativeStackPopToReg, sqInt reg) @@ -19435,7 +19199,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - usqIntptr_t shiftCountReg; + usqInt shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == RCX @@ -19462,8 +19226,8 @@ computeSizeOfPushCw(AbstractInstruction * self_in_computeSizeOfPushCw) static usqInt NoDbgRegParms concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithCqRWithROraxOpcode, sqInt regOpcode, sqInt raxOpcode) { - usqIntptr_t reg; - usqIntptr_t value; + usqInt reg; + usqInt value; value = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[0]; reg = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[1]; @@ -19514,10 +19278,10 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) { - usqIntptr_t base; - usqIntptr_t index; + usqInt base; + usqInt index; sqInt offset; - usqIntptr_t src; + usqInt src; src = ((self_in_concretizeMoveRX32rR->operands))[0]; index = ((self_in_concretizeMoveRX32rR->operands))[1]; @@ -19551,9 +19315,9 @@ concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) static usqInt NoDbgRegParms concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) { - usqIntptr_t base; - usqIntptr_t dest; - usqIntptr_t index; + usqInt base; + usqInt dest; + usqInt index; sqInt offset; index = ((self_in_concretizeMoveX32rRR->operands))[0]; @@ -19588,8 +19352,8 @@ concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -19608,8 +19372,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - usqIntptr_t offset; - usqIntptr_t operand; + sqInt offset; + usqInt operand; operand = ((self_in_concretizePrefetchAw->operands))[0]; if (!((operand != null) @@ -19636,8 +19400,8 @@ concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x64opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -19651,8 +19415,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) { - usqIntptr_t r1; - usqIntptr_t r2; + usqInt r1; + usqInt r2; r1 = ((self_in_concretizeXCHGRR->operands))[0]; r2 = ((self_in_concretizeXCHGRR->operands))[1]; @@ -19681,64 +19445,64 @@ concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt addressOperand2; + usqInt addressOperand3; + usqInt addressOperand4; + usqInt addressOperand5; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; + usqInt baseReg; + usqInt baseReg1; AbstractInstruction *dependentChain; - 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 destReg16; - usqIntptr_t destReg17; - usqIntptr_t destReg18; - usqIntptr_t destReg19; - usqIntptr_t destReg2; - usqIntptr_t destReg20; - usqIntptr_t destReg21; - usqIntptr_t destReg22; - usqIntptr_t destReg23; - usqIntptr_t destReg24; - usqIntptr_t destReg25; - usqIntptr_t destReg26; - usqIntptr_t destReg27; - usqIntptr_t destReg28; - usqIntptr_t destReg29; - usqIntptr_t destReg3; - usqIntptr_t destReg30; - usqIntptr_t destReg31; - usqIntptr_t destReg32; - 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; + usqInt dest; + usqInt dest1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg13; + usqInt destReg14; + usqInt destReg15; + usqInt destReg16; + usqInt destReg17; + usqInt destReg18; + usqInt destReg19; + usqInt destReg2; + usqInt destReg20; + usqInt destReg21; + usqInt destReg22; + usqInt destReg23; + usqInt destReg24; + usqInt destReg25; + usqInt destReg26; + usqInt destReg27; + usqInt destReg28; + usqInt destReg29; + usqInt destReg3; + usqInt destReg30; + usqInt destReg31; + usqInt destReg32; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; + usqInt distance; + usqInt distance1; + usqInt distance2; + usqInt distance3; + usqInt distance4; sqInt i; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -19807,8 +19571,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget9; sqInt offset; sqInt offset1; - usqIntptr_t offset10; - usqIntptr_t offset11; + usqInt offset10; + usqInt offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -19819,28 +19583,28 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - usqIntptr_t offset12; + usqInt offset12; sqInt offset120; sqInt offset121; sqInt offset122; sqInt offset123; sqInt offset124; sqInt offset125; - usqIntptr_t offset126; - usqIntptr_t offset127; - usqIntptr_t offset128; - usqIntptr_t offset129; - usqIntptr_t offset13; - usqIntptr_t offset14; - usqIntptr_t offset15; + usqInt offset126; + usqInt offset127; + usqInt offset128; + usqInt offset129; + usqInt offset13; + usqInt offset14; + usqInt offset15; sqInt offset16; - usqIntptr_t offset17; - usqIntptr_t offset18; - usqIntptr_t offset19; + usqInt offset17; + usqInt offset18; + usqInt offset19; sqInt offset2; - usqIntptr_t offset20; - usqIntptr_t offset21; - usqIntptr_t offset22; + usqInt offset20; + sqInt offset21; + sqInt offset22; sqInt offset23; sqInt offset24; sqInt offset25; @@ -19848,7 +19612,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - usqIntptr_t offset3; + usqInt offset3; sqInt offset30; sqInt offset31; sqInt offset32; @@ -19859,74 +19623,74 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset37; sqInt offset38; sqInt offset39; - usqIntptr_t offset4; + usqInt offset4; sqInt offset40; sqInt offset41; sqInt offset42; - usqIntptr_t offset5; + sqInt offset5; sqInt offset6; sqInt offset7; - usqIntptr_t offset8; - usqIntptr_t offset9; - 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 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 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 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; - usqIntptr_t save0; - usqIntptr_t save01; - usqIntptr_t save1; - usqIntptr_t save11; - usqIntptr_t save12; - usqIntptr_t save13; - usqIntptr_t shiftCountReg; - usqIntptr_t shiftCountReg1; + usqInt offset8; + usqInt offset9; + usqInt operand; + usqInt operand1; + usqInt reg; + usqInt reg1; + usqInt reg10; + usqInt reg11; + usqInt reg12; + usqInt reg13; + usqInt reg14; + usqInt reg15; + usqInt reg16; + usqInt reg17; + usqInt reg18; + usqInt reg19; + usqInt reg2; + usqInt reg20; + usqInt reg21; + usqInt reg22; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt reg8; + usqInt reg9; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS10; + usqInt regLHS11; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regLHS5; + usqInt regLHS6; + usqInt regLHS7; + usqInt regLHS8; + usqInt regLHS9; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS10; + usqInt regRHS11; + usqInt regRHS2; + usqInt regRHS3; + usqInt regRHS4; + usqInt regRHS5; + usqInt regRHS6; + usqInt regRHS7; + usqInt regRHS8; + usqInt regRHS9; + usqInt regToShift; + usqInt regToShift1; + usqInt save0; + usqInt save01; + usqInt save1; + usqInt save11; + usqInt save12; + usqInt save13; + usqInt shiftCountReg; + usqInt shiftCountReg1; sqInt skip; sqInt skip1; sqInt skip10; @@ -19956,49 +19720,49 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt skip7; sqInt skip8; sqInt skip9; - 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 srcReg16; - usqIntptr_t srcReg17; - usqIntptr_t srcReg18; - usqIntptr_t srcReg19; - usqIntptr_t srcReg2; - usqIntptr_t srcReg20; - usqIntptr_t srcReg21; - usqIntptr_t srcReg22; - usqIntptr_t srcReg23; - usqIntptr_t srcReg24; - usqIntptr_t srcReg25; - usqIntptr_t srcReg26; - usqIntptr_t srcReg27; - usqIntptr_t srcReg28; - usqIntptr_t srcReg29; - usqIntptr_t srcReg3; - usqIntptr_t srcReg30; - usqIntptr_t srcReg31; - usqIntptr_t srcReg32; - 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 value11; - usqIntptr_t value2; - usqIntptr_t value3; - usqIntptr_t value4; - usqIntptr_t value5; - usqIntptr_t value6; + usqInt src; + usqInt src1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg20; + usqInt srcReg21; + usqInt srcReg22; + usqInt srcReg23; + usqInt srcReg24; + usqInt srcReg25; + usqInt srcReg26; + usqInt srcReg27; + usqInt srcReg28; + usqInt srcReg29; + usqInt srcReg3; + usqInt srcReg30; + usqInt srcReg31; + usqInt srcReg32; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; + usqInt value; + usqInt value1; + usqInt value11; + usqInt value2; + usqInt value3; + usqInt value4; + usqInt value5; + usqInt value6; usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { @@ -23087,9 +22851,9 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - usqIntptr_t reg1; - usqIntptr_t reg2; - usqIntptr_t regDivisor; + usqInt reg1; + usqInt reg2; + usqInt regDivisor; switch ((self_in_dispatchConcretizeProcessorSpecific->opcode)) { @@ -24217,15 +23981,15 @@ rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, s /* prevent type inference for avoiding warning on abs */ /* CogX64Compiler>>#rewriteCPICJumpAt:target: */ -static sqInt NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +static AbstractInstruction * NoDbgRegParms +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { sqInt callDistance; - callDistance = jumpTargetAddress - addressFollowingJump; + callDistance = jumpTargetAddr - addressFollowingJump; assert((SQABS(callDistance)) < 128); byteAtput(addressFollowingJump - 1, callDistance & 0xFF); - return 2; + return self_in_rewriteCPICJumpAttarget; } @@ -26403,7 +26167,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -26672,7 +26436,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -26701,7 +26465,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 3) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 3) | 1)); introspectionDataIndex += 2; } return 0; @@ -27292,7 +27056,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -27587,6 +27351,41 @@ voidCogCompiledCode(void) } } + /* SistaMethodZone>>#getCogCodeZoneThreshold */ +double +getCogCodeZoneThreshold(void) +{ + return thresholdRatio; +} + + /* SistaMethodZone>>#manageFrom:to: */ +static void NoDbgRegParms +manageFromto(sqInt theStartAddress, sqInt theLimitAddress) +{ + mzFreeStart = (baseAddress = theStartAddress); + youngReferrers = (limitAddress = theLimitAddress); + openPICList = null; + methodBytesFreedSinceLastCompaction = 0; + methodCount = 0; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; +} + + /* SistaMethodZone>>#setCogCodeZoneThreshold: */ +sqInt +setCogCodeZoneThreshold(double ratio) +{ + /* send of break elided */; + if (!((ratio >= 0.1) + && (ratio <= 1.0))) { + return PrimErrBadArgument; + } + thresholdRatio = ratio; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; + return 0; +} + /* Add a blockStart for an embedded block. For a binary tree walk block dispatch blocks must be compiled in pc/depth-first order but are scanned @@ -27709,6 +27508,24 @@ adjustArgumentsForPerform(sqInt numArgs) } +/* if there's a free register, use it */ + + /* StackToRegisterMappingCogit>>#allocateFloatRegNotConflictingWith: */ +static sqInt NoDbgRegParms +allocateFloatRegNotConflictingWith(sqInt regMask) +{ + sqInt reg; + + reg = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | regMask); + if (reg == NoReg) { + + /* No free register, choose one that does not conflict with regMask */ + reg = freeAnyFloatRegNotConflictingWith(regMask); + } + return reg; +} + + /* If the stack entry is already in a register not conflicting with regMask, answers it, else allocate a new register not conflicting with reg mask @@ -27790,7 +27607,8 @@ beginHighLevelCall(sqInt alignment) sqInt mask; sqInt offset; - ssFlushAll(); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin MoveR:Aw: */ address1 = stackPointerAddress(); /* begin checkLiteral:forInstruction: */ @@ -27971,7 +27789,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -27990,8 +27808,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -28191,7 +28009,11 @@ compileCogFullBlockMethod(sqInt numCopied) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -28265,7 +28087,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -29058,6 +28884,39 @@ eventualTargetOf(sqInt targetBytecodePC) } +/* Spill the closest register on stack not conflicting with regMask. + Assertion Failure if regMask has already all the registers */ + + /* StackToRegisterMappingCogit>>#freeAnyFloatRegNotConflictingWith: */ +static sqInt NoDbgRegParms +freeAnyFloatRegNotConflictingWith(sqInt regMask) +{ + CogSimStackEntry *desc; + sqInt index; + sqInt reg; + + assert(needsFrame); + reg = NoReg; + index = ((simSpillBase < 0) ? 0 : simSpillBase); + index = ((simNativeSpillBase < 0) ? 0 : simNativeSpillBase); + while ((reg == NoReg) + && (index < simNativeStackPtr)) { + desc = simNativeStackAt(index); + if ((((desc->type)) == SSRegisterSingleFloat) + || (((desc->type)) == SSRegisterDoubleFloat)) { + if (!(regMask & (registerMaskFor((desc->registerr))))) { + reg = (desc->registerr); + } + } + index += 1; + } + + assert(!((reg == NoReg))); + ssAllocateRequiredFloatReg(reg); + return reg; +} + + /* Spill the closest register on stack not conflicting with regMask. Assertion Failure if regMask has already all the registers */ @@ -29721,7 +29580,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -29955,7 +29815,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -29996,7 +29857,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc = ssTop(); ssPop(1); if ((((desc->type)) == SSConstant) @@ -30067,7 +29929,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -30095,367 +29958,632 @@ genLoadTempin(sqInt objectIndex, sqInt destReg) } -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAdd32 */ -static sqInt -genLowcodeAdd32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAdd64 */ -static sqInt -genLowcodeAdd64(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, second, first); - ssPushNativeRegister(first); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAlloca32 */ -static sqInt -genLowcodeAlloca32(void) -{ - sqInt address; - sqInt address1; - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction *anInstruction2; - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (size == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - /* begin MoveAw:R: */ - address = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction = genoperandoperand(MoveAwR, address, TempReg); - /* begin SubR:R: */ - genoperandoperand(SubRR, size, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(AndCqR, -16, TempReg); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, size); - /* begin MoveR:Aw: */ - address1 = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction2 = genoperandoperand(MoveRAw, size, address1); - ssPushNativeRegister(size); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAlloca64 */ -static sqInt -genLowcodeAlloca64(void) -{ - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (size == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, size, SPReg); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, SPReg, size); - ssPushNativeRegister(size); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAnd32 */ -static sqInt -genLowcodeAnd32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AndR:R: */ - genoperandoperand(AndRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAnd64 */ -static sqInt -genLowcodeAnd64(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AndR:R: */ - genoperandoperand(AndRR, second, first); - ssPushNativeRegister(first); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeArithmeticRightShift32 */ -static sqInt -genLowcodeArithmeticRightShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ArithmeticShiftRightR:R: */ - genoperandoperand(ArithmeticShiftRightRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeArithmeticRightShift64 */ -static sqInt -genLowcodeArithmeticRightShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << shiftAmount)) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeBeginCall */ -static sqInt -genLowcodeBeginCall(void) -{ - sqInt alignment; - - alignment = extA; - beginHighLevelCall(alignment); - extA = 0; - return 0; -} - - /* Lowcode instruction generator dispatch */ /* StackToRegisterMappingCogit>>#genLowcodeBinaryInlinePrimitive: */ static sqInt NoDbgRegParms genLowcodeBinaryInlinePrimitive(sqInt prim) { + sqInt frResult; + sqInt frResult1; + sqInt object; + sqInt object1; + sqInt object10; + sqInt object11; + sqInt object12; + sqInt object13; + sqInt object14; + sqInt object15; + sqInt object16; + sqInt object17; + sqInt object18; + sqInt object19; + sqInt object2; + sqInt object20; + sqInt object21; + sqInt object22; + sqInt object23; + sqInt object3; + sqInt object4; + sqInt object5; + sqInt object6; + sqInt object7; + sqInt object8; + sqInt object9; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue10; + sqInt objectValue11; + sqInt objectValue12; + sqInt objectValue13; + sqInt objectValue14; + sqInt objectValue15; + sqInt objectValue16; + sqInt objectValue17; + sqInt objectValue18; + sqInt objectValue19; + sqInt objectValue2; + sqInt objectValue20; + sqInt objectValue21; + sqInt objectValue22; + sqInt objectValue23; + sqInt objectValue3; + sqInt objectValue4; + sqInt objectValue5; + sqInt objectValue6; + sqInt objectValue7; + sqInt objectValue8; + sqInt objectValue9; + sqInt pointer; + sqInt pointerValue; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop11; + sqInt rOopTop110; + sqInt rOopTop111; + sqInt rOopTop12; + sqInt rOopTop13; + sqInt rOopTop14; + sqInt rOopTop15; + sqInt rOopTop16; + sqInt rOopTop17; + sqInt rOopTop19; + sqInt rOopTop2; + sqInt rOopTop20; + sqInt rOopTop21; + sqInt rOopTop22; + sqInt rOopTop24; + sqInt rOopTop3; + sqInt rOopTop4; + sqInt rOopTop5; + sqInt rOopTop6; + sqInt rOopTop7; + sqInt rOopTop8; + sqInt rOopTop9; + sqInt rResult; + sqInt rResult1; + sqInt rResult11; + sqInt rResult12; + sqInt rResult13; + sqInt rResult15; + sqInt rResult16; + sqInt rResult2; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult8; + sqInt rResult9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value2; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue2; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + switch (prim) { case 0: - return genLowcodeByteSizeOf(); + /* begin genLowcodeByteSizeOf */ + rOopTop16 = NoReg; + rResult9 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop16 = registerOrNone(ssTop()); + } + if (rOopTop16 == NoReg) { + rOopTop16 = allocateRegNotConflictingWith(0); + } + rResult9 = allocateRegNotConflictingWith(1ULL << rOopTop16); + assert(!(((rOopTop16 == NoReg) + || (rResult9 == NoReg)))); + object15 = rOopTop16; + value8 = rResult9; + + popToReg(ssTop(), object15); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcByteSizeOfto(object15, value8); + return 0; case 1: - return genLowcodeFirstFieldPointer(); + /* begin genLowcodeFirstFieldPointer */ + rOopTop = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop == NoReg))); + object = rOopTop; + + popToReg(ssTop(), object); + ssPop(1); + genLcFirstFieldPointer(object); + return 0; case 2: - return genLowcodeFirstIndexableFieldPointer(); + /* begin genLowcodeFirstIndexableFieldPointer */ + rOopTop1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop1 == NoReg))); + object1 = rOopTop1; + + popToReg(ssTop(), object1); + ssPop(1); + genLcFirstIndexableFieldPointer(object1); + return 0; case 3: - return genLowcodeIsBytes(); + /* begin genLowcodeIsBytes */ + rOopTop2 = NoReg; + rResult = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1ULL << rOopTop2); + assert(!(((rOopTop2 == NoReg) + || (rResult == NoReg)))); + object2 = rOopTop2; + value = rResult; + + popToReg(ssTop(), object2); + ssPop(1); + genLcIsBytesto(object2, value); + return 0; case 4: - return genLowcodeIsFloatObject(); + /* begin genLowcodeIsFloatObject */ + rOopTop3 = NoReg; + rResult1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1ULL << rOopTop3); + assert(!(((rOopTop3 == NoReg) + || (rResult1 == NoReg)))); + object3 = rOopTop3; + value1 = rResult1; + + popToReg(ssTop(), object3); + ssPop(1); + genLcIsFloatObjectto(object3, value1); + return 0; case 5: - return genLowcodeIsIndexable(); + /* begin genLowcodeIsIndexable */ + rOopTop4 = NoReg; + rResult2 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop4 = registerOrNone(ssTop()); + } + if (rOopTop4 == NoReg) { + rOopTop4 = allocateRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(1ULL << rOopTop4); + assert(!(((rOopTop4 == NoReg) + || (rResult2 == NoReg)))); + object4 = rOopTop4; + value2 = rResult2; + + popToReg(ssTop(), object4); + ssPop(1); + genLcIsIndexableto(object4, value2); + return 0; case 6: - return genLowcodeIsIntegerObject(); + /* begin genLowcodeIsIntegerObject */ + rOopTop5 = NoReg; + rResult3 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop5 = registerOrNone(ssTop()); + } + if (rOopTop5 == NoReg) { + rOopTop5 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1ULL << rOopTop5); + assert(!(((rOopTop5 == NoReg) + || (rResult3 == NoReg)))); + object5 = rOopTop5; + value3 = rResult3; + + popToReg(ssTop(), object5); + ssPop(1); + genLcIsIntegerObjectto(object5, value3); + return 0; case 7: - return genLowcodeIsPointers(); + /* begin genLowcodeIsPointers */ + rOopTop6 = NoReg; + rResult4 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop6 = registerOrNone(ssTop()); + } + if (rOopTop6 == NoReg) { + rOopTop6 = allocateRegNotConflictingWith(0); + } + rResult4 = allocateRegNotConflictingWith(1ULL << rOopTop6); + assert(!(((rOopTop6 == NoReg) + || (rResult4 == NoReg)))); + object6 = rOopTop6; + value4 = rResult4; + + popToReg(ssTop(), object6); + ssPop(1); + genLcIsPointersto(object6, value4); + return 0; case 8: - return genLowcodeIsWords(); + /* begin genLowcodeIsWords */ + rOopTop7 = NoReg; + rResult5 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop7 = registerOrNone(ssTop()); + } + if (rOopTop7 == NoReg) { + rOopTop7 = allocateRegNotConflictingWith(0); + } + rResult5 = allocateRegNotConflictingWith(1ULL << rOopTop7); + assert(!(((rOopTop7 == NoReg) + || (rResult5 == NoReg)))); + object7 = rOopTop7; + value5 = rResult5; + + popToReg(ssTop(), object7); + ssPop(1); + genLcIsWordsto(object7, value5); + return 0; case 9: - return genLowcodeIsWordsOrBytes(); + /* begin genLowcodeIsWordsOrBytes */ + rOopTop8 = NoReg; + rResult6 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop8 = registerOrNone(ssTop()); + } + if (rOopTop8 == NoReg) { + rOopTop8 = allocateRegNotConflictingWith(0); + } + rResult6 = allocateRegNotConflictingWith(1ULL << rOopTop8); + assert(!(((rOopTop8 == NoReg) + || (rResult6 == NoReg)))); + object8 = rOopTop8; + value6 = rResult6; + + popToReg(ssTop(), object8); + ssPop(1); + genLcIsWordsOrBytesto(object8, value6); + return 0; case 10: - return genLowcodeOopSmallIntegerToInt32(); + /* begin genLowcodeOopSmallIntegerToInt32 */ + rOopTop9 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop9 = registerOrNone(ssTop()); + } + if (rOopTop9 == NoReg) { + rOopTop9 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop9 == NoReg))); + object9 = rOopTop9; + + popToReg(ssTop(), object9); + ssPop(1); + genConvertSmallIntegerToIntegerInReg(object9); + ssPushNativeRegister(object9); + return 0; case 11: - return genLowcodeOopSmallIntegerToInt64(); + /* begin genLowcodeOopSmallIntegerToInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger: */ + rOopTop11 = NoReg; + rResult11 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop11 = registerOrNone(ssTop()); + } + if (rOopTop11 == NoReg) { + rOopTop11 = allocateRegNotConflictingWith(0); + } + rResult11 = allocateRegNotConflictingWith(1ULL << rOopTop11); + assert(!(((rOopTop11 == NoReg) + || (rResult11 == NoReg)))); + object10 = rOopTop11; + value7 = rResult11; + + popToReg(ssTop(), object10); + ssPop(1); + genConvertSmallIntegerToIntegerInReg(object10); + ssPushNativeRegister(object10); + + return 0; case 12: - return genLowcodeOopToBoolean32(); + /* begin genLowcodeOopToBoolean32 */ + rOopTop17 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop17 = registerOrNone(ssTop()); + } + if (rOopTop17 == NoReg) { + rOopTop17 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop17 == NoReg))); + object16 = rOopTop17; + + popToReg(ssTop(), object16); + ssPop(1); + annotateobjRef(gSubCwR(falseObject(), object16), falseObject()); + ssPushNativeRegister(object16); + return 0; case 13: - return genLowcodeOopToBoolean64(); + /* begin genLowcodeOopToBoolean64 */ + /* begin allocateRegistersForLowcodeOopResultInteger: */ + rOopTop19 = NoReg; + rResult12 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop19 = registerOrNone(ssTop()); + } + if (rOopTop19 == NoReg) { + rOopTop19 = allocateRegNotConflictingWith(0); + } + rResult12 = allocateRegNotConflictingWith(1ULL << rOopTop19); + assert(!(((rOopTop19 == NoReg) + || (rResult12 == NoReg)))); + object17 = rOopTop19; + value9 = rResult12; + + popToReg(ssTop(), object17); + ssPop(1); + annotateobjRef(gSubCwR(falseObject(), object17), falseObject()); + ssPushNativeRegister(object17); + + return 0; case 14: - return genLowcodeOopToFloat32(); + /* begin genLowcodeOopToFloat32 */ + rOopTop20 = NoReg; + frResult = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop20 = registerOrNone(ssTop()); + } + if (rOopTop20 == NoReg) { + rOopTop20 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rOopTop20 == NoReg) + || (frResult == NoReg)))); + object18 = rOopTop20; + value10 = frResult; + + popToReg(ssTop(), object18); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoFloat32(object18, value10); + return 0; case 15: - return genLowcodeOopToFloat64(); + /* begin genLowcodeOopToFloat64 */ + rOopTop21 = NoReg; + frResult1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop21 = registerOrNone(ssTop()); + } + if (rOopTop21 == NoReg) { + rOopTop21 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rOopTop21 == NoReg) + || (frResult1 == NoReg)))); + object19 = rOopTop21; + value11 = frResult1; + + popToReg(ssTop(), object19); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoFloat64(object19, value11); + return 0; case 16: - return genLowcodeOopToInt32(); + /* begin genLowcodeOopToInt32 */ + rOopTop22 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop22 = registerOrNone(ssTop()); + } + if (rOopTop22 == NoReg) { + rOopTop22 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop22 == NoReg))); + object20 = rOopTop22; + + popToReg(ssTop(), object20); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToInt32(object20); + return 0; case 17: - return genLowcodeOopToInt64(); + /* begin genLowcodeOopToInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger: */ + rOopTop110 = NoReg; + rResult13 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop110 = registerOrNone(ssTop()); + } + if (rOopTop110 == NoReg) { + rOopTop110 = allocateRegNotConflictingWith(0); + } + rResult13 = allocateRegNotConflictingWith(1ULL << rOopTop110); + assert(!(((rOopTop110 == NoReg) + || (rResult13 == NoReg)))); + object21 = rOopTop110; + value12 = rResult13; + + popToReg(ssTop(), object21); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToInt64(object21); + + return 0; case 18: - return genLowcodeOopToPointer(); + /* begin genLowcodeOopToPointer */ + rOopTop12 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop12 = registerOrNone(ssTop()); + } + if (rOopTop12 == NoReg) { + rOopTop12 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop12 == NoReg))); + object11 = rOopTop12; + + popToReg(ssTop(), object11); + ssPop(1); + genLcOopToPointer(object11); + return 0; case 19: - return genLowcodeOopToPointerReinterpret(); + /* begin genLowcodeOopToPointerReinterpret */ + rOopTop13 = NoReg; + rResult8 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop13 = registerOrNone(ssTop()); + } + if (rOopTop13 == NoReg) { + rOopTop13 = allocateRegNotConflictingWith(0); + } + rResult8 = allocateRegNotConflictingWith(1ULL << rOopTop13); + assert(!(((rOopTop13 == NoReg) + || (rResult8 == NoReg)))); + object12 = rOopTop13; + pointer = rResult8; + + popToReg(ssTop(), object12); + ssPop(1); + ssPushNativeRegister(object12); + return 0; case 20: - return genLowcodeOopToUInt32(); + /* begin genLowcodeOopToUInt32 */ + rOopTop24 = NoReg; + rResult15 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop24 = registerOrNone(ssTop()); + } + if (rOopTop24 == NoReg) { + rOopTop24 = allocateRegNotConflictingWith(0); + } + rResult15 = allocateRegNotConflictingWith(1ULL << rOopTop24); + assert(!(((rOopTop24 == NoReg) + || (rResult15 == NoReg)))); + object22 = rOopTop24; + value13 = rResult15; + + popToReg(ssTop(), object22); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToUInt32(object22); + return 0; case 21: - return genLowcodeOopToUInt64(); + /* begin genLowcodeOopToUInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger: */ + rOopTop111 = NoReg; + rResult16 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop111 = registerOrNone(ssTop()); + } + if (rOopTop111 == NoReg) { + rOopTop111 = allocateRegNotConflictingWith(0); + } + rResult16 = allocateRegNotConflictingWith(1ULL << rOopTop111); + assert(!(((rOopTop111 == NoReg) + || (rResult16 == NoReg)))); + object23 = rOopTop111; + value14 = rResult16; + + popToReg(ssTop(), object23); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToUInt64(object23); + + return 0; case 22: - return genLowcodePin(); + /* begin genLowcodePin */ + rOopTop14 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop14 = registerOrNone(ssTop()); + } + if (rOopTop14 == NoReg) { + rOopTop14 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop14 == NoReg))); + object13 = rOopTop14; + + popToReg(ssTop(), object13); + ssPop(1); + abort(); + return 0; case 23: - return genLowcodeUnpin(); + /* begin genLowcodeUnpin */ + rOopTop15 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop15 = registerOrNone(ssTop()); + } + if (rOopTop15 == NoReg) { + rOopTop15 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop15 == NoReg))); + object14 = rOopTop15; + + popToReg(ssTop(), object14); + ssPop(1); + abort(); + return 0; default: return EncounteredUnknownBytecode; @@ -30465,6849 +30593,563 @@ genLowcodeBinaryInlinePrimitive(sqInt prim) } -/* Lowcode instruction generator */ +/* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeBoolean32ToOop */ -static sqInt -genLowcodeBoolean32ToOop(void) + /* StackToRegisterMappingCogit>>#genLowcodeNullaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeNullaryInlinePrimitive(sqInt prim) { AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * inst; - sqInt object; - AbstractInstruction * trueJump; - sqInt value; - sqInt wordConstant; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, value); - /* begin JumpNonZero: */ - trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - annotateobjRef(gMoveCwR(falseObject(), value), falseObject()); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - /* begin MoveCw:R: */ - wordConstant = trueObject(); - /* begin checkLiteral:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCwR, wordConstant, value); - inst = anInstruction1; - jmpTarget(trueJump, inst); - annotateobjRef(inst, trueObject()); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeBoolean64ToOop */ -static sqInt -genLowcodeBoolean64ToOop(void) -{ - AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction11; AbstractInstruction *anInstruction2; AbstractInstruction * cont; + AbstractInstruction * cont1; + sqInt floatValue; + sqInt floatValueValue; + sqInt frTop; + sqInt frTop1; AbstractInstruction * inst; + AbstractInstruction * inst1; sqInt object; + sqInt object1; + sqInt object2; + sqInt object3; + sqInt object4; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue2; + sqInt objectValue3; + sqInt objectValue4; + sqInt pointer; + sqInt pointer1; + sqInt pointerClassLiteral; + sqInt pointerValue; + sqInt pointerValue1; + sqInt rResult; + sqInt rResult1; + sqInt rResult11; + sqInt rResult3; + sqInt rResult4; + sqInt rTop; + sqInt rTop1; + sqInt rTop11; + sqInt rTop12; + sqInt rTop3; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt singleFloatValue; + sqInt singleFloatValueValue; AbstractInstruction * trueJump; + AbstractInstruction * trueJump1; sqInt value; + sqInt value1; + sqInt value2; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue2; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt wordConstant; sqInt wordConstant1; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(CmpCqR, 0, value); - /* begin JumpNonZero: */ - trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - annotateobjRef(gMoveCwR(falseObject(), value), falseObject()); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - /* begin MoveCw:R: */ - wordConstant1 = trueObject(); - /* begin checkLiteral:forInstruction: */ - anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, value); - inst = anInstruction2; - jmpTarget(trueJump, inst); - annotateobjRef(inst, trueObject()); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushRegister(value); - - return 0; -} - + + switch (prim) { + case 0: + /* begin genLowcodeBoolean32ToOop */ + rTop = NoReg; + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1ULL << rTop); + assert(!(((rTop == NoReg) + || (rResult == NoReg)))); + value = rTop; + object = rResult; -/* Lowcode instruction generator */ + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(CmpCqR, 0, value); + /* begin JumpNonZero: */ + trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + annotateobjRef(gMoveCwR(falseObject(), value), falseObject()); + /* begin Jump: */ + cont = genoperand(Jump, ((sqInt)0)); + /* begin MoveCw:R: */ + wordConstant = trueObject(); + /* begin checkLiteral:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCwR, wordConstant, value); + inst = anInstruction1; + jmpTarget(trueJump, inst); + annotateobjRef(inst, trueObject()); + jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushRegister(value); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeByteSizeOf */ -static sqInt -genLowcodeByteSizeOf(void) -{ - sqInt object; - sqInt value; + case 1: + /* begin genLowcodeBoolean64ToOop */ + /* begin allocateRegistersForLowcodeIntegerResultOop: */ + rTop1 = NoReg; + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop1 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1ULL << rTop1); + assert(!(((rTop1 == NoReg) + || (rResult1 == NoReg)))); + value1 = rTop1; + object1 = rResult1; - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcByteSizeOfto(object, value); - return 0; -} + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperand(CmpCqR, 0, value1); + /* begin JumpNonZero: */ + trueJump1 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + annotateobjRef(gMoveCwR(falseObject(), value1), falseObject()); + /* begin Jump: */ + cont1 = genoperand(Jump, ((sqInt)0)); + /* begin MoveCw:R: */ + wordConstant1 = trueObject(); + /* begin checkLiteral:forInstruction: */ + anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, value1); + inst1 = anInstruction2; + jmpTarget(trueJump1, inst1); + annotateobjRef(inst1, trueObject()); + jmpTarget(cont1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushRegister(value1); + return 0; -/* Lowcode instruction generator */ + case 2: + /* begin genLowcodeFloat32ToOop */ + frTop = NoReg; + + /* Float argument */ + rResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(0); + assert(!(((frTop == NoReg) + || (rResult3 == NoReg)))); + singleFloatValue = frTop; + object2 = rResult3; + + nativePopToReg(ssNativeTop(), singleFloatValue); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcFloat32toOop(singleFloatValue, object2); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentFloat32 */ -static sqInt -genLowcodeCallArgumentFloat32(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt literal; + case 3: + /* begin genLowcodeFloat64ToOop */ + frTop1 = NoReg; + + /* Float argument */ + rResult4 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + rResult4 = allocateRegNotConflictingWith(0); + assert(!(((frTop1 == NoReg) + || (rResult4 == NoReg)))); + floatValue = frTop1; + object3 = rResult4; + + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcFloat64toOop(floatValue, object3); + return 0; - nativeStackPopToReg(ssNativeTop(), DPFPReg0); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - literal = -BytesPerWord; - anInstruction = genoperandoperandoperand(MoveRsM32r, DPFPReg0, -BytesPerWord, SPReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(SubCqR, BytesPerWord, SPReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} + case 4: + /* begin genLowcodeInt32ToOop */ + rTop3 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(0); + } + assert(!((rTop3 == NoReg))); + value2 = rTop3; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInt32ToOop(value2); + return 0; + case 5: + /* begin genLowcodeInt64ToOop */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop11 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop11 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop11 == NoReg) { + rTop11 = allocateRegNotConflictingWith(0); + } + assert(!((rTop11 == NoReg))); + value3 = rTop11; -/* Lowcode instruction generator */ + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInt64ToOop(value3); - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentFloat64 */ -static sqInt -genLowcodeCallArgumentFloat64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; + return 0; - nativeStackPopToReg(ssNativeTop(), DPFPReg0); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, DPFPReg0, -8, SPReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(SubCqR, 8, SPReg); - currentCallCleanUpSize += 8; - return 0; -} + case 6: + /* begin genLowcodePointerToOop */ + pointerClassLiteral = getLiteral(extA); + /* begin allocateRegistersForLowcodeInteger: */ + rTop7 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop7 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + assert(!((rTop7 == NoReg))); + pointer1 = rTop7; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcPointerToOopclass(pointer1, pointerClassLiteral); + extA = 0; + return 0; + case 7: + /* begin genLowcodePointerToOopReinterprer */ + rTop5 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(0); + } + assert(!((rTop5 == NoReg))); + pointer = rTop5; -/* Lowcode instruction generator */ + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + ssPushRegister(pointer); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentInt32 */ -static sqInt -genLowcodeCallArgumentInt32(void) -{ - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} + case 8: + /* begin genLowcodeSmallInt32ToOop */ + rTop6 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + assert(!((rTop6 == NoReg))); + value4 = rTop6; + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + genConvertIntegerToSmallIntegerInReg(value4); + ssPushRegister(value4); + return 0; -/* Lowcode instruction generator */ + case 9: + /* begin genLowcodeUint32ToOop */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value5 = rTop8; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcUInt32ToOop(value5); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentInt64 */ -static sqInt -genLowcodeCallArgumentInt64(void) -{ - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - currentCallCleanUpSize += BytesPerWord; + case 10: + /* begin genLowcodeUint64ToOop */ + /* begin allocateRegistersForLowcodeIntegerResultOop: */ + rTop12 = NoReg; + rResult11 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop12 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop12 == NoReg) { + rTop12 = allocateRegNotConflictingWith(0); + } + rResult11 = allocateRegNotConflictingWith(1ULL << rTop12); + assert(!(((rTop12 == NoReg) + || (rResult11 == NoReg)))); + value6 = rTop12; + object4 = rResult11; - return 0; -} + nativePopToReg(ssNativeTop(), value6); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcUInt64ToOop(value6); + return 0; -/* Lowcode instruction generator */ + default: + return EncounteredUnknownBytecode; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentPointer */ -static sqInt -genLowcodeCallArgumentPointer(void) -{ - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - currentCallCleanUpSize += BytesPerWord; + } return 0; } -/* Lowcode instruction generator */ -/* Allocate space */ +/* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentSpace */ -static sqInt -genLowcodeCallArgumentSpace(void) + /* StackToRegisterMappingCogit>>#genLowcodeTrinaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeTrinaryInlinePrimitive(sqInt prim) { AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction3; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + sqInt fieldIndex; + sqInt fieldIndex1; + sqInt fieldIndexValue; + sqInt first; + sqInt first1; + sqInt firstValue; + sqInt firstValue1; + sqInt object; + sqInt object1; + sqInt objectValue; + sqInt objectValue1; + sqInt oopTopRegisterMask; + sqInt oopTopRegisterMask1; + sqInt oopTopRegisterMask2; + sqInt oopTopRegisterMask3; + sqInt rOopNext; + sqInt rOopNext1; + sqInt rOopNext2; + sqInt rOopNext3; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop2; + sqInt rOopTop3; + sqInt rResult; + sqInt rTop; + sqInt second; + sqInt second1; + sqInt secondValue; + sqInt secondValue1; + sqInt topRegisterMask; + sqInt value; + sqInt value1; + sqInt value2; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue2; - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(SubCqR, extA, SPReg); - currentCallCleanUpSize += extA; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ -/* Fetch the pointer */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentStructure */ -static sqInt -genLowcodeCallArgumentStructure(void) -{ - AbstractInstruction *anInstruction; - - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(SubCqR, extA, SPReg); - - /* Copy the structure */ - currentCallCleanUpSize += extA; - genMemCopytoconstantSize(backEnd, TempReg, SPReg, extA); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallInstruction */ -static sqInt -genLowcodeCallInstruction(void) -{ - AbstractInstruction *abstractInstruction; - sqInt function; - - function = extA; - /* begin CallRT: */ - abstractInstruction = genoperand(Call, function); - (abstractInstruction->annotation = IsRelativeCall); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallPhysical */ -static sqInt -genLowcodeCallPhysical(void) -{ - sqInt registerID; - - registerID = extA; - /* begin CallR: */ - genoperand(CallR, registerID); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCheckSessionIdentifier */ -static sqInt -genLowcodeCheckSessionIdentifier(void) -{ - sqInt expectedSession; - - expectedSession = extA; - ssPushNativeConstantInt32((expectedSession == (getThisSessionID()) - ? 1 - : 0)); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCompareAndSwap32 */ -static sqInt -genLowcodeCompareAndSwap32(void) -{ - sqInt check; - sqInt newValue; - sqInt oldValue; - sqInt value; - - if (((newValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((newValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((oldValue = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << newValue)))) == NoReg) { - ssAllocateRequiredReg((oldValue = Arg1Reg)); - } - if (((check = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << newValue)) | (1ULL << oldValue)))) == NoReg) { - ssAllocateRequiredReg((check = SendNumArgsReg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1ULL << newValue)) | (1ULL << oldValue)) | (1ULL << check)))) == NoReg) { - ssAllocateRequiredReg((value = ClassReg)); - } - if ((((newValue == ReceiverResultReg) - || (oldValue == ReceiverResultReg)) - || (check == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), newValue); - ssNativePop(1); - nativePopToReg(ssNativeTop(), oldValue); - ssNativePop(1); - nativePopToReg(ssNativeTop(), check); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDiv32 */ -static sqInt -genLowcodeDiv32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, first, second); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDiv64 */ -static sqInt -genLowcodeDiv64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateFloat32 */ -static sqInt -genLowcodeDuplicateFloat32(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((dup2 = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredFloatReg((dup2 = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveRs:Rs: */ - genoperandoperand(MoveRsRs, value, dup2); - ssPushNativeRegisterSingleFloat(value); - ssPushNativeRegisterSingleFloat(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateFloat64 */ -static sqInt -genLowcodeDuplicateFloat64(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((dup2 = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredFloatReg((dup2 = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveRd:Rd: */ - genoperandoperand(MoveRdRd, value, dup2); - ssPushNativeRegisterDoubleFloat(value); - ssPushNativeRegisterDoubleFloat(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateInt32 */ -static sqInt -genLowcodeDuplicateInt32(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dup2 = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((dup2 = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (dup2 == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, dup2); - ssPushNativeRegister(value); - ssPushNativeRegister(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateInt64 */ -static sqInt -genLowcodeDuplicateInt64(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dup2 = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((dup2 = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (dup2 == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, dup2); - ssPushNativeRegister(value); - ssPushNativeRegister(dup2); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicatePointer */ -static sqInt -genLowcodeDuplicatePointer(void) -{ - sqInt dup2; - sqInt pointerValue; - - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dup2 = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointerValue)))) == NoReg) { - ssAllocateRequiredReg((dup2 = Arg1Reg)); - } - if ((pointerValue == ReceiverResultReg) - || (dup2 == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointerValue, dup2); - ssPushNativeRegister(pointerValue); - ssPushNativeRegister(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEffectiveAddress32 */ -static sqInt -genLowcodeEffectiveAddress32(void) -{ - sqInt base; - sqInt index; - sqInt offset; - sqInt scale; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((scale = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << offset)))) == NoReg) { - ssAllocateRequiredReg((scale = Arg1Reg)); - } - if (((index = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << offset)) | (1ULL << scale)))) == NoReg) { - ssAllocateRequiredReg((index = SendNumArgsReg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1ULL << offset)) | (1ULL << scale)) | (1ULL << index)))) == NoReg) { - ssAllocateRequiredReg((base = ClassReg)); - } - if ((((offset == ReceiverResultReg) - || (scale == ReceiverResultReg)) - || (index == ReceiverResultReg)) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), scale); - ssNativePop(1); - nativePopToReg(ssNativeTop(), index); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, scale, index); - /* begin AddR:R: */ - genoperandoperand(AddRR, index, base); - /* begin AddR:R: */ - genoperandoperand(AddRR, offset, base); - ssPushNativeRegister(base); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEffectiveAddress64 */ -static sqInt -genLowcodeEffectiveAddress64(void) -{ - sqInt base; - sqInt index; - sqInt offset; - sqInt result; - sqInt scale; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((scale = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << offset)))) == NoReg) { - ssAllocateRequiredReg((scale = Arg1Reg)); - } - if (((index = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << offset)) | (1ULL << scale)))) == NoReg) { - ssAllocateRequiredReg((index = SendNumArgsReg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1ULL << offset)) | (1ULL << scale)) | (1ULL << index)))) == NoReg) { - ssAllocateRequiredReg((base = ClassReg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((((liveRegisters()) | (1ULL << offset)) | (1ULL << scale)) | (1ULL << index)) | (1ULL << base)))) == NoReg) { - ssAllocateRequiredReg((result = ReceiverResultReg)); - } - if (((((offset == ReceiverResultReg) - || (scale == ReceiverResultReg)) - || (index == ReceiverResultReg)) - || (base == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), scale); - ssNativePop(1); - nativePopToReg(ssNativeTop(), index); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEndCall */ -static sqInt -genLowcodeEndCall(void) -{ - endHighLevelCallWithCleanup(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEndCallNoCleanup */ -static sqInt -genLowcodeEndCallNoCleanup(void) -{ - endHighLevelCallWithoutCleanup(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFirstFieldPointer */ -static sqInt -genLowcodeFirstFieldPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcFirstFieldPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFirstIndexableFieldPointer */ -static sqInt -genLowcodeFirstIndexableFieldPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcFirstIndexableFieldPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Add */ -static sqInt -genLowcodeFloat32Add(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddRs:Rs: */ - genoperandoperand(AddRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Div */ -static sqInt -genLowcodeFloat32Div(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin DivRs:Rs: */ - genoperandoperand(DivRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Equal */ -static sqInt -genLowcodeFloat32Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPNotEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Great */ -static sqInt -genLowcodeFloat32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPLessOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32GreatEqual */ -static sqInt -genLowcodeFloat32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPLess(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Less */ -static sqInt -genLowcodeFloat32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPGreaterOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32LessEqual */ -static sqInt -genLowcodeFloat32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPGreater(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Mul */ -static sqInt -genLowcodeFloat32Mul(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulRs:Rs: */ - genoperandoperand(MulRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Neg */ -static sqInt -genLowcodeFloat32Neg(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin XorRs:Rs: */ - genoperandoperand(XorRsRs, result, result); - /* begin SubRs:Rs: */ - genoperandoperand(SubRsRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32NotEqual */ -static sqInt -genLowcodeFloat32NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Sqrt */ -static sqInt -genLowcodeFloat32Sqrt(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SqrtRs: */ - genoperand(SqrtRs, value); - ssPushNativeRegisterSingleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Sub */ -static sqInt -genLowcodeFloat32Sub(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubRs:Rs: */ - genoperandoperand(SubRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToFloat64 */ -static sqInt -genLowcodeFloat32ToFloat64(void) -{ - sqInt singleFloatValue; - - if (((singleFloatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((singleFloatValue = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), singleFloatValue); - ssNativePop(1); - /* begin ConvertRs:Rd: */ - genoperandoperand(ConvertRsRd, singleFloatValue, singleFloatValue); - ssPushNativeRegisterDoubleFloat(singleFloatValue); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToInt32 */ -static sqInt -genLowcodeFloat32ToInt32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertRs:R: */ - genoperandoperand(ConvertRsR, value, result); - ssPushNativeRegister(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToInt64 */ -static sqInt -genLowcodeFloat32ToInt64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToOop */ -static sqInt -genLowcodeFloat32ToOop(void) -{ - sqInt object; - sqInt singleFloatValue; - - if (((singleFloatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((singleFloatValue = DPFPReg0)); - } - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), singleFloatValue); - ssNativePop(1); - ssFlushAll(); - genLcFloat32toOop(singleFloatValue, object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToUInt32 */ -static sqInt -genLowcodeFloat32ToUInt32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertRs:R: */ - genoperandoperand(ConvertRsR, value, result); - ssPushNativeRegister(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToUInt64 */ -static sqInt -genLowcodeFloat32ToUInt64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Add */ -static sqInt -genLowcodeFloat64Add(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddRd:Rd: */ - genoperandoperand(AddRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Div */ -static sqInt -genLowcodeFloat64Div(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin DivRd:Rd: */ - genoperandoperand(DivRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Equal */ -static sqInt -genLowcodeFloat64Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPNotEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Great */ -static sqInt -genLowcodeFloat64Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPLessOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64GreatEqual */ -static sqInt -genLowcodeFloat64GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPLess(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Less */ -static sqInt -genLowcodeFloat64Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPGreaterOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64LessEqual */ -static sqInt -genLowcodeFloat64LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPGreater(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Mul */ -static sqInt -genLowcodeFloat64Mul(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulRd:Rd: */ - genoperandoperand(MulRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Neg */ -static sqInt -genLowcodeFloat64Neg(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin XorRd:Rd: */ - genoperandoperand(XorRdRd, result, result); - /* begin SubRd:Rd: */ - genoperandoperand(SubRdRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64NotEqual */ -static sqInt -genLowcodeFloat64NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Sqrt */ -static sqInt -genLowcodeFloat64Sqrt(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SqrtRd: */ - genoperand(SqrtRd, value); - ssPushNativeRegisterDoubleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Sub */ -static sqInt -genLowcodeFloat64Sub(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubRd:Rd: */ - genoperandoperand(SubRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToFloat32 */ -static sqInt -genLowcodeFloat64ToFloat32(void) -{ - sqInt floatValue; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:Rs: */ - genoperandoperand(ConvertRdRs, floatValue, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToInt32 */ -static sqInt -genLowcodeFloat64ToInt32(void) -{ - sqInt floatValue; - sqInt int32Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int32Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int32Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int32Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:R: */ - genoperandoperand(ConvertRdR, floatValue, int32Result); - ssPushNativeRegister(int32Result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToInt64 */ -static sqInt -genLowcodeFloat64ToInt64(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToOop */ -static sqInt -genLowcodeFloat64ToOop(void) -{ - sqInt floatValue; - sqInt object; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - ssFlushAll(); - genLcFloat64toOop(floatValue, object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToUInt32 */ -static sqInt -genLowcodeFloat64ToUInt32(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:R: */ - genoperandoperand(ConvertRdR, floatValue, int64Result); - ssPushNativeRegister(int64Result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToUInt64 */ -static sqInt -genLowcodeFloat64ToUInt64(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFree */ -static sqInt -genLowcodeFree(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssFlushAll(); - if (pointer != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointer, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFreeTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateIndexable32Oop */ -static sqInt -genLowcodeInstantiateIndexable32Oop(void) -{ - sqInt classOop; - sqInt indexableSize; - sqInt object; - - if (((indexableSize = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((indexableSize = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((classOop = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << indexableSize)))) == NoReg) { - ssAllocateRequiredReg((classOop = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << indexableSize)) | (1ULL << classOop)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((indexableSize == ReceiverResultReg) - || (classOop == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), indexableSize); - ssNativePop(1); - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOopindexableSize(classOop, indexableSize); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateIndexableOop */ -static sqInt -genLowcodeInstantiateIndexableOop(void) -{ - sqInt classOop; - sqInt indexableSize; - sqInt object; - - indexableSize = extA; - if (((classOop = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((classOop = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << classOop)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((classOop == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOopconstantIndexableSize(classOop, indexableSize); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateOop */ -static sqInt -genLowcodeInstantiateOop(void) -{ - sqInt classOop; - - if (((classOop = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((classOop = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (classOop == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOop(classOop); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Equal */ -static sqInt -genLowcodeInt32Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Great */ -static sqInt -genLowcodeInt32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpLessOrEqual: */ - falseJump = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32GreatEqual */ -static sqInt -genLowcodeInt32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpLess: */ - falseJump = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Less */ -static sqInt -genLowcodeInt32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpGreaterOrEqual: */ - falseJump = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32LessEqual */ -static sqInt -genLowcodeInt32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpGreater: */ - falseJump = genConditionalBranchoperand(JumpGreater, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32NotEqual */ -static sqInt -genLowcodeInt32NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToFloat32 */ -static sqInt -genLowcodeInt32ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rs: */ - genoperandoperand(ConvertRRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToFloat64 */ -static sqInt -genLowcodeInt32ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rd: */ - genoperandoperand(ConvertRRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToOop */ -static sqInt -genLowcodeInt32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcInt32ToOop(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToPointer */ -static sqInt -genLowcodeInt32ToPointer(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Equal */ -static sqInt -genLowcodeInt64Equal(void) -{ - AbstractInstruction *anInstruction2; - AbstractInstruction *anInstruction3; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction2 = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction3 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Great */ -static sqInt -genLowcodeInt64Great(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64GreatEqual */ -static sqInt -genLowcodeInt64GreatEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Less */ -static sqInt -genLowcodeInt64Less(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64LessEqual */ -static sqInt -genLowcodeInt64LessEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64NotEqual */ -static sqInt -genLowcodeInt64NotEqual(void) -{ - AbstractInstruction *anInstruction2; - AbstractInstruction *anInstruction3; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction2 = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction3 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToFloat32 */ -static sqInt -genLowcodeInt64ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToFloat64 */ -static sqInt -genLowcodeInt64ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToOop */ -static sqInt -genLowcodeInt64ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcInt64ToOop(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToPointer */ -static sqInt -genLowcodeInt64ToPointer(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsBytes */ -static sqInt -genLowcodeIsBytes(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsBytesto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsFloatObject */ -static sqInt -genLowcodeIsFloatObject(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsFloatObjectto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsIndexable */ -static sqInt -genLowcodeIsIndexable(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsIndexableto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsIntegerObject */ -static sqInt -genLowcodeIsIntegerObject(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsIntegerObjectto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsPointers */ -static sqInt -genLowcodeIsPointers(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsPointersto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsWords */ -static sqInt -genLowcodeIsWords(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsWordsto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsWordsOrBytes */ -static sqInt -genLowcodeIsWordsOrBytes(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsWordsOrBytesto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLeftShift32 */ -static sqInt -genLowcodeLeftShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin LogicalShiftLeftR:R: */ - genoperandoperand(LogicalShiftLeftRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLeftShift64 */ -static sqInt -genLowcodeLeftShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << shiftAmount)) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentAddress */ -static sqInt -genLowcodeLoadArgumentAddress(void) -{ - sqInt baseOffset; - sqInt pointer; - - baseOffset = extA; - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, pointer); - ssPushNativeRegister(pointer); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentFloat32 */ -static sqInt -genLowcodeLoadArgumentFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt floatValue; - - baseOffset = extA; - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentFloat64 */ -static sqInt -genLowcodeLoadArgumentFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt doubleValue; - - baseOffset = extA; - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); - ssPushNativeRegisterDoubleFloat(doubleValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt16 */ -static sqInt -genLowcodeLoadArgumentInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt32 */ -static sqInt -genLowcodeLoadArgumentInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt64 */ -static sqInt -genLowcodeLoadArgumentInt64(void) -{ - AbstractInstruction *anInstruction2; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - assert(BytesPerWord == 8); - /* begin gen:quickConstant:operand:operand: */ - anInstruction2 = genoperandoperandoperand(MoveMwrR, 0, TempReg, value); - - ssPushNativeRegister(value); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt8 */ -static sqInt -genLowcodeLoadArgumentInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentPointer */ -static sqInt -genLowcodeLoadArgumentPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerResult; - - baseOffset = extA; - if (((pointerResult = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerResult = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerResult == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); - ssPushNativeRegister(pointerResult); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt16 */ -static sqInt -genLowcodeLoadArgumentUInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt32 */ -static sqInt -genLowcodeLoadArgumentUInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt64 */ -static sqInt -genLowcodeLoadArgumentUInt64(void) -{ - AbstractInstruction *anInstruction2; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - assert(BytesPerWord == 8); - /* begin gen:quickConstant:operand:operand: */ - anInstruction2 = genoperandoperandoperand(MoveMwrR, 0, TempReg, value); - - ssPushNativeRegister(value); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt8 */ -static sqInt -genLowcodeLoadArgumentUInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadFloat32FromMemory */ -static sqInt -genLowcodeLoadFloat32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, pointer, value); - ssPushNativeRegisterSingleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadFloat64FromMemory */ -static sqInt -genLowcodeLoadFloat64FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, pointer, value); - ssPushNativeRegisterDoubleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt16FromMemory */ -static sqInt -genLowcodeLoadInt16FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, pointer, value); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt32FromMemory */ -static sqInt -genLowcodeLoadInt32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt64FromMemory */ -static sqInt -genLowcodeLoadInt64FromMemory(void) -{ - AbstractInstruction *anInstruction2; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - assert(BytesPerWord == 8); - /* begin gen:quickConstant:operand:operand: */ - anInstruction2 = genoperandoperandoperand(MoveMwrR, 0, pointer, value); - - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt8FromMemory */ -static sqInt -genLowcodeLoadInt8FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, pointer, value); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalAddress */ -static sqInt -genLowcodeLoadLocalAddress(void) -{ - sqInt baseOffset; - sqInt pointer; - - baseOffset = extA; - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, pointer); - ssPushNativeRegister(pointer); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalFloat32 */ -static sqInt -genLowcodeLoadLocalFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt floatValue; - - baseOffset = extA; - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalFloat64 */ -static sqInt -genLowcodeLoadLocalFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt doubleValue; - - baseOffset = extA; - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); - ssPushNativeRegisterDoubleFloat(doubleValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt16 */ -static sqInt -genLowcodeLoadLocalInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt32 */ -static sqInt -genLowcodeLoadLocalInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt64 */ -static sqInt -genLowcodeLoadLocalInt64(void) -{ - AbstractInstruction *anInstruction2; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - assert(BytesPerWord == 8); - /* begin gen:quickConstant:operand:operand: */ - anInstruction2 = genoperandoperandoperand(MoveMwrR, 0, TempReg, value); - - ssPushNativeRegister(value); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt8 */ -static sqInt -genLowcodeLoadLocalInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalPointer */ -static sqInt -genLowcodeLoadLocalPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerResult; - - baseOffset = extA; - if (((pointerResult = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerResult = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerResult == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); - ssPushNativeRegister(pointerResult); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt16 */ -static sqInt -genLowcodeLoadLocalUInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt32 */ -static sqInt -genLowcodeLoadLocalUInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt64 */ -static sqInt -genLowcodeLoadLocalUInt64(void) -{ - AbstractInstruction *anInstruction2; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - assert(BytesPerWord == 8); - /* begin gen:quickConstant:operand:operand: */ - anInstruction2 = genoperandoperandoperand(MoveMwrR, 0, TempReg, value); - - ssPushNativeRegister(value); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt8 */ -static sqInt -genLowcodeLoadLocalUInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadObjectAt */ -static sqInt -genLowcodeLoadObjectAt(void) -{ - sqInt fieldIndex; - sqInt object; - - if (((fieldIndex = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((fieldIndex = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << fieldIndex)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((fieldIndex == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), fieldIndex); - ssNativePop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcLoadObjectat(object, fieldIndex); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadObjectField */ -static sqInt -genLowcodeLoadObjectField(void) -{ - sqInt fieldIndex; - sqInt object; - - fieldIndex = extA; - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcLoadObjectfield(object, fieldIndex); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadPointerFromMemory */ -static sqInt -genLowcodeLoadPointerFromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt pointerResult; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointerResult = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((pointerResult = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (pointerResult == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, pointer, pointerResult); - ssPushNativeRegister(pointerResult); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt16FromMemory */ -static sqInt -genLowcodeLoadUInt16FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt32FromMemory */ -static sqInt -genLowcodeLoadUInt32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt64FromMemory */ -static sqInt -genLowcodeLoadUInt64FromMemory(void) -{ - AbstractInstruction *anInstruction2; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - assert(BytesPerWord == 8); - /* begin gen:quickConstant:operand:operand: */ - anInstruction2 = genoperandoperandoperand(MoveMwrR, 0, pointer, value); - - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt8FromMemory */ -static sqInt -genLowcodeLoadUInt8FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLocalFrameSize */ -static sqInt -genLowcodeLocalFrameSize(void) -{ - sqInt address; - sqInt address1; - sqInt alignedSize; - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction *anInstruction2; - AbstractInstruction *anInstruction3; - AbstractInstruction *anInstruction4; - AbstractInstruction *anInstruction5; - AbstractInstruction *anInstruction6; - AbstractInstruction *anInstruction7; - AbstractInstruction *anInstruction8; - sqInt offset; - sqInt offset1; - sqInt offset2; - sqInt offset3; - sqInt quickConstant; - sqInt size; - - size = extA; - assert(needsFrame); - - /* Align the size to 16 bytes. */ - hasNativeFrame = 1; - - /* Mark the stack frame */ - alignedSize = (size + 15) & -16; - annotateobjRef(gMoveCwR(splObj(LowcodeContextMark), TempReg), splObj(LowcodeContextMark)); - /* begin MoveR:Mw:r: */ - offset = frameOffsetOfNativeFrameMark(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, TempReg, offset, FPReg); - /* begin MoveAw:R: */ - address = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction1 = genoperandoperand(MoveAwR, address, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction2 = genoperandoperand(AddCqR, 1, TempReg); - /* begin MoveR:Mw:r: */ - offset1 = frameOffsetOfPreviousNativeStackPointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction3 = genoperandoperandoperand(MoveRMwr, TempReg, offset1, FPReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction4 = genoperandoperand(SubCqR, alignedSize, TempReg); - /* begin MoveR:Mw:r: */ - offset2 = frameOffsetOfNativeFramePointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction5 = genoperandoperandoperand(MoveRMwr, TempReg, offset2, FPReg); - /* begin MoveR:Mw:r: */ - offset3 = frameOffsetOfNativeStackPointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction6 = genoperandoperandoperand(MoveRMwr, TempReg, offset3, FPReg); - /* begin SubCq:R: */ - quickConstant = 1 + (defaultNativeStackFrameSize()); - /* begin checkQuickConstant:forInstruction: */ - anInstruction7 = genoperandoperand(SubCqR, quickConstant, TempReg); - /* begin MoveR:Aw: */ - address1 = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction8 = genoperandoperand(MoveRAw, TempReg, address1); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLockRegisters */ -static sqInt -genLowcodeLockRegisters(void) -{ - ssFlushAll(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLockVM */ -static sqInt -genLowcodeLockVM(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMalloc32 */ -static sqInt -genLowcodeMalloc32(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << size)))) == NoReg) { - ssAllocateRequiredReg((pointer = Arg1Reg)); - } - if ((size == ReceiverResultReg) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - ssFlushAll(); - if (size != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, size, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceMallocTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, pointer); - ssPushNativeRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMalloc64 */ -static sqInt -genLowcodeMalloc64(void) -{ - AbstractInstruction *abstractInstruction1; - sqInt pointer; - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << size)))) == NoReg) { - ssAllocateRequiredReg((pointer = Arg1Reg)); - } - if ((size == ReceiverResultReg) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - ssFlushAll(); - if (size != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, size, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction1 = genoperand(Call, ceMallocTrampoline); - (abstractInstruction1->annotation = IsRelativeCall); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, pointer); - ssPushNativeRegister(pointer); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpy32 */ -static sqInt -genLowcodeMemcpy32(void) -{ - sqInt dest; - sqInt size; - sqInt source; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((source = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << size)))) == NoReg) { - ssAllocateRequiredReg((source = Arg1Reg)); - } - if (((dest = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << size)) | (1ULL << source)))) == NoReg) { - ssAllocateRequiredReg((dest = SendNumArgsReg)); - } - if (((size == ReceiverResultReg) - || (source == ReceiverResultReg)) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - ssFlushAll(); - genMemCopytosize(backEnd, source, dest, size); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpy64 */ -static sqInt -genLowcodeMemcpy64(void) -{ - sqInt dest; - sqInt size; - sqInt sizeLow; - sqInt source; - - sizeLow = 0; - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((source = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << size)))) == NoReg) { - ssAllocateRequiredReg((source = Arg1Reg)); - } - if (((dest = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << size)) | (1ULL << source)))) == NoReg) { - ssAllocateRequiredReg((dest = SendNumArgsReg)); - } - if (((size == ReceiverResultReg) - || (source == ReceiverResultReg)) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - ssFlushAll(); - genMemCopytosize(backEnd, source, dest, sizeLow); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpyFixed */ -static sqInt -genLowcodeMemcpyFixed(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt dest; - sqInt size; - sqInt source; - - size = extA; - if (((source = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((source = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dest = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << source)))) == NoReg) { - ssAllocateRequiredReg((dest = Arg1Reg)); - } - if ((source == ReceiverResultReg) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - if (size == BytesPerWord) { - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, source, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRMwr, TempReg, 0, dest); - } - else { - ssFlushAll(); - genMemCopytoconstantSize(backEnd, source, dest, size); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveFloat32ToPhysical */ -static sqInt -genLowcodeMoveFloat32ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveFloat64ToPhysical */ -static sqInt -genLowcodeMoveFloat64ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += 8; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveInt32ToPhysical */ -static sqInt -genLowcodeMoveInt32ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveInt64ToPhysical */ -static sqInt -genLowcodeMoveInt64ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += 8; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMovePointerToPhysical */ -static sqInt -genLowcodeMovePointerToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMul32 */ -static sqInt -genLowcodeMul32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMul64 */ -static sqInt -genLowcodeMul64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNeg32 */ -static sqInt -genLowcodeNeg32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NegateR: */ - genoperand(NegateR, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNeg64 */ -static sqInt -genLowcodeNeg64(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NegateR: */ - genoperand(NegateR, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNot32 */ -static sqInt -genLowcodeNot32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNot64 */ -static sqInt -genLowcodeNot64(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator dispatch */ - - /* StackToRegisterMappingCogit>>#genLowcodeNullaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeNullaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeBoolean32ToOop(); - - case 1: - return genLowcodeBoolean64ToOop(); - - case 2: - return genLowcodeFloat32ToOop(); - - case 3: - return genLowcodeFloat64ToOop(); - - case 4: - return genLowcodeInt32ToOop(); - - case 5: - return genLowcodeInt64ToOop(); - - case 6: - return genLowcodePointerToOop(); - - case 7: - return genLowcodePointerToOopReinterprer(); - - case 8: - return genLowcodeSmallInt32ToOop(); - - case 9: - return genLowcodeUint32ToOop(); - - case 10: - return genLowcodeUint64ToOop(); - - default: - return EncounteredUnknownBytecode; - - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopEqual */ -static sqInt -genLowcodeOopEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), second); - ssPop(1); - popToReg(ssTop(), first); - ssPop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopNotEqual */ -static sqInt -genLowcodeOopNotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), second); - ssPop(1); - popToReg(ssTop(), first); - ssPop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopSmallIntegerToInt32 */ -static sqInt -genLowcodeOopSmallIntegerToInt32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genConvertSmallIntegerToIntegerInReg(object); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopSmallIntegerToInt64 */ -static sqInt -genLowcodeOopSmallIntegerToInt64(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genConvertSmallIntegerToIntegerInReg(object); - ssPushNativeRegister(object); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToBoolean32 */ -static sqInt -genLowcodeOopToBoolean32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - annotateobjRef(gSubCwR(falseObject(), object), falseObject()); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToBoolean64 */ -static sqInt -genLowcodeOopToBoolean64(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - annotateobjRef(gSubCwR(falseObject(), object), falseObject()); - ssPushNativeRegister(object); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToFloat32 */ -static sqInt -genLowcodeOopToFloat32(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoFloat32(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToFloat64 */ -static sqInt -genLowcodeOopToFloat64(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoFloat64(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToInt32 */ -static sqInt -genLowcodeOopToInt32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToInt32(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToInt64 */ -static sqInt -genLowcodeOopToInt64(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToInt64(object); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToPointer */ -static sqInt -genLowcodeOopToPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcOopToPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToPointerReinterpret */ -static sqInt -genLowcodeOopToPointerReinterpret(void) -{ - sqInt object; - sqInt pointer; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((pointer = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToUInt32 */ -static sqInt -genLowcodeOopToUInt32(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToUInt32(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToUInt64 */ -static sqInt -genLowcodeOopToUInt64(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToUInt64(object); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOr32 */ -static sqInt -genLowcodeOr32(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOr64 */ -static sqInt -genLowcodeOr64(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, second, first); - ssPushNativeRegister(first); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePerformCallout */ -static sqInt -genLowcodePerformCallout(void) -{ - AbstractInstruction *abstractInstruction; - AbstractInstruction *abstractInstruction1; - AbstractInstruction *anInstruction; - - callSwitchToCStack(); - /* begin checkLiteral:forInstruction: */ - anInstruction = genoperandoperand(MoveCwR, extA, TempReg); - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin annotateBytecode: */ - abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); - (abstractInstruction1->annotation = HasBytecodePC); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePerformCalloutIndirect */ -static sqInt -genLowcodePerformCalloutIndirect(void) -{ - AbstractInstruction *abstractInstruction; - AbstractInstruction *abstractInstruction1; - - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - callSwitchToCStack(); - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin annotateBytecode: */ - abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); - (abstractInstruction1->annotation = HasBytecodePC); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePin */ -static sqInt -genLowcodePin(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePlaftormCode */ -static sqInt -genLowcodePlaftormCode(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddConstantOffset */ -static sqInt -genLowcodePointerAddConstantOffset(void) -{ - AbstractInstruction *anInstruction; - sqInt base; - sqInt offset; - - offset = extB; - if (((base = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((base = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (base == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AddCqR, offset, base); - ssPushNativeRegister(base); - extB = 0; - numExtB = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddOffset32 */ -static sqInt -genLowcodePointerAddOffset32(void) -{ - sqInt base; - sqInt offset; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((base = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << offset)))) == NoReg) { - ssAllocateRequiredReg((base = Arg1Reg)); - } - if ((offset == ReceiverResultReg) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, offset, base); - ssPushNativeRegister(base); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddOffset64 */ -static sqInt -genLowcodePointerAddOffset64(void) -{ - sqInt base; - sqInt offset; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((base = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << offset)))) == NoReg) { - ssAllocateRequiredReg((base = Arg1Reg)); - } - if ((offset == ReceiverResultReg) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, offset, base); - ssPushNativeRegister(base); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerEqual */ -static sqInt -genLowcodePointerEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerNotEqual */ -static sqInt -genLowcodePointerNotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToInt32 */ -static sqInt -genLowcodePointerToInt32(void) -{ - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssPushNativeRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToInt64 */ -static sqInt -genLowcodePointerToInt64(void) -{ - sqInt pointer; - sqInt result; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((result = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssPushNativeRegister(pointer); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToOop */ -static sqInt -genLowcodePointerToOop(void) -{ - sqInt pointer; - sqInt pointerClassLiteral; - - pointerClassLiteral = getLiteral(extA); - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssFlushAll(); - genLcPointerToOopclass(pointer, pointerClassLiteral); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToOopReinterprer */ -static sqInt -genLowcodePointerToOopReinterprer(void) -{ - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssPushRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopFloat32 */ -static sqInt -genLowcodePopFloat32(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopFloat64 */ -static sqInt -genLowcodePopFloat64(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopInt32 */ -static sqInt -genLowcodePopInt32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopInt64 */ -static sqInt -genLowcodePopInt64(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopMultipleNative */ -static sqInt -genLowcodePopMultipleNative(void) -{ - ssPopNativeSize(extA); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopPointer */ -static sqInt -genLowcodePopPointer(void) -{ - sqInt pointerValue; - - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerValue == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultFloat32 */ -static sqInt -genLowcodePushCalloutResultFloat32(void) -{ - cFloatResultToRs(backEnd, DPFPReg0); - ssPushNativeRegisterSingleFloat(DPFPReg0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultFloat64 */ -static sqInt -genLowcodePushCalloutResultFloat64(void) -{ - cFloatResultToRd(backEnd, DPFPReg0); - ssPushNativeRegisterDoubleFloat(DPFPReg0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultInt32 */ -static sqInt -genLowcodePushCalloutResultInt32(void) -{ - sqInt reg1; - - /* begin MoveR:R: */ - reg1 = RAX; - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - ssPushNativeRegister(ReceiverResultReg); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultInt64 */ -static sqInt -genLowcodePushCalloutResultInt64(void) -{ - sqInt reg12; - - /* begin MoveR:R: */ - reg12 = RAX; - genoperandoperand(MoveRR, reg12, ReceiverResultReg); - ssPushNativeRegister(ReceiverResultReg); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultPointer */ -static sqInt -genLowcodePushCalloutResultPointer(void) -{ - sqInt reg1; - - /* begin MoveR:R: */ - reg1 = RAX; - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - ssPushNativeRegister(ReceiverResultReg); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushConstantUInt32 */ -static sqInt -genLowcodePushConstantUInt32(void) -{ - sqInt constant; - - constant = extA; - ssPushNativeConstantInt32(constant); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushConstantUInt64 */ -static sqInt -genLowcodePushConstantUInt64(void) -{ - sqInt constant; - - constant = extA; - ssPushNativeConstantInt64(constant); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushNullPointer */ -static sqInt -genLowcodePushNullPointer(void) -{ - ssPushNativeConstantPointer(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOne32 */ -static sqInt -genLowcodePushOne32(void) -{ - ssPushNativeConstantInt32(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOne64 */ -static sqInt -genLowcodePushOne64(void) -{ - ssPushNativeConstantInt64(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOneFloat32 */ -static sqInt -genLowcodePushOneFloat32(void) -{ - ssPushNativeConstantFloat32(1.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOneFloat64 */ -static sqInt -genLowcodePushOneFloat64(void) -{ - ssPushNativeConstantFloat64(1.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalFloat32 */ -static sqInt -genLowcodePushPhysicalFloat32(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalFloat64 */ -static sqInt -genLowcodePushPhysicalFloat64(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalInt32 */ -static sqInt -genLowcodePushPhysicalInt32(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalInt64 */ -static sqInt -genLowcodePushPhysicalInt64(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalPointer */ -static sqInt -genLowcodePushPhysicalPointer(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushSessionIdentifier */ -static sqInt -genLowcodePushSessionIdentifier(void) -{ - ssPushNativeConstantInt32(getThisSessionID()); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZero32 */ -static sqInt -genLowcodePushZero32(void) -{ - ssPushNativeConstantInt32(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZero64 */ -static sqInt -genLowcodePushZero64(void) -{ - ssPushNativeConstantInt64(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZeroFloat32 */ -static sqInt -genLowcodePushZeroFloat32(void) -{ - ssPushNativeConstantFloat32(0.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZeroFloat64 */ -static sqInt -genLowcodePushZeroFloat64(void) -{ - ssPushNativeConstantFloat64(0.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRem32 */ -static sqInt -genLowcodeRem32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRem64 */ -static sqInt -genLowcodeRem64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRightShift32 */ -static sqInt -genLowcodeRightShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin LogicalShiftRightR:R: */ - genoperandoperand(LogicalShiftRightRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRightShift64 */ -static sqInt -genLowcodeRightShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << shiftAmount)) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend32From16 */ -static sqInt -genLowcodeSignExtend32From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend32From8 */ -static sqInt -genLowcodeSignExtend32From8(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From16 */ -static sqInt -genLowcodeSignExtend64From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From32 */ -static sqInt -genLowcodeSignExtend64From32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((result = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend32R:R: */ - genoperandoperand(SignExtend32RR, value, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From8 */ -static sqInt -genLowcodeSignExtend64From8(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((result = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend16R:R: */ - genoperandoperand(ZeroExtend16RR, value, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSmallInt32ToOop */ -static sqInt -genLowcodeSmallInt32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - genConvertIntegerToSmallIntegerInReg(value); - ssPushRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreFloat32ToMemory */ -static sqInt -genLowcodeStoreFloat32ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt floatValue; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRsM32r, floatValue, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreFloat64ToMemory */ -static sqInt -genLowcodeStoreFloat64ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt doubleValue; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), doubleValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, doubleValue, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt16ToMemory */ -static sqInt -genLowcodeStoreInt16ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM16r, TempReg, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt32ToMemory */ -static sqInt -genLowcodeStoreInt32ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, value, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt64ToMemory */ -static sqInt -genLowcodeStoreInt64ToMemory(void) -{ - AbstractInstruction *anInstruction2; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - assert(BytesPerWord == 8); - /* begin gen:operand:quickConstant:operand: */ - anInstruction2 = genoperandoperandoperand(MoveRMwr, value, 0, pointer); - - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt8ToMemory */ -static sqInt -genLowcodeStoreInt8ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM8r, TempReg, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalFloat32 */ -static sqInt -genLowcodeStoreLocalFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRsM32r, value, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalFloat64 */ -static sqInt -genLowcodeStoreLocalFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, value, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt16 */ -static sqInt -genLowcodeStoreLocalInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - loadNativeLocalAddressto(baseOffset, value); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM16r, TempReg, 0, value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt32 */ -static sqInt -genLowcodeStoreLocalInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, value, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt64 */ -static sqInt -genLowcodeStoreLocalInt64(void) -{ - AbstractInstruction *anInstruction2; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - assert(BytesPerWord == 8); - /* begin gen:operand:quickConstant:operand: */ - anInstruction2 = genoperandoperandoperand(MoveRMwr, value, 0, TempReg); - - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt8 */ -static sqInt -genLowcodeStoreLocalInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - loadNativeLocalAddressto(baseOffset, value); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM8r, TempReg, 0, value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalPointer */ -static sqInt -genLowcodeStoreLocalPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerValue; - - baseOffset = extA; - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerValue == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, pointerValue, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreObjectField */ -static sqInt -genLowcodeStoreObjectField(void) -{ - sqInt fieldIndex; - sqInt object; - sqInt value; - - fieldIndex = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), value); - ssPop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcStoreobjectfield(value, object, fieldIndex); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreObjectFieldAt */ -static sqInt -genLowcodeStoreObjectFieldAt(void) -{ - sqInt fieldIndex; - sqInt object; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((fieldIndex = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((fieldIndex = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << value)) | (1ULL << fieldIndex)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (fieldIndex == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), value); - ssPop(1); - nativePopToReg(ssNativeTop(), fieldIndex); - ssNativePop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcStoreobjectat(value, object, fieldIndex); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStorePointerToMemory */ -static sqInt -genLowcodeStorePointerToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt memoryPointer; - sqInt pointerValue; - - if (((memoryPointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((memoryPointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointerValue = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << memoryPointer)))) == NoReg) { - ssAllocateRequiredReg((pointerValue = Arg1Reg)); - } - if ((memoryPointer == ReceiverResultReg) - || (pointerValue == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), memoryPointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, pointerValue, 0, memoryPointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSub32 */ -static sqInt -genLowcodeSub32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSub64 */ -static sqInt -genLowcodeSub64(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, second, first); - ssPushNativeRegister(first); - - return 0; -} - - -/* Lowcode instruction generator dispatch */ - - /* StackToRegisterMappingCogit>>#genLowcodeTrinaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeTrinaryInlinePrimitive(sqInt prim) -{ switch (prim) { case 0: - return genLowcodeOopEqual(); + /* begin genLowcodeOopEqual */ + rOopTop = (rOopNext = NoReg); + rResult = NoReg; + oopTopRegisterMask = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask = 1ULL << rOopNext; + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(oopTopRegisterMask); + } + if (rOopNext == NoReg) { + rOopNext = allocateRegNotConflictingWith(1ULL << rOopTop); + } + rResult = allocateRegNotConflictingWith((1ULL << rOopTop) | (1ULL << rOopNext)); + assert(!(((rOopTop == NoReg) + || ((rOopNext == NoReg) + || (rResult == NoReg))))); + second = rOopTop; + first = rOopNext; + value = rResult; + + popToReg(ssTop(), second); + ssPop(1); + popToReg(ssTop(), first); + ssPop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second, first); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 1, first); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, first); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first); + return 0; + + case 1: + /* begin genLowcodeOopNotEqual */ + rOopTop1 = (rOopNext1 = NoReg); + oopTopRegisterMask1 = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext1 = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask1 = 1ULL << rOopNext1; + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(oopTopRegisterMask1); + } + if (rOopNext1 == NoReg) { + rOopNext1 = allocateRegNotConflictingWith(1ULL << rOopTop1); + } + assert(!(((rOopTop1 == NoReg) + || (rOopNext1 == NoReg)))); + second1 = rOopTop1; + first1 = rOopNext1; - case 1: - return genLowcodeOopNotEqual(); + popToReg(ssTop(), second1); + ssPop(1); + popToReg(ssTop(), first1); + ssPop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second1, first1); + /* begin JumpZero: */ + falseJump1 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(MoveCqR, 1, first1); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, first1); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first1); + return 0; case 2: - return genLowcodeStoreObjectField(); + /* begin genLowcodeStoreObjectField */ + fieldIndex = extA; + /* begin allocateRegistersForLowcodeOop2: */ + rOopTop2 = (rOopNext2 = NoReg); + oopTopRegisterMask2 = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext2 = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask2 = 1ULL << rOopNext2; + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(oopTopRegisterMask2); + } + if (rOopNext2 == NoReg) { + rOopNext2 = allocateRegNotConflictingWith(1ULL << rOopTop2); + } + assert(!(((rOopTop2 == NoReg) + || (rOopNext2 == NoReg)))); + value1 = rOopTop2; + object = rOopNext2; + + popToReg(ssTop(), value1); + ssPop(1); + popToReg(ssTop(), object); + ssPop(1); + genLcStoreobjectfield(value1, object, fieldIndex); + extA = 0; + return 0; case 3: - return genLowcodeStoreObjectFieldAt(); + /* begin genLowcodeStoreObjectFieldAt */ + rTop = (rOopTop3 = (rOopNext3 = NoReg)); + oopTopRegisterMask3 = (topRegisterMask = 0); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + /* begin registerMaskFor: */ + oopTopRegisterMask3 = 1ULL << rTop; + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask = 1ULL << rOopTop3; + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext3 = registerOrNone(ssValue(1)); + topRegisterMask = topRegisterMask | (1ULL << rOopNext3); + oopTopRegisterMask3 = oopTopRegisterMask3 | (1ULL << rOopNext3); + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegisterMask); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(oopTopRegisterMask3); + } + if (rOopNext3 == NoReg) { + rOopNext3 = allocateRegNotConflictingWith((1ULL << rTop) | (1ULL << rOopTop3)); + } + assert(!(((rTop == NoReg) + || ((rOopTop3 == NoReg) + || (rOopNext3 == NoReg))))); + fieldIndex1 = rTop; + value2 = rOopTop3; + object1 = rOopNext3; + + popToReg(ssTop(), value2); + ssPop(1); + nativePopToReg(ssNativeTop(), fieldIndex1); + ssNativePop(1); + popToReg(ssTop(), object1); + ssPop(1); + genLcStoreobjectat(value2, object1, fieldIndex1); + return 0; default: return EncounteredUnknownBytecode; @@ -37317,954 +31159,1941 @@ genLowcodeTrinaryInlinePrimitive(sqInt prim) } -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate32To16 */ -static sqInt -genLowcodeTruncate32To16(void) -{ - AbstractInstruction *anInstruction; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFFFF, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate32To8 */ -static sqInt -genLowcodeTruncate32To8(void) -{ - AbstractInstruction *anInstruction; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFF, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To16 */ -static sqInt -genLowcodeTruncate64To16(void) -{ - AbstractInstruction *anInstruction1; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(AndCqR, 0xFFFF, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To32 */ -static sqInt -genLowcodeTruncate64To32(void) -{ - AbstractInstruction *anInstruction; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFFFFFFFFU, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To8 */ -static sqInt -genLowcodeTruncate64To8(void) -{ - AbstractInstruction *anInstruction1; - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((result = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(AndCqR, 0xFF, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUdiv32 */ -static sqInt -genLowcodeUdiv32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, first, second); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUdiv64 */ -static sqInt -genLowcodeUdiv64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32Great */ -static sqInt -genLowcodeUint32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpBelowOrEqual: */ - falseJump = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32GreatEqual */ -static sqInt -genLowcodeUint32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpBelow: */ - falseJump = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32Less */ -static sqInt -genLowcodeUint32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpAboveOrEqual: */ - falseJump = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ +/* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeUint32LessEqual */ -static sqInt -genLowcodeUint32LessEqual(void) + /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive2: */ +static sqInt NoDbgRegParms +genLowcodeUnaryInlinePrimitive2(sqInt prim) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction210; + AbstractInstruction *anInstruction211; + AbstractInstruction *anInstruction212; + AbstractInstruction *anInstruction213; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction25; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction27; + AbstractInstruction *anInstruction28; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction33; + AbstractInstruction *anInstruction34; + AbstractInstruction *anInstruction35; + AbstractInstruction *anInstruction37; + AbstractInstruction *anInstruction38; + AbstractInstruction *anInstruction39; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction40; + AbstractInstruction *anInstruction41; + AbstractInstruction *anInstruction43; + AbstractInstruction *anInstruction44; + AbstractInstruction *anInstruction45; + AbstractInstruction *anInstruction46; + AbstractInstruction *anInstruction48; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt baseOffset; + sqInt baseOffset1; + sqInt baseOffset10; + sqInt baseOffset11; + sqInt baseOffset12; + sqInt baseOffset13; + sqInt baseOffset14; + sqInt baseOffset15; + sqInt baseOffset16; + sqInt baseOffset17; + sqInt baseOffset18; + sqInt baseOffset19; + sqInt baseOffset2; + sqInt baseOffset20; + sqInt baseOffset21; + sqInt baseOffset22; + sqInt baseOffset23; + sqInt baseOffset3; + sqInt baseOffset4; + sqInt baseOffset5; + sqInt baseOffset6; + sqInt baseOffset7; + sqInt baseOffset8; + sqInt baseOffset9; + sqInt classOop; + sqInt classOop1; + sqInt classOop2; + sqInt classOopValue; + sqInt classOopValue1; + sqInt classOopValue2; AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + AbstractInstruction * contJump4; + AbstractInstruction * contJump5; + AbstractInstruction * contJump6; + AbstractInstruction * contJump7; + sqInt doubleValue; + sqInt doubleValue1; + sqInt doubleValueValue; + sqInt doubleValueValue1; AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump3; + AbstractInstruction * falseJump4; + AbstractInstruction * falseJump5; + AbstractInstruction * falseJump6; + AbstractInstruction * falseJump7; + sqInt fieldIndex; + sqInt fieldIndexValue; sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpAbove: */ - falseJump = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToFloat32 */ -static sqInt -genLowcodeUint32ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rs: */ - genoperandoperand(ConvertRRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToFloat64 */ -static sqInt -genLowcodeUint32ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rd: */ - genoperandoperand(ConvertRRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToOop */ -static sqInt -genLowcodeUint32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcUInt32ToOop(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64Great */ -static sqInt -genLowcodeUint64Great(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64GreatEqual */ -static sqInt -genLowcodeUint64GreatEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64Less */ -static sqInt -genLowcodeUint64Less(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64LessEqual */ -static sqInt -genLowcodeUint64LessEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToFloat32 */ -static sqInt -genLowcodeUint64ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToFloat64 */ -static sqInt -genLowcodeUint64ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToOop */ -static sqInt -genLowcodeUint64ToOop(void) -{ + sqInt first1; + sqInt first10; + sqInt first11; + sqInt first2; + sqInt first3; + sqInt first4; + sqInt first5; + sqInt first6; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue10; + sqInt firstValue11; + sqInt firstValue2; + sqInt firstValue3; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue6; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt floatValue; + sqInt floatValue1; + sqInt floatValue2; + sqInt floatValue3; + sqInt floatValue4; + sqInt floatValue5; + sqInt floatValue6; + sqInt floatValueValue; + sqInt floatValueValue1; + sqInt floatValueValue2; + sqInt floatValueValue3; + sqInt floatValueValue4; + sqInt floatValueValue5; + sqInt floatValueValue6; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frResult4; + sqInt frResult5; + sqInt frResult6; + sqInt frResult7; + sqInt frResult8; + sqInt frResult9; + sqInt frTop; + sqInt frTop1; + sqInt frTop2; + sqInt frTop3; + sqInt frTop4; + sqInt indexableSize; + sqInt indexableSize1; + sqInt indexableSizeValue; + sqInt int32Result; + sqInt int32ResultValue; + sqInt int64Result; + sqInt int64Result1; + sqInt int64Result2; + sqInt int64ResultValue; + sqInt int64ResultValue1; + sqInt int64ResultValue2; sqInt object; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcUInt64ToOop(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUmul32 */ -static sqInt -genLowcodeUmul32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUmul64 */ -static sqInt -genLowcodeUmul64(void) -{ - sqInt first; + sqInt object1; + sqInt object2; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue2; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointer6; + sqInt pointer7; + sqInt pointer8; + sqInt pointerResult; + sqInt pointerResult1; + sqInt pointerResultValue; + sqInt pointerResultValue1; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValue8; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg11; + sqInt reg13; + sqInt reg14; + sqInt reg2; + sqInt reg3; + sqInt reg4; + sqInt reg5; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt reg9; sqInt result; + sqInt result1; + sqInt result2; + sqInt result3; + sqInt result4; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue2; + sqInt resultValue3; + sqInt resultValue4; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext11; + sqInt rNext13; + sqInt rNext15; + sqInt rNext16; + sqInt rNext2; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rOopResult; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop2; + sqInt rOopTop3; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult11; + sqInt rResult110; + sqInt rResult111; + sqInt rResult112; + sqInt rResult113; + sqInt rResult114; + sqInt rResult12; + sqInt rResult13; + sqInt rResult14; + sqInt rResult15; + sqInt rResult16; + sqInt rResult17; + sqInt rResult18; + sqInt rResult19; + sqInt rResult2; + sqInt rResult20; + sqInt rResult21; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult25; + sqInt rResult26; + sqInt rResult27; + sqInt rResult28; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop11; + sqInt rTop110; + sqInt rTop111; + sqInt rTop12; + sqInt rTop13; + sqInt rTop14; + sqInt rTop16; + sqInt rTop17; + sqInt rTop18; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; sqInt second; + sqInt second1; + sqInt second10; + sqInt second11; + sqInt second2; + sqInt second3; + sqInt second4; + sqInt second5; + sqInt second6; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue10; + sqInt secondValue11; + sqInt secondValue2; + sqInt secondValue3; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue6; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt topRegisterMask; + sqInt topRegisterMask1; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask2; + sqInt topRegistersMask3; + sqInt topRegistersMask4; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value17; + sqInt value18; + sqInt value19; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value27; + sqInt value28; + sqInt value29; + sqInt value3; + sqInt value30; + sqInt value31; + sqInt value32; + sqInt value33; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue17; + sqInt valueValue18; + sqInt valueValue19; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue27; + sqInt valueValue28; + sqInt valueValue29; + sqInt valueValue3; + sqInt valueValue30; + sqInt valueValue31; + sqInt valueValue32; + sqInt valueValue33; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator dispatch */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive2: */ -static sqInt NoDbgRegParms -genLowcodeUnaryInlinePrimitive2(sqInt prim) -{ switch (prim) { case 60: - return genLowcodeFloat64ToFloat32(); + /* begin genLowcodeFloat64ToFloat32 */ + topRegistersMask = 0; + frTop = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(topRegistersMask); + } + assert(!((frTop == NoReg))); + floatValue = frTop; + + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin ConvertRd:Rs: */ + genoperandoperand(ConvertRdRs, floatValue, floatValue); + ssPushNativeRegisterSingleFloat(floatValue); + return 0; case 61: - return genLowcodeFloat64ToInt32(); + /* begin genLowcodeFloat64ToInt32 */ + frTop1 = NoReg; + + /* Float argument */ + rResult = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(0); + assert(!(((frTop1 == NoReg) + || (rResult == NoReg)))); + floatValue1 = frTop1; + int32Result = rResult; + + nativePopToReg(ssNativeTop(), floatValue1); + ssNativePop(1); + /* begin ConvertRd:R: */ + genoperandoperand(ConvertRdR, floatValue1, int32Result); + ssPushNativeRegister(int32Result); + return 0; case 0x3E: - return genLowcodeFloat64ToInt64(); + /* begin genLowcodeFloat64ToInt64 */ + frTop2 = NoReg; + + /* Float argument */ + rResult1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(0); + assert(!(((frTop2 == NoReg) + || (rResult1 == NoReg)))); + floatValue2 = frTop2; + int64Result = rResult1; + + nativePopToReg(ssNativeTop(), floatValue2); + ssNativePop(1); + abort(); + return 0; case 0x3F: - return genLowcodeFloat64ToUInt32(); + /* begin genLowcodeFloat64ToUInt32 */ + frTop3 = NoReg; + + /* Float argument */ + rResult2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(0); + assert(!(((frTop3 == NoReg) + || (rResult2 == NoReg)))); + floatValue3 = frTop3; + int64Result1 = rResult2; + + nativePopToReg(ssNativeTop(), floatValue3); + ssNativePop(1); + /* begin ConvertRd:R: */ + genoperandoperand(ConvertRdR, floatValue3, int64Result1); + ssPushNativeRegister(int64Result1); + return 0; case 64: - return genLowcodeFloat64ToUInt64(); + /* begin genLowcodeFloat64ToUInt64 */ + frTop4 = NoReg; + + /* Float argument */ + rResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop4 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop4 == NoReg) { + frTop4 = allocateFloatRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(0); + assert(!(((frTop4 == NoReg) + || (rResult3 == NoReg)))); + floatValue4 = frTop4; + int64Result2 = rResult3; + + nativePopToReg(ssNativeTop(), floatValue4); + ssNativePop(1); + abort(); + return 0; case 65: - return genLowcodeFree(); + /* begin genLowcodeFree */ + rTop28 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop28 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(0); + } + assert(!((rTop28 == NoReg))); + pointer7 = rTop28; + + nativePopToReg(ssNativeTop(), pointer7); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (pointer7 != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointer7, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceFreeTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + return 0; case 66: - return genLowcodeInstantiateIndexable32Oop(); + /* begin genLowcodeInstantiateIndexable32Oop */ + rTop29 = (rOopTop1 = NoReg); + rOopResult = NoReg; + topRegisterMask1 = 0; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask1 = 1ULL << rOopTop1; + } + if (rTop29 == NoReg) { + rTop29 = allocateRegNotConflictingWith(topRegisterMask1); + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(1ULL << rTop29); + } + rOopResult = allocateRegNotConflictingWith((1ULL << rTop29) | (1ULL << rOopTop1)); + assert(!(((rTop29 == NoReg) + || ((rOopTop1 == NoReg) + || (rOopResult == NoReg))))); + indexableSize = rTop29; + classOop = rOopTop1; + object1 = rOopResult; + + nativePopToReg(ssNativeTop(), indexableSize); + ssNativePop(1); + popToReg(ssTop(), classOop); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOopindexableSize(classOop, indexableSize); + return 0; case 67: - return genLowcodeInstantiateIndexableOop(); + /* begin genLowcodeInstantiateIndexableOop */ + indexableSize1 = extA; + /* begin allocateRegistersForLowcodeOopResultOop: */ + rOopTop2 = NoReg; + rResult28 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(0); + } + rResult28 = allocateRegNotConflictingWith(1ULL << rOopTop2); + assert(!(((rOopTop2 == NoReg) + || (rResult28 == NoReg)))); + classOop1 = rOopTop2; + object2 = rResult28; + + popToReg(ssTop(), classOop1); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOopconstantIndexableSize(classOop1, indexableSize1); + extA = 0; + return 0; case 68: - return genLowcodeInstantiateOop(); + /* begin genLowcodeInstantiateOop */ + rOopTop3 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop3 == NoReg))); + classOop2 = rOopTop3; + + popToReg(ssTop(), classOop2); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOop(classOop2); + return 0; case 69: - return genLowcodeInt32Equal(); + /* begin genLowcodeInt32Equal */ + topRegistersMask1 = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1ULL << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1ULL << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second, first); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 1, first); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, first); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first); + return 0; case 70: - return genLowcodeInt32Great(); + /* begin genLowcodeInt32Great */ + topRegistersMask2 = 0; + rTop1 = (rNext1 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop1 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext1 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1ULL << reg1; + } + } + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1ULL << rTop1); + } + assert(!(((rTop1 == NoReg) + || (rNext1 == NoReg)))); + second1 = rTop1; + first1 = rNext1; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second1, first1); + /* begin JumpLessOrEqual: */ + falseJump1 = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(MoveCqR, 1, first1); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, first1); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first1); + return 0; case 71: - return genLowcodeInt32GreatEqual(); + /* begin genLowcodeInt32GreatEqual */ + topRegistersMask3 = 0; + rTop2 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1ULL << reg2; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1ULL << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext2 == NoReg)))); + second2 = rTop2; + first2 = rNext2; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second2, first2); + /* begin JumpLess: */ + falseJump2 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(MoveCqR, 1, first2); + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperand(MoveCqR, 0, first2); + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first2); + return 0; case 72: - return genLowcodeInt32Less(); + /* begin genLowcodeInt32Less */ + topRegistersMask4 = 0; + rTop3 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1ULL << reg3; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1ULL << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + second3 = rTop3; + first3 = rNext3; + + nativePopToReg(ssNativeTop(), second3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first3); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second3, first3); + /* begin JumpGreaterOrEqual: */ + falseJump3 = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperand(MoveCqR, 1, first3); + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperand(MoveCqR, 0, first3); + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first3); + return 0; case 73: - return genLowcodeInt32LessEqual(); + /* begin genLowcodeInt32LessEqual */ + topRegistersMask5 = 0; + rTop4 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1ULL << reg4; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1ULL << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext4 == NoReg)))); + second4 = rTop4; + first4 = rNext4; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second4, first4); + /* begin JumpGreater: */ + falseJump4 = genConditionalBranchoperand(JumpGreater, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperand(MoveCqR, 1, first4); + /* begin Jump: */ + contJump4 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperand(MoveCqR, 0, first4); + jmpTarget(contJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first4); + return 0; case 74: - return genLowcodeInt32NotEqual(); + /* begin genLowcodeInt32NotEqual */ + topRegistersMask6 = 0; + rTop5 = (rNext5 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext5 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1ULL << reg5; + } + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext5 == NoReg) { + rNext5 = allocateRegNotConflictingWith(1ULL << rTop5); + } + assert(!(((rTop5 == NoReg) + || (rNext5 == NoReg)))); + second5 = rTop5; + first5 = rNext5; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second5, first5); + /* begin JumpZero: */ + falseJump5 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperand(MoveCqR, 1, first5); + /* begin Jump: */ + contJump5 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperand(MoveCqR, 0, first5); + jmpTarget(contJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first5); + return 0; case 75: - return genLowcodeInt32ToFloat32(); + /* begin genLowcodeInt32ToFloat32 */ + rTop6 = NoReg; + frResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop6 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop6 == NoReg) + || (frResult == NoReg)))); + value = rTop6; + result = frResult; + + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin ConvertR:Rs: */ + genoperandoperand(ConvertRRs, value, result); + ssPushNativeRegisterSingleFloat(result); + return 0; case 76: - return genLowcodeInt32ToFloat64(); + /* begin genLowcodeInt32ToFloat64 */ + rTop7 = NoReg; + frResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop7 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop7 == NoReg) + || (frResult1 == NoReg)))); + value1 = rTop7; + result1 = frResult1; + + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + /* begin ConvertR:Rd: */ + genoperandoperand(ConvertRRd, value1, result1); + ssPushNativeRegisterDoubleFloat(result1); + return 0; case 77: - return genLowcodeInt32ToPointer(); + /* begin genLowcodeInt32ToPointer */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value2 = rTop8; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + ssPushNativeRegister(value2); + return 0; case 78: - return genLowcodeInt64Equal(); + /* begin genLowcodeInt64Equal */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask7 = 0; + rTop11 = (rNext11 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop11 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext11 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext11 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext11 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1ULL << reg6; + } + } + if (rTop11 == NoReg) { + rTop11 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext11 == NoReg) { + rNext11 = allocateRegNotConflictingWith(1ULL << rTop11); + } + assert(!(((rTop11 == NoReg) + || (rNext11 == NoReg)))); + second6 = rTop11; + first6 = rNext11; + + nativePopToReg(ssNativeTop(), second6); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first6); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second6, first6); + /* begin JumpNonZero: */ + falseJump6 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperand(MoveCqR, 1, first6); + /* begin Jump: */ + contJump6 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperand(MoveCqR, 0, first6); + jmpTarget(contJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first6); + + return 0; case 79: - return genLowcodeInt64Great(); + /* begin genLowcodeInt64Great */ + topRegistersMask8 = 0; + rTop10 = (rNext7 = NoReg); + rResult4 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext7 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1ULL << reg7; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1ULL << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext7 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1ULL << rTop10) | (1ULL << rNext7)); + assert(!((rResult4 == NoReg))); + second7 = rTop10; + first7 = rNext7; + value3 = rResult4; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + abort(); + return 0; case 80: - return genLowcodeInt64GreatEqual(); + /* begin genLowcodeInt64GreatEqual */ + topRegistersMask9 = 0; + rTop12 = (rNext8 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop12 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext8 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1ULL << reg8; + } + } + if (rTop12 == NoReg) { + rTop12 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1ULL << rTop12); + } + assert(!(((rTop12 == NoReg) + || (rNext8 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1ULL << rTop12) | (1ULL << rNext8)); + assert(!((rResult5 == NoReg))); + second8 = rTop12; + first8 = rNext8; + value4 = rResult5; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + abort(); + return 0; case 81: - return genLowcodeInt64Less(); + /* begin genLowcodeInt64Less */ + topRegistersMask10 = 0; + rTop13 = (rNext9 = NoReg); + rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop13 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext9 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask10 = 1ULL << reg9; + } + } + if (rTop13 == NoReg) { + rTop13 = allocateRegNotConflictingWith(topRegistersMask10); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1ULL << rTop13); + } + assert(!(((rTop13 == NoReg) + || (rNext9 == NoReg)))); + rResult6 = allocateFloatRegNotConflictingWith((1ULL << rTop13) | (1ULL << rNext9)); + assert(!((rResult6 == NoReg))); + second9 = rTop13; + first9 = rNext9; + value5 = rResult6; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + abort(); + return 0; case 82: - return genLowcodeInt64LessEqual(); + /* begin genLowcodeInt64LessEqual */ + topRegistersMask11 = 0; + rTop14 = (rNext10 = NoReg); + rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop14 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1ULL << reg10; + } + } + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(topRegistersMask11); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1ULL << rTop14); + } + assert(!(((rTop14 == NoReg) + || (rNext10 == NoReg)))); + rResult7 = allocateFloatRegNotConflictingWith((1ULL << rTop14) | (1ULL << rNext10)); + assert(!((rResult7 == NoReg))); + second10 = rTop14; + first10 = rNext10; + value6 = rResult7; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + abort(); + return 0; case 83: - return genLowcodeInt64NotEqual(); + /* begin genLowcodeInt64NotEqual */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask12 = 0; + rTop16 = (rNext13 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop16 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg11 = (rNext13 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1ULL << reg11; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask12); + } + if (rNext13 == NoReg) { + rNext13 = allocateRegNotConflictingWith(1ULL << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext13 == NoReg)))); + second11 = rTop16; + first11 = rNext13; + + nativePopToReg(ssNativeTop(), second11); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first11); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second11, first11); + /* begin JumpZero: */ + falseJump7 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperand(MoveCqR, 1, first11); + /* begin Jump: */ + contJump7 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperand(MoveCqR, 0, first11); + jmpTarget(contJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first11); + + return 0; case 84: - return genLowcodeInt64ToFloat32(); + /* begin genLowcodeInt64ToFloat32 */ + rTop17 = NoReg; + frResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop17 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop17 == NoReg) + || (frResult2 == NoReg)))); + value7 = rTop17; + result2 = frResult2; + + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + abort(); + return 0; case 85: - return genLowcodeInt64ToFloat64(); + /* begin genLowcodeInt64ToFloat64 */ + rTop18 = NoReg; + frResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop18 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop18 == NoReg) { + rTop18 = allocateRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop18 == NoReg) + || (frResult3 == NoReg)))); + value8 = rTop18; + result3 = frResult3; + + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + abort(); + return 0; case 86: - return genLowcodeInt64ToPointer(); + /* begin genLowcodeInt64ToPointer */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop110 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop110 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop110 == NoReg) { + rTop110 = allocateRegNotConflictingWith(0); + } + assert(!((rTop110 == NoReg))); + value9 = rTop110; + + nativePopToReg(ssNativeTop(), value9); + ssNativePop(1); + ssPushNativeRegister(value9); + + return 0; case 87: - return genLowcodeLeftShift32(); + /* begin genLowcodeLeftShift32 */ + topRegistersMask14 = 0; + rTop20 = (rNext15 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext15 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1ULL << reg13; + } + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(topRegistersMask14); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1ULL << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext15 == NoReg)))); + shiftAmount = rTop20; + value10 = rNext15; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + /* begin LogicalShiftLeftR:R: */ + genoperandoperand(LogicalShiftLeftRR, shiftAmount, value10); + ssPushNativeRegister(value10); + return 0; case 88: - return genLowcodeLeftShift64(); + /* begin genLowcodeLeftShift64 */ + topRegistersMask15 = 0; + rTop21 = (rNext16 = NoReg); + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop21 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext16 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext16 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (rNext16 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1ULL << reg14; + } + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(topRegistersMask15); + } + if (rNext16 == NoReg) { + rNext16 = allocateRegNotConflictingWith(1ULL << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext16 == NoReg)))); + rResult8 = allocateFloatRegNotConflictingWith((1ULL << rTop21) | (1ULL << rNext16)); + assert(!((rResult8 == NoReg))); + shiftAmount1 = rTop21; + value11 = rNext16; + result4 = rResult8; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value11); + ssNativePop(1); + abort(); + return 0; case 89: - return genLowcodeLoadArgumentAddress(); + /* begin genLowcodeLoadArgumentAddress */ + baseOffset = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult9 = NoReg; + rResult9 = allocateRegNotConflictingWith(0); + assert(!((rResult9 == NoReg))); + pointer = rResult9; + + loadNativeArgumentAddressto(baseOffset, pointer); + ssPushNativeRegister(pointer); + extA = 0; + return 0; case 90: - return genLowcodeLoadArgumentFloat32(); + /* begin genLowcodeLoadArgumentFloat32 */ + baseOffset1 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult4 = NoReg; + frResult4 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult4 == NoReg))); + floatValue5 = frResult4; + + loadNativeArgumentAddressto(baseOffset1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue5); + ssPushNativeRegisterSingleFloat(floatValue5); + extA = 0; + return 0; case 91: - return genLowcodeLoadArgumentFloat64(); + /* begin genLowcodeLoadArgumentFloat64 */ + baseOffset2 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult5 = NoReg; + frResult5 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult5 == NoReg))); + doubleValue = frResult5; + + loadNativeArgumentAddressto(baseOffset2, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction21 = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); + ssPushNativeRegisterDoubleFloat(doubleValue); + extA = 0; + return 0; case 92: - return genLowcodeLoadArgumentInt16(); + /* begin genLowcodeLoadArgumentInt16 */ + baseOffset3 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult10 = NoReg; + rResult10 = allocateRegNotConflictingWith(0); + assert(!((rResult10 == NoReg))); + value12 = rResult10; + + loadNativeArgumentAddressto(baseOffset3, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value12); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value12, value12); + ssPushNativeRegister(value12); + extA = 0; + return 0; case 93: - return genLowcodeLoadArgumentInt32(); + /* begin genLowcodeLoadArgumentInt32 */ + baseOffset4 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult11 = NoReg; + rResult11 = allocateRegNotConflictingWith(0); + assert(!((rResult11 == NoReg))); + value13 = rResult11; + + loadNativeArgumentAddressto(baseOffset4, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value13); + ssPushNativeRegister(value13); + extA = 0; + return 0; case 94: - return genLowcodeLoadArgumentInt64(); + /* begin genLowcodeLoadArgumentInt64 */ + baseOffset20 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult110 = NoReg; + rResult110 = allocateRegNotConflictingWith(0); + assert(!((rResult110 == NoReg))); + value29 = rResult110; + + loadNativeArgumentAddressto(baseOffset20, TempReg); + assert(BytesPerWord == 8); + /* begin gen:quickConstant:operand:operand: */ + anInstruction25 = genoperandoperandoperand(MoveMwrR, 0, TempReg, value29); + + ssPushNativeRegister(value29); + + extA = 0; + return 0; case 95: - return genLowcodeLoadArgumentInt8(); + /* begin genLowcodeLoadArgumentInt8 */ + baseOffset5 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult12 = NoReg; + rResult12 = allocateRegNotConflictingWith(0); + assert(!((rResult12 == NoReg))); + value14 = rResult12; + + loadNativeArgumentAddressto(baseOffset5, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value14); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value14, value14); + ssPushNativeRegister(value14); + extA = 0; + return 0; case 96: - return genLowcodeLoadArgumentPointer(); + /* begin genLowcodeLoadArgumentPointer */ + baseOffset6 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult13 = NoReg; + rResult13 = allocateRegNotConflictingWith(0); + assert(!((rResult13 == NoReg))); + pointerResult = rResult13; + + loadNativeArgumentAddressto(baseOffset6, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction27 = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); + ssPushNativeRegister(pointerResult); + extA = 0; + return 0; case 97: - return genLowcodeLoadArgumentUInt16(); + /* begin genLowcodeLoadArgumentUInt16 */ + baseOffset7 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult14 = NoReg; + rResult14 = allocateRegNotConflictingWith(0); + assert(!((rResult14 == NoReg))); + value15 = rResult14; + + loadNativeArgumentAddressto(baseOffset7, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction28 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value15); + ssPushNativeRegister(value15); + extA = 0; + return 0; case 98: - return genLowcodeLoadArgumentUInt32(); + /* begin genLowcodeLoadArgumentUInt32 */ + baseOffset8 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult15 = NoReg; + rResult15 = allocateRegNotConflictingWith(0); + assert(!((rResult15 == NoReg))); + value16 = rResult15; + + loadNativeArgumentAddressto(baseOffset8, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value16); + ssPushNativeRegister(value16); + extA = 0; + return 0; case 99: - return genLowcodeLoadArgumentUInt64(); + /* begin genLowcodeLoadArgumentUInt64 */ + baseOffset21 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult111 = NoReg; + rResult111 = allocateRegNotConflictingWith(0); + assert(!((rResult111 == NoReg))); + value30 = rResult111; + + loadNativeArgumentAddressto(baseOffset21, TempReg); + assert(BytesPerWord == 8); + /* begin gen:quickConstant:operand:operand: */ + anInstruction210 = genoperandoperandoperand(MoveMwrR, 0, TempReg, value30); + + ssPushNativeRegister(value30); + + extA = 0; + return 0; case 100: - return genLowcodeLoadArgumentUInt8(); + /* begin genLowcodeLoadArgumentUInt8 */ + baseOffset9 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult16 = NoReg; + rResult16 = allocateRegNotConflictingWith(0); + assert(!((rResult16 == NoReg))); + value17 = rResult16; + + loadNativeArgumentAddressto(baseOffset9, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value17); + ssPushNativeRegister(value17); + extA = 0; + return 0; case 101: - return genLowcodeLoadFloat32FromMemory(); + /* begin genLowcodeLoadFloat32FromMemory */ + rTop22 = NoReg; + frResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop22 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(0); + } + frResult6 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop22 == NoReg) + || (frResult6 == NoReg)))); + pointer1 = rTop22; + value18 = frResult6; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperandoperand(MoveM32rRs, 0, pointer1, value18); + ssPushNativeRegisterSingleFloat(value18); + return 0; case 102: - return genLowcodeLoadFloat64FromMemory(); + /* begin genLowcodeLoadFloat64FromMemory */ + rTop23 = NoReg; + frResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop23 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop23 == NoReg) { + rTop23 = allocateRegNotConflictingWith(0); + } + frResult7 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop23 == NoReg) + || (frResult7 == NoReg)))); + pointer2 = rTop23; + value19 = frResult7; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction33 = genoperandoperandoperand(MoveM64rRd, 0, pointer2, value19); + ssPushNativeRegisterDoubleFloat(value19); + return 0; case 103: - return genLowcodeLoadInt16FromMemory(); + /* begin genLowcodeLoadInt16FromMemory */ + rTop24 = NoReg; + rResult17 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop24 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(1ULL << rTop24); + assert(!(((rTop24 == NoReg) + || (rResult17 == NoReg)))); + pointer3 = rTop24; + value20 = rResult17; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction34 = genoperandoperandoperand(MoveM16rR, 0, pointer3, value20); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value20, value20); + ssPushNativeRegister(value20); + return 0; case 104: - return genLowcodeLoadInt32FromMemory(); + /* begin genLowcodeLoadInt32FromMemory */ + rTop25 = NoReg; + rResult18 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop25 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + rResult18 = allocateRegNotConflictingWith(1ULL << rTop25); + assert(!(((rTop25 == NoReg) + || (rResult18 == NoReg)))); + pointer4 = rTop25; + value21 = rResult18; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction35 = genoperandoperandoperand(MoveM32rR, 0, pointer4, value21); + ssPushNativeRegister(value21); + return 0; case 105: - return genLowcodeLoadInt64FromMemory(); + /* begin genLowcodeLoadInt64FromMemory */ + /* begin allocateRegistersForLowcodeIntegerResultInteger: */ + rTop111 = NoReg; + rResult112 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop111 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop111 == NoReg) { + rTop111 = allocateRegNotConflictingWith(0); + } + rResult112 = allocateRegNotConflictingWith(1ULL << rTop111); + assert(!(((rTop111 == NoReg) + || (rResult112 == NoReg)))); + pointer8 = rTop111; + value31 = rResult112; + + nativePopToReg(ssNativeTop(), pointer8); + ssNativePop(1); + assert(BytesPerWord == 8); + /* begin gen:quickConstant:operand:operand: */ + anInstruction211 = genoperandoperandoperand(MoveMwrR, 0, pointer8, value31); + + ssPushNativeRegister(value31); + + return 0; case 106: - return genLowcodeLoadInt8FromMemory(); + /* begin genLowcodeLoadInt8FromMemory */ + rTop26 = NoReg; + rResult19 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop26 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(0); + } + rResult19 = allocateRegNotConflictingWith(1ULL << rTop26); + assert(!(((rTop26 == NoReg) + || (rResult19 == NoReg)))); + pointer5 = rTop26; + value22 = rResult19; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction37 = genoperandoperandoperand(MoveM8rR, 0, pointer5, value22); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value22, value22); + ssPushNativeRegister(value22); + return 0; case 107: - return genLowcodeLoadLocalAddress(); + /* begin genLowcodeLoadLocalAddress */ + baseOffset10 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult20 = NoReg; + rResult20 = allocateRegNotConflictingWith(0); + assert(!((rResult20 == NoReg))); + pointer6 = rResult20; + + loadNativeLocalAddressto(baseOffset10, pointer6); + ssPushNativeRegister(pointer6); + extA = 0; + return 0; case 108: - return genLowcodeLoadLocalFloat32(); + /* begin genLowcodeLoadLocalFloat32 */ + baseOffset11 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult8 = NoReg; + frResult8 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult8 == NoReg))); + floatValue6 = frResult8; + + loadNativeLocalAddressto(baseOffset11, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction38 = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue6); + ssPushNativeRegisterSingleFloat(floatValue6); + extA = 0; + return 0; case 109: - return genLowcodeLoadLocalFloat64(); + /* begin genLowcodeLoadLocalFloat64 */ + baseOffset12 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult9 = NoReg; + frResult9 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult9 == NoReg))); + doubleValue1 = frResult9; + + loadNativeLocalAddressto(baseOffset12, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction39 = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue1); + ssPushNativeRegisterDoubleFloat(doubleValue1); + extA = 0; + return 0; case 110: - return genLowcodeLoadLocalInt16(); + /* begin genLowcodeLoadLocalInt16 */ + baseOffset13 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult21 = NoReg; + rResult21 = allocateRegNotConflictingWith(0); + assert(!((rResult21 == NoReg))); + value23 = rResult21; + + loadNativeLocalAddressto(baseOffset13, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction40 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value23); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value23, value23); + ssPushNativeRegister(value23); + extA = 0; + return 0; case 111: - return genLowcodeLoadLocalInt32(); + /* begin genLowcodeLoadLocalInt32 */ + baseOffset14 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult22 = NoReg; + rResult22 = allocateRegNotConflictingWith(0); + assert(!((rResult22 == NoReg))); + value24 = rResult22; + + loadNativeLocalAddressto(baseOffset14, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction41 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value24); + ssPushNativeRegister(value24); + extA = 0; + return 0; case 112: - return genLowcodeLoadLocalInt64(); + /* begin genLowcodeLoadLocalInt64 */ + baseOffset22 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult113 = NoReg; + rResult113 = allocateRegNotConflictingWith(0); + assert(!((rResult113 == NoReg))); + value32 = rResult113; + + loadNativeLocalAddressto(baseOffset22, TempReg); + assert(BytesPerWord == 8); + /* begin gen:quickConstant:operand:operand: */ + anInstruction212 = genoperandoperandoperand(MoveMwrR, 0, TempReg, value32); + + ssPushNativeRegister(value32); + + extA = 0; + return 0; case 113: - return genLowcodeLoadLocalInt8(); + /* begin genLowcodeLoadLocalInt8 */ + baseOffset15 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult23 = NoReg; + rResult23 = allocateRegNotConflictingWith(0); + assert(!((rResult23 == NoReg))); + value25 = rResult23; + + loadNativeLocalAddressto(baseOffset15, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction43 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value25); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value25, value25); + ssPushNativeRegister(value25); + extA = 0; + return 0; case 114: - return genLowcodeLoadLocalPointer(); + /* begin genLowcodeLoadLocalPointer */ + baseOffset16 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult24 = NoReg; + rResult24 = allocateRegNotConflictingWith(0); + assert(!((rResult24 == NoReg))); + pointerResult1 = rResult24; + + loadNativeLocalAddressto(baseOffset16, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction44 = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult1); + ssPushNativeRegister(pointerResult1); + extA = 0; + return 0; case 115: - return genLowcodeLoadLocalUInt16(); + /* begin genLowcodeLoadLocalUInt16 */ + baseOffset17 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult25 = NoReg; + rResult25 = allocateRegNotConflictingWith(0); + assert(!((rResult25 == NoReg))); + value26 = rResult25; + + loadNativeLocalAddressto(baseOffset17, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction45 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value26); + ssPushNativeRegister(value26); + extA = 0; + return 0; case 116: - return genLowcodeLoadLocalUInt32(); + /* begin genLowcodeLoadLocalUInt32 */ + baseOffset18 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult26 = NoReg; + rResult26 = allocateRegNotConflictingWith(0); + assert(!((rResult26 == NoReg))); + value27 = rResult26; + + loadNativeLocalAddressto(baseOffset18, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction46 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value27); + ssPushNativeRegister(value27); + extA = 0; + return 0; case 117: - return genLowcodeLoadLocalUInt64(); + /* begin genLowcodeLoadLocalUInt64 */ + baseOffset23 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult114 = NoReg; + rResult114 = allocateRegNotConflictingWith(0); + assert(!((rResult114 == NoReg))); + value33 = rResult114; + + loadNativeLocalAddressto(baseOffset23, TempReg); + assert(BytesPerWord == 8); + /* begin gen:quickConstant:operand:operand: */ + anInstruction213 = genoperandoperandoperand(MoveMwrR, 0, TempReg, value33); + + ssPushNativeRegister(value33); + + extA = 0; + return 0; case 118: - return genLowcodeLoadLocalUInt8(); + /* begin genLowcodeLoadLocalUInt8 */ + baseOffset19 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult27 = NoReg; + rResult27 = allocateRegNotConflictingWith(0); + assert(!((rResult27 == NoReg))); + value28 = rResult27; + + loadNativeLocalAddressto(baseOffset19, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction48 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value28); + ssPushNativeRegister(value28); + extA = 0; + return 0; case 119: - return genLowcodeLoadObjectAt(); + /* begin genLowcodeLoadObjectAt */ + rTop27 = (rOopTop = NoReg); + topRegisterMask = 0; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask = 1ULL << rOopTop; + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(topRegisterMask); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(1ULL << rTop27); + } + assert(!(((rTop27 == NoReg) + || (rOopTop == NoReg)))); + fieldIndex = rTop27; + object = rOopTop; + + nativePopToReg(ssNativeTop(), fieldIndex); + ssNativePop(1); + popToReg(ssTop(), object); + ssPop(1); + genLcLoadObjectat(object, fieldIndex); + return 0; default: return genLowcodeUnaryInlinePrimitive3(prim); @@ -38280,187 +33109,1419 @@ genLowcodeUnaryInlinePrimitive2(sqInt prim) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive3(sqInt prim) { + AbstractInstruction *abstractInstruction; + AbstractInstruction *abstractInstruction1; + AbstractInstruction *abstractInstruction11; + AbstractInstruction *abstractInstruction12; + AbstractInstruction *abstractInstruction2; + AbstractInstruction *abstractInstruction3; + sqInt address; + sqInt address1; + sqInt alignedSize; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction41; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt base; + sqInt base1; + sqInt base2; + sqInt baseValue; + sqInt baseValue1; + sqInt baseValue2; + sqInt constant; + sqInt constant1; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + sqInt dest; + sqInt dest1; + sqInt dest2; + sqInt destValue; + sqInt destValue1; + sqInt destValue2; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + sqInt fieldIndex; + sqInt first; + sqInt first1; + sqInt first2; + sqInt first3; + sqInt first4; + sqInt first5; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue2; + sqInt firstValue3; + sqInt firstValue4; + sqInt firstValue5; + sqInt frTop; + sqInt frTop1; + sqInt nativeValueIndex2; + sqInt nativeValueIndex3; + sqInt object; + sqInt objectValue; + sqInt offset; + sqInt offset1; + sqInt offset11; + sqInt offset2; + sqInt offset21; + sqInt offset3; + sqInt offset4; + sqInt offsetValue; + sqInt offsetValue1; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointer6; + sqInt pointer7; + sqInt pointer8; + sqInt pointerResult; + sqInt pointerResultValue; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValue8; + sqInt pointerValue9; + sqInt pointerValueValue; + sqInt quickConstant; + sqInt reg; + sqInt reg1; + sqInt reg11; + sqInt reg12; + sqInt reg14; + sqInt reg15; + sqInt reg4; + sqInt reg5; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerID; + sqInt registerID1; + sqInt registerID2; + sqInt registerID3; + sqInt registerID4; + sqInt registerMask2; + sqInt registerMask3; + sqInt result; + sqInt result1; + sqInt result2; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue2; + sqInt rNext; + sqInt rNext1; + sqInt rNext11; + sqInt rNext12; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext4; + sqInt rNext6; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext2; + sqInt rNextNext3; + sqInt rOopTop; + sqInt rResult; + sqInt rResult1; + sqInt rResult11; + sqInt rResult12; + sqInt rResult13; + sqInt rResult2; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult8; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop11; + sqInt rTop110; + sqInt rTop111; + sqInt rTop112; + sqInt rTop12; + sqInt rTop14; + sqInt rTop15; + sqInt rTop16; + sqInt rTop17; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop27; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop31; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop8; + sqInt second; + sqInt second1; + sqInt second2; + sqInt second3; + sqInt second4; + sqInt second5; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue2; + sqInt secondValue3; + sqInt secondValue4; + sqInt secondValue5; + sqInt size; + sqInt size1; + sqInt size2; + sqInt size3; + sqInt size4; + sqInt size5; + sqInt sizeLow1; + sqInt sizeValue; + sqInt sizeValue1; + sqInt sizeValue2; + sqInt sizeValue3; + sqInt source; + sqInt source1; + sqInt source2; + sqInt sourceValue; + sqInt sourceValue1; + sqInt sourceValue2; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask13; + sqInt topRegistersMask4; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value2; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue2; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + + sizeLow1 = 0; switch (prim) { case 120: - return genLowcodeLoadObjectField(); + /* begin genLowcodeLoadObjectField */ + fieldIndex = extA; + /* begin allocateRegistersForLowcodeOop: */ + rOopTop = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop == NoReg))); + object = rOopTop; + + popToReg(ssTop(), object); + ssPop(1); + genLcLoadObjectfield(object, fieldIndex); + extA = 0; + return 0; case 121: - return genLowcodeLoadPointerFromMemory(); + /* begin genLowcodeLoadPointerFromMemory */ + rTop = NoReg; + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1ULL << rTop); + assert(!(((rTop == NoReg) + || (rResult == NoReg)))); + pointer = rTop; + pointerResult = rResult; + + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperandoperand(MoveMwrR, 0, pointer, pointerResult); + ssPushNativeRegister(pointerResult); + return 0; case 122: - return genLowcodeLoadUInt16FromMemory(); + /* begin genLowcodeLoadUInt16FromMemory */ + rTop1 = NoReg; + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop1 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1ULL << rTop1); + assert(!(((rTop1 == NoReg) + || (rResult1 == NoReg)))); + pointer1 = rTop1; + value = rResult1; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperandoperand(MoveM16rR, 0, pointer1, value); + ssPushNativeRegister(value); + return 0; case 123: - return genLowcodeLoadUInt32FromMemory(); + /* begin genLowcodeLoadUInt32FromMemory */ + rTop2 = NoReg; + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop2 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(1ULL << rTop2); + assert(!(((rTop2 == NoReg) + || (rResult2 == NoReg)))); + pointer2 = rTop2; + value1 = rResult2; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperandoperand(MoveM32rR, 0, pointer2, value1); + ssPushNativeRegister(value1); + return 0; case 0x7C: - return genLowcodeLoadUInt64FromMemory(); + /* begin genLowcodeLoadUInt64FromMemory */ + /* begin allocateRegistersForLowcodeIntegerResultInteger: */ + rTop111 = NoReg; + rResult12 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop111 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop111 == NoReg) { + rTop111 = allocateRegNotConflictingWith(0); + } + rResult12 = allocateRegNotConflictingWith(1ULL << rTop111); + assert(!(((rTop111 == NoReg) + || (rResult12 == NoReg)))); + pointer6 = rTop111; + value11 = rResult12; + + nativePopToReg(ssNativeTop(), pointer6); + ssNativePop(1); + assert(BytesPerWord == 8); + /* begin gen:quickConstant:operand:operand: */ + anInstruction21 = genoperandoperandoperand(MoveMwrR, 0, pointer6, value11); + + ssPushNativeRegister(value11); + + return 0; case 125: - return genLowcodeLoadUInt8FromMemory(); + /* begin genLowcodeLoadUInt8FromMemory */ + rTop3 = NoReg; + rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop3 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1ULL << rTop3); + assert(!(((rTop3 == NoReg) + || (rResult3 == NoReg)))); + pointer3 = rTop3; + value2 = rResult3; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperandoperand(MoveM8rR, 0, pointer3, value2); + ssPushNativeRegister(value2); + return 0; case 0x7E: - return genLowcodeLocalFrameSize(); + /* begin genLowcodeLocalFrameSize */ + size = extA; + assert(needsFrame); + + /* Align the size to 16 bytes. */ + hasNativeFrame = 1; + + /* Mark the stack frame */ + alignedSize = (size + 15) & -16; + annotateobjRef(gMoveCwR(splObj(LowcodeContextMark), TempReg), splObj(LowcodeContextMark)); + /* begin MoveR:Mw:r: */ + offset4 = frameOffsetOfNativeFrameMark(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperandoperand(MoveRMwr, TempReg, offset4, FPReg); + /* begin MoveAw:R: */ + address = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction12 = genoperandoperand(MoveAwR, address, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperand(AddCqR, 1, TempReg); + /* begin MoveR:Mw:r: */ + offset11 = frameOffsetOfPreviousNativeStackPointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperandoperand(MoveRMwr, TempReg, offset11, FPReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction41 = genoperandoperand(SubCqR, alignedSize, TempReg); + /* begin MoveR:Mw:r: */ + offset21 = frameOffsetOfNativeFramePointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperandoperand(MoveRMwr, TempReg, offset21, FPReg); + /* begin MoveR:Mw:r: */ + offset3 = frameOffsetOfNativeStackPointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperandoperand(MoveRMwr, TempReg, offset3, FPReg); + /* begin SubCq:R: */ + quickConstant = 1 + (defaultNativeStackFrameSize()); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperand(SubCqR, quickConstant, TempReg); + /* begin MoveR:Aw: */ + address1 = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction8 = genoperandoperand(MoveRAw, TempReg, address1); + extA = 0; + return 0; case 0x7F: - return genLowcodeLockRegisters(); + /* begin genLowcodeLockRegisters */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + return 0; case 128: - return genLowcodeLockVM(); + /* begin genLowcodeLockVM */ + abort(); + return 0; case 129: - return genLowcodeMalloc32(); + /* begin genLowcodeMalloc32 */ + rTop27 = NoReg; + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop27 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(0); + } + rResult8 = allocateRegNotConflictingWith(1ULL << rTop27); + assert(!(((rTop27 == NoReg) + || (rResult8 == NoReg)))); + size1 = rTop27; + pointer7 = rResult8; + + nativePopToReg(ssNativeTop(), size1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (size1 != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, size1, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction3 = genoperand(Call, ceMallocTrampoline); + (abstractInstruction3->annotation = IsRelativeCall); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, pointer7); + ssPushNativeRegister(pointer7); + return 0; case 130: - return genLowcodeMalloc64(); + /* begin genLowcodeMalloc64 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger: */ + rTop112 = NoReg; + rResult13 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop112 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop112 == NoReg) { + rTop112 = allocateRegNotConflictingWith(0); + } + rResult13 = allocateRegNotConflictingWith(1ULL << rTop112); + assert(!(((rTop112 == NoReg) + || (rResult13 == NoReg)))); + size2 = rTop112; + pointer8 = rResult13; + + nativePopToReg(ssNativeTop(), size2); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (size2 != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, size2, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction12 = genoperand(Call, ceMallocTrampoline); + (abstractInstruction12->annotation = IsRelativeCall); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, pointer8); + ssPushNativeRegister(pointer8); + + return 0; case 131: - return genLowcodeMemcpy32(); + /* begin genLowcodeMemcpy32 */ + rTop29 = (rNext13 = (rNextNext2 = NoReg)); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext13 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + } + if (rTop29 == NoReg) { + registerMask2 = 0; + if (rNext13 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1ULL << rNext13; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1ULL << rNextNext2); + } + rTop29 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext13 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1ULL << rTop29; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1ULL << rNextNext2); + } + rNext13 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1ULL << rTop29) | (1ULL << rNext13); + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop29 == NoReg) + || ((rNext13 == NoReg) + || (rNextNext2 == NoReg))))); + size3 = rTop29; + source = rNext13; + dest = rNextNext2; + + nativePopToReg(ssNativeTop(), size3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), source); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytosize(backEnd, source, dest, size3); + return 0; case 132: - return genLowcodeMemcpy64(); + /* begin genLowcodeMemcpy64 */ + rTop30 = (rNext14 = (rNextNext3 = NoReg)); + nativeValueIndex3 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop30 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNext14 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + } + } + if (rTop30 == NoReg) { + registerMask3 = 0; + if (rNext14 != NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1ULL << rNext14; + } + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1ULL << rNextNext3); + } + rTop30 = allocateRegNotConflictingWith(registerMask3); + } + if (rNext14 == NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1ULL << rTop30; + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1ULL << rNextNext3); + } + rNext14 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNext3 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask3 = (1ULL << rTop30) | (1ULL << rNext14); + rNextNext3 = allocateRegNotConflictingWith(registerMask3); + } + assert(!(((rTop30 == NoReg) + || ((rNext14 == NoReg) + || (rNextNext3 == NoReg))))); + size4 = rTop30; + source1 = rNext14; + dest1 = rNextNext3; + + nativePopToReg(ssNativeTop(), size4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), source1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytosize(backEnd, source1, dest1, sizeLow1); + return 0; case 133: - return genLowcodeMemcpyFixed(); + /* begin genLowcodeMemcpyFixed */ + size5 = extA; + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask13 = 0; + rTop31 = (rNext15 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop31 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext15 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1ULL << reg15; + } + } + if (rTop31 == NoReg) { + rTop31 = allocateRegNotConflictingWith(topRegistersMask13); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1ULL << rTop31); + } + assert(!(((rTop31 == NoReg) + || (rNext15 == NoReg)))); + source2 = rTop31; + dest2 = rNext15; + + nativePopToReg(ssNativeTop(), source2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest2); + ssNativePop(1); + if (size5 == BytesPerWord) { + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperandoperand(MoveMwrR, 0, source2, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperandoperand(MoveRMwr, TempReg, 0, dest2); + } + else { + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytoconstantSize(backEnd, source2, dest2, size5); + } + extA = 0; + return 0; case 134: - return genLowcodeMoveFloat32ToPhysical(); + /* begin genLowcodeMoveFloat32ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 135: - return genLowcodeMoveFloat64ToPhysical(); + /* begin genLowcodeMoveFloat64ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += 8; + extA = 0; + return 0; case 136: - return genLowcodeMoveInt32ToPhysical(); + /* begin genLowcodeMoveInt32ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 137: - return genLowcodeMoveInt64ToPhysical(); + /* begin genLowcodeMoveInt64ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += 8; + extA = 0; + return 0; case 138: - return genLowcodeMovePointerToPhysical(); + /* begin genLowcodeMovePointerToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 139: - return genLowcodeMul32(); + /* begin genLowcodeMul32 */ + topRegistersMask = 0; + rTop4 = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1ULL << reg; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1ULL << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext == NoReg)))); + second = rTop4; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, second, first); + ssPushNativeRegister(first); + return 0; case 140: - return genLowcodeMul64(); + /* begin genLowcodeMul64 */ + topRegistersMask1 = 0; + rTop5 = (rNext1 = NoReg); + rResult4 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop5 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext1 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1ULL << reg1; + } + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1ULL << rTop5); + } + assert(!(((rTop5 == NoReg) + || (rNext1 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1ULL << rTop5) | (1ULL << rNext1)); + assert(!((rResult4 == NoReg))); + second1 = rTop5; + first1 = rNext1; + result = rResult4; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + abort(); + return 0; case 141: - return genLowcodeNeg32(); + /* begin genLowcodeNeg32 */ + rTop6 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + assert(!((rTop6 == NoReg))); + value3 = rTop6; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin NegateR: */ + genoperand(NegateR, value3); + ssPushNativeRegister(value3); + return 0; case 142: - return genLowcodeNeg64(); + /* begin genLowcodeNeg64 */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop11 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop11 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop11 == NoReg) { + rTop11 = allocateRegNotConflictingWith(0); + } + assert(!((rTop11 == NoReg))); + value4 = rTop11; + + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + /* begin NegateR: */ + genoperand(NegateR, value4); + ssPushNativeRegister(value4); + + return 0; case 143: - return genLowcodeNot32(); + /* begin genLowcodeNot32 */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value5 = rTop8; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, value5); + ssPushNativeRegister(value5); + return 0; case 144: - return genLowcodeNot64(); + /* begin genLowcodeNot64 */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop12 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop12 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop12 == NoReg) { + rTop12 = allocateRegNotConflictingWith(0); + } + assert(!((rTop12 == NoReg))); + value6 = rTop12; + + nativePopToReg(ssNativeTop(), value6); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, value6); + ssPushNativeRegister(value6); + + return 0; case 145: - return genLowcodeOr32(); + /* begin genLowcodeOr32 */ + topRegistersMask4 = 0; + rTop10 = (rNext4 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext4 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1ULL << reg4; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1ULL << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext4 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1ULL << rTop10) | (1ULL << rNext4)); + assert(!((rResult5 == NoReg))); + second2 = rTop10; + first2 = rNext4; + result1 = rResult5; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 146: - return genLowcodeOr64(); + /* begin genLowcodeOr64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask5 = 0; + rTop14 = (rNext11 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop14 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext11 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext11 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext11 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1ULL << reg5; + } + } + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext11 == NoReg) { + rNext11 = allocateRegNotConflictingWith(1ULL << rTop14); + } + assert(!(((rTop14 == NoReg) + || (rNext11 == NoReg)))); + second3 = rTop14; + first3 = rNext11; + + nativePopToReg(ssNativeTop(), second3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first3); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, second3, first3); + ssPushNativeRegister(first3); + + return 0; case 147: - return genLowcodePerformCallout(); + /* begin genLowcodePerformCallout */ + callSwitchToCStack(); + /* begin checkLiteral:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCwR, extA, TempReg); + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + /* begin annotateBytecode: */ + abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); + (abstractInstruction1->annotation = HasBytecodePC); + extA = 0; + return 0; case 148: - return genLowcodePerformCalloutIndirect(); + /* begin genLowcodePerformCalloutIndirect */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + callSwitchToCStack(); + /* begin CallRT: */ + abstractInstruction2 = genoperand(Call, ceFFICalloutTrampoline); + (abstractInstruction2->annotation = IsRelativeCall); + /* begin annotateBytecode: */ + abstractInstruction11 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); + (abstractInstruction11->annotation = HasBytecodePC); + return 0; case 149: - return genLowcodePushCalloutResultFloat32(); + /* begin genLowcodePushCalloutResultFloat32 */ + cFloatResultToRs(backEnd, DPFPReg0); + ssPushNativeRegisterSingleFloat(DPFPReg0); + return 0; case 150: - return genLowcodePushCalloutResultFloat64(); + /* begin genLowcodePushCalloutResultFloat64 */ + cFloatResultToRd(backEnd, DPFPReg0); + ssPushNativeRegisterDoubleFloat(DPFPReg0); + return 0; case 151: - return genLowcodePushCalloutResultInt32(); + /* begin genLowcodePushCalloutResultInt32 */ + reg11 = RAX; + genoperandoperand(MoveRR, reg11, ReceiverResultReg); + ssPushNativeRegister(ReceiverResultReg); + return 0; case 152: - return genLowcodePushCalloutResultInt64(); + /* begin genLowcodePushCalloutResultInt64 */ + /* begin MoveR:R: */ + reg12 = RAX; + genoperandoperand(MoveRR, reg12, ReceiverResultReg); + ssPushNativeRegister(ReceiverResultReg); + + return 0; case 153: - return genLowcodePushCalloutResultPointer(); + /* begin genLowcodePushCalloutResultPointer */ + reg14 = RAX; + genoperandoperand(MoveRR, reg14, ReceiverResultReg); + ssPushNativeRegister(ReceiverResultReg); + return 0; case 161: - return genLowcodePlaftormCode(); + /* begin genLowcodePlaftormCode */ + abort(); + return 0; case 162: - return genLowcodePointerAddConstantOffset(); + /* begin genLowcodePointerAddConstantOffset */ + offset = extB; + /* begin allocateRegistersForLowcodeInteger: */ + rTop15 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(0); + } + assert(!((rTop15 == NoReg))); + base = rTop15; + + nativePopToReg(ssNativeTop(), base); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(AddCqR, offset, base); + ssPushNativeRegister(base); + extB = 0; + numExtB = 0; + return 0; case 163: - return genLowcodePointerAddOffset32(); + /* begin genLowcodePointerAddOffset32 */ + topRegistersMask6 = 0; + rTop16 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop16 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1ULL << reg6; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1ULL << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext6 == NoReg)))); + offset1 = rTop16; + base1 = rNext6; + + nativePopToReg(ssNativeTop(), offset1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base1); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, offset1, base1); + ssPushNativeRegister(base1); + return 0; case 164: - return genLowcodePointerAddOffset64(); + /* begin genLowcodePointerAddOffset64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask7 = 0; + rTop17 = (rNext12 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop17 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext12 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext12 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext12 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1ULL << reg7; + } + } + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext12 == NoReg) { + rNext12 = allocateRegNotConflictingWith(1ULL << rTop17); + } + assert(!(((rTop17 == NoReg) + || (rNext12 == NoReg)))); + offset2 = rTop17; + base2 = rNext12; + + nativePopToReg(ssNativeTop(), offset2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base2); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, offset2, base2); + ssPushNativeRegister(base2); + + return 0; case 165: - return genLowcodePointerEqual(); + /* begin genLowcodePointerEqual */ + topRegistersMask8 = 0; + rTop19 = (rNext8 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1ULL << reg8; + } + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1ULL << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext8 == NoReg)))); + second4 = rTop19; + first4 = rNext8; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second4, first4); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperand(MoveCqR, 1, first4); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperand(MoveCqR, 0, first4); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first4); + return 0; case 166: - return genLowcodePointerNotEqual(); + /* begin genLowcodePointerNotEqual */ + topRegistersMask9 = 0; + rTop20 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1ULL << reg9; + } + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1ULL << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext9 == NoReg)))); + second5 = rTop20; + first5 = rNext9; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second5, first5); + /* begin JumpZero: */ + falseJump1 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperand(MoveCqR, 1, first5); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperand(MoveCqR, 0, first5); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first5); + return 0; case 167: - return genLowcodePointerToInt32(); + /* begin genLowcodePointerToInt32 */ + rTop21 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(0); + } + assert(!((rTop21 == NoReg))); + pointer4 = rTop21; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + ssPushNativeRegister(pointer4); + return 0; case 168: - return genLowcodePointerToInt64(); + /* begin genLowcodePointerToInt64 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger: */ + rTop110 = NoReg; + rResult11 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop110 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop110 == NoReg) { + rTop110 = allocateRegNotConflictingWith(0); + } + rResult11 = allocateRegNotConflictingWith(1ULL << rTop110); + assert(!(((rTop110 == NoReg) + || (rResult11 == NoReg)))); + pointer5 = rTop110; + result2 = rResult11; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + ssPushNativeRegister(pointer5); + + return 0; case 169: - return genLowcodePopFloat32(); + /* begin genLowcodePopFloat32 */ + topRegistersMask10 = 0; + frTop = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + assert(!((frTop == NoReg))); + value7 = frTop; + + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + return 0; case 170: - return genLowcodePopFloat64(); + /* begin genLowcodePopFloat64 */ + topRegistersMask11 = 0; + frTop1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(topRegistersMask11); + } + assert(!((frTop1 == NoReg))); + value8 = frTop1; + + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + return 0; case 171: - return genLowcodePopInt32(); + /* begin genLowcodePopInt32 */ + rTop23 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop23 == NoReg) { + rTop23 = allocateRegNotConflictingWith(0); + } + assert(!((rTop23 == NoReg))); + value9 = rTop23; + + nativePopToReg(ssNativeTop(), value9); + ssNativePop(1); + return 0; case 172: - return genLowcodePopInt64(); + /* begin genLowcodePopInt64 */ + rTop24 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + assert(!((rTop24 == NoReg))); + value10 = rTop24; + + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + return 0; case 173: - return genLowcodePopMultipleNative(); + /* begin genLowcodePopMultipleNative */ + ssPopNativeSize(extA); + extA = 0; + return 0; case 174: - return genLowcodePopPointer(); + /* begin genLowcodePopPointer */ + rTop25 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + assert(!((rTop25 == NoReg))); + pointerValue6 = rTop25; + + nativePopToReg(ssNativeTop(), pointerValue6); + ssNativePop(1); + return 0; case 175: - return genLowcodePushConstantUInt32(); + /* begin genLowcodePushConstantUInt32 */ + constant = extA; + ssPushNativeConstantInt32(constant); + extA = 0; + return 0; case 176: - return genLowcodePushConstantUInt64(); + /* begin genLowcodePushConstantUInt64 */ + constant1 = extA; + ssPushNativeConstantInt64(constant1); + extA = 0; + return 0; case 177: - return genLowcodePushNullPointer(); + /* begin genLowcodePushNullPointer */ + ssPushNativeConstantPointer(0); + return 0; case 178: - return genLowcodePushOne32(); + /* begin genLowcodePushOne32 */ + ssPushNativeConstantInt32(1); + return 0; case 179: - return genLowcodePushOne64(); + /* begin genLowcodePushOne64 */ + ssPushNativeConstantInt64(1); + return 0; case 180: - return genLowcodePushOneFloat32(); + /* begin genLowcodePushOneFloat32 */ + ssPushNativeConstantFloat32(1.0); + return 0; case 181: - return genLowcodePushOneFloat64(); + /* begin genLowcodePushOneFloat64 */ + ssPushNativeConstantFloat64(1.0); + return 0; case 182: - return genLowcodePushPhysicalFloat32(); + /* begin genLowcodePushPhysicalFloat32 */ + registerID = extA; + abort(); + extA = 0; + return 0; case 183: - return genLowcodePushPhysicalFloat64(); + /* begin genLowcodePushPhysicalFloat64 */ + registerID1 = extA; + abort(); + extA = 0; + return 0; case 184: - return genLowcodePushPhysicalInt32(); + /* begin genLowcodePushPhysicalInt32 */ + registerID2 = extA; + abort(); + extA = 0; + return 0; case 185: - return genLowcodePushPhysicalInt64(); + /* begin genLowcodePushPhysicalInt64 */ + registerID3 = extA; + abort(); + extA = 0; + return 0; case 186: - return genLowcodePushPhysicalPointer(); + /* begin genLowcodePushPhysicalPointer */ + registerID4 = extA; + abort(); + extA = 0; + return 0; default: return genLowcodeUnaryInlinePrimitive4(prim); @@ -38476,187 +34537,2061 @@ genLowcodeUnaryInlinePrimitive3(sqInt prim) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive4(sqInt prim) { + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction25; + AbstractInstruction *anInstruction27; + AbstractInstruction *anInstruction28; + AbstractInstruction *anInstruction30; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction33; + AbstractInstruction *anInstruction34; + AbstractInstruction *anInstruction35; + AbstractInstruction *anInstruction36; + AbstractInstruction *anInstruction37; + AbstractInstruction *anInstruction38; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt baseOffset; + sqInt baseOffset1; + sqInt baseOffset2; + sqInt baseOffset3; + sqInt baseOffset4; + sqInt baseOffset5; + sqInt baseOffset6; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + sqInt doubleValue; + sqInt doubleValueValue; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump3; + sqInt first; + sqInt first1; + sqInt first10; + sqInt first11; + sqInt first12; + sqInt first13; + sqInt first14; + sqInt first15; + sqInt first16; + sqInt first17; + sqInt first18; + sqInt first19; + sqInt first2; + sqInt first3; + sqInt first4; + sqInt first5; + sqInt first6; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue10; + sqInt firstValue11; + sqInt firstValue12; + sqInt firstValue13; + sqInt firstValue14; + sqInt firstValue15; + sqInt firstValue16; + sqInt firstValue17; + sqInt firstValue18; + sqInt firstValue19; + sqInt firstValue2; + sqInt firstValue3; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue6; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt floatValue; + sqInt floatValueValue; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frTop; + sqInt frTop1; + sqInt frTop2; + sqInt frTop3; + sqInt memoryPointer; + sqInt memoryPointerValue; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValueValue; + sqInt pointerValueValue1; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg11; + sqInt reg15; + sqInt reg16; + sqInt reg17; + sqInt reg18; + sqInt reg19; + sqInt reg2; + sqInt reg20; + sqInt reg21; + sqInt reg22; + sqInt reg23; + sqInt reg24; + sqInt reg25; + sqInt reg26; + sqInt reg27; + sqInt reg29; + sqInt reg3; + sqInt reg30; + sqInt reg31; + sqInt reg32; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt result; + sqInt result1; + sqInt result10; + sqInt result11; + sqInt result2; + sqInt result3; + sqInt result4; + sqInt result5; + sqInt result6; + sqInt result7; + sqInt result8; + sqInt result9; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue10; + sqInt resultValue11; + sqInt resultValue2; + sqInt resultValue3; + sqInt resultValue4; + sqInt resultValue5; + sqInt resultValue6; + sqInt resultValue7; + sqInt resultValue8; + sqInt resultValue9; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext110; + sqInt rNext111; + sqInt rNext12; + sqInt rNext16; + sqInt rNext17; + sqInt rNext18; + sqInt rNext19; + sqInt rNext2; + sqInt rNext20; + sqInt rNext21; + sqInt rNext22; + sqInt rNext23; + sqInt rNext24; + sqInt rNext25; + sqInt rNext26; + sqInt rNext27; + sqInt rNext3; + sqInt rNext30; + sqInt rNext31; + sqInt rNext32; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult11; + sqInt rResult12; + sqInt rResult13; + sqInt rResult14; + sqInt rResult15; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop11; + sqInt rTop110; + sqInt rTop111; + sqInt rTop112; + sqInt rTop113; + sqInt rTop114; + sqInt rTop115; + sqInt rTop116; + sqInt rTop117; + sqInt rTop12; + sqInt rTop13; + sqInt rTop14; + sqInt rTop15; + sqInt rTop16; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop24; + sqInt rTop25; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop31; + sqInt rTop32; + sqInt rTop33; + sqInt rTop34; + sqInt rTop35; + sqInt rTop36; + sqInt rTop37; + sqInt rTop38; + sqInt rTop39; + sqInt rTop4; + sqInt rTop40; + sqInt rTop41; + sqInt rTop42; + sqInt rTop43; + sqInt rTop44; + sqInt rTop47; + sqInt rTop48; + sqInt rTop49; + sqInt rTop5; + sqInt rTop51; + sqInt rTop52; + sqInt rTop9; + sqInt second; + sqInt second1; + sqInt second10; + sqInt second11; + sqInt second12; + sqInt second13; + sqInt second14; + sqInt second15; + sqInt second16; + sqInt second17; + sqInt second18; + sqInt second19; + sqInt second2; + sqInt second3; + sqInt second4; + sqInt second5; + sqInt second6; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue10; + sqInt secondValue11; + sqInt secondValue12; + sqInt secondValue13; + sqInt secondValue14; + sqInt secondValue15; + sqInt secondValue16; + sqInt secondValue17; + sqInt secondValue18; + sqInt secondValue19; + sqInt secondValue2; + sqInt secondValue3; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue6; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask13; + sqInt topRegistersMask17; + sqInt topRegistersMask18; + sqInt topRegistersMask19; + sqInt topRegistersMask2; + sqInt topRegistersMask20; + sqInt topRegistersMask21; + sqInt topRegistersMask22; + sqInt topRegistersMask23; + sqInt topRegistersMask24; + sqInt topRegistersMask25; + sqInt topRegistersMask26; + sqInt topRegistersMask27; + sqInt topRegistersMask28; + sqInt topRegistersMask29; + sqInt topRegistersMask3; + sqInt topRegistersMask31; + sqInt topRegistersMask32; + sqInt topRegistersMask33; + sqInt topRegistersMask34; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value17; + sqInt value18; + sqInt value19; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value27; + sqInt value28; + sqInt value29; + sqInt value3; + sqInt value30; + sqInt value31; + sqInt value32; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue17; + sqInt valueValue18; + sqInt valueValue19; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue27; + sqInt valueValue28; + sqInt valueValue29; + sqInt valueValue3; + sqInt valueValue30; + sqInt valueValue31; + sqInt valueValue32; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + switch (prim) { case 187: - return genLowcodePushSessionIdentifier(); + /* begin genLowcodePushSessionIdentifier */ + ssPushNativeConstantInt32(getThisSessionID()); + return 0; case 188: - return genLowcodePushZero32(); + /* begin genLowcodePushZero32 */ + ssPushNativeConstantInt32(0); + return 0; case 189: - return genLowcodePushZero64(); + /* begin genLowcodePushZero64 */ + ssPushNativeConstantInt64(0); + return 0; case 190: - return genLowcodePushZeroFloat32(); + /* begin genLowcodePushZeroFloat32 */ + ssPushNativeConstantFloat32(0.0); + return 0; case 191: - return genLowcodePushZeroFloat64(); + /* begin genLowcodePushZeroFloat64 */ + ssPushNativeConstantFloat64(0.0); + return 0; case 192: - return genLowcodeRem32(); + /* begin genLowcodeRem32 */ + topRegistersMask = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1ULL << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1ULL << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + gDivRRQuoRem(second, first, second, first); + ssPushNativeRegister(first); + return 0; case 193: - return genLowcodeRem64(); + /* begin genLowcodeRem64 */ + topRegistersMask1 = 0; + rTop1 = (rNext1 = NoReg); + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop1 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext1 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1ULL << reg1; + } + } + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1ULL << rTop1); + } + assert(!(((rTop1 == NoReg) + || (rNext1 == NoReg)))); + rResult = allocateFloatRegNotConflictingWith((1ULL << rTop1) | (1ULL << rNext1)); + assert(!((rResult == NoReg))); + second1 = rTop1; + first1 = rNext1; + result = rResult; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + abort(); + return 0; case 194: - return genLowcodeRightShift32(); + /* begin genLowcodeRightShift32 */ + topRegistersMask2 = 0; + rTop2 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1ULL << reg2; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1ULL << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext2 == NoReg)))); + shiftAmount = rTop2; + value = rNext2; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin LogicalShiftRightR:R: */ + genoperandoperand(LogicalShiftRightRR, shiftAmount, value); + ssPushNativeRegister(value); + return 0; case 195: - return genLowcodeRightShift64(); + /* begin genLowcodeRightShift64 */ + topRegistersMask3 = 0; + rTop3 = (rNext3 = NoReg); + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop3 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext3 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1ULL << reg3; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1ULL << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + rResult1 = allocateFloatRegNotConflictingWith((1ULL << rTop3) | (1ULL << rNext3)); + assert(!((rResult1 == NoReg))); + shiftAmount1 = rTop3; + value1 = rNext3; + result1 = rResult1; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + abort(); + return 0; case 196: - return genLowcodeSignExtend32From16(); + /* begin genLowcodeSignExtend32From16 */ + rTop4 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(0); + } + assert(!((rTop4 == NoReg))); + value2 = rTop4; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value2, value2); + ssPushNativeRegister(value2); + return 0; case 197: - return genLowcodeSignExtend32From8(); + /* begin genLowcodeSignExtend32From8 */ + rTop5 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(0); + } + assert(!((rTop5 == NoReg))); + value3 = rTop5; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value3, value3); + ssPushNativeRegister(value3); + return 0; case 198: - return genLowcodeSignExtend64From16(); + /* begin genLowcodeSignExtend64From16 */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop11 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop11 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop11 == NoReg) { + rTop11 = allocateRegNotConflictingWith(0); + } + assert(!((rTop11 == NoReg))); + value4 = rTop11; + + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value4, value4); + ssPushNativeRegister(value4); + + return 0; case 199: - return genLowcodeSignExtend64From32(); + /* begin genLowcodeSignExtend64From32 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger: */ + rTop12 = NoReg; + rResult11 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop12 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop12 == NoReg) { + rTop12 = allocateRegNotConflictingWith(0); + } + rResult11 = allocateRegNotConflictingWith(1ULL << rTop12); + assert(!(((rTop12 == NoReg) + || (rResult11 == NoReg)))); + value5 = rTop12; + result2 = rResult11; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin SignExtend32R:R: */ + genoperandoperand(SignExtend32RR, value5, value5); + ssPushNativeRegister(value5); + + return 0; case 200: - return genLowcodeSignExtend64From8(); + /* begin genLowcodeSignExtend64From8 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger: */ + rTop13 = NoReg; + rResult12 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop13 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop13 == NoReg) { + rTop13 = allocateRegNotConflictingWith(0); + } + rResult12 = allocateRegNotConflictingWith(1ULL << rTop13); + assert(!(((rTop13 == NoReg) + || (rResult12 == NoReg)))); + value6 = rTop13; + result3 = rResult12; + + nativePopToReg(ssNativeTop(), value6); + ssNativePop(1); + /* begin ZeroExtend16R:R: */ + genoperandoperand(ZeroExtend16RR, value6, value6); + ssPushNativeRegister(value6); + + return 0; case 201: - return genLowcodeStoreFloat32ToMemory(); + /* begin genLowcodeStoreFloat32ToMemory */ + + /* Integer registers */ + frTop = (rTop9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(0); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeValue(1)); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + assert(!(((frTop == NoReg) + || (rTop9 == NoReg)))); + floatValue = frTop; + pointer = rTop9; + + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperandoperand(MoveRsM32r, floatValue, 0, pointer); + return 0; case 202: - return genLowcodeStoreFloat64ToMemory(); + /* begin genLowcodeStoreFloat64ToMemory */ + + /* Integer registers */ + frTop1 = (rTop10 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop10 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(0); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeValue(1)); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + assert(!(((frTop1 == NoReg) + || (rTop10 == NoReg)))); + doubleValue = frTop1; + pointer1 = rTop10; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), doubleValue); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperandoperand(MoveRdM64r, doubleValue, 0, pointer1); + return 0; case 203: - return genLowcodeStoreInt16ToMemory(); + /* begin genLowcodeStoreInt16ToMemory */ + topRegistersMask6 = 0; + rTop14 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop14 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1ULL << reg6; + } + } + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1ULL << rTop14); + } + assert(!(((rTop14 == NoReg) + || (rNext6 == NoReg)))); + pointer2 = rTop14; + value7 = rNext6; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value7, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperandoperand(MoveRM16r, TempReg, 0, pointer2); + return 0; case 204: - return genLowcodeStoreInt32ToMemory(); + /* begin genLowcodeStoreInt32ToMemory */ + topRegistersMask7 = 0; + rTop15 = (rNext7 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext7 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1ULL << reg7; + } + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1ULL << rTop15); + } + assert(!(((rTop15 == NoReg) + || (rNext7 == NoReg)))); + pointer3 = rTop15; + value8 = rNext7; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperandoperand(MoveRM32r, value8, 0, pointer3); + return 0; case 205: - return genLowcodeStoreInt64ToMemory(); + /* begin genLowcodeStoreInt64ToMemory */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask29 = 0; + rTop114 = (rNext110 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop114 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext110 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext110 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg27 = (rNext110 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask29 = 1ULL << reg27; + } + } + if (rTop114 == NoReg) { + rTop114 = allocateRegNotConflictingWith(topRegistersMask29); + } + if (rNext110 == NoReg) { + rNext110 = allocateRegNotConflictingWith(1ULL << rTop114); + } + assert(!(((rTop114 == NoReg) + || (rNext110 == NoReg)))); + pointer5 = rTop114; + value28 = rNext110; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value28); + ssNativePop(1); + assert(BytesPerWord == 8); + /* begin gen:operand:quickConstant:operand: */ + anInstruction21 = genoperandoperandoperand(MoveRMwr, value28, 0, pointer5); + + + return 0; case 206: - return genLowcodeStoreInt8ToMemory(); + /* begin genLowcodeStoreInt8ToMemory */ + topRegistersMask8 = 0; + rTop16 = (rNext8 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop16 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1ULL << reg8; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1ULL << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext8 == NoReg)))); + pointer4 = rTop16; + value9 = rNext8; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value9); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value9, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperandoperand(MoveRM8r, TempReg, 0, pointer4); + return 0; case 207: - return genLowcodeStoreLocalFloat32(); + /* begin genLowcodeStoreLocalFloat32 */ + baseOffset = extA; + /* begin allocateRegistersForLowcodeFloat: */ + topRegistersMask9 = 0; + frTop2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(topRegistersMask9); + } + assert(!((frTop2 == NoReg))); + value10 = frTop2; + + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperandoperand(MoveRsM32r, value10, 0, TempReg); + extA = 0; + return 0; case 208: - return genLowcodeStoreLocalFloat64(); + /* begin genLowcodeStoreLocalFloat64 */ + baseOffset1 = extA; + /* begin allocateRegistersForLowcodeFloat: */ + topRegistersMask10 = 0; + frTop3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + assert(!((frTop3 == NoReg))); + value11 = frTop3; + + nativePopToReg(ssNativeTop(), value11); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperandoperand(MoveRdM64r, value11, 0, TempReg); + extA = 0; + return 0; case 209: - return genLowcodeStoreLocalInt16(); + /* begin genLowcodeStoreLocalInt16 */ + baseOffset2 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop17 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop17 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(0); + } + assert(!((rTop17 == NoReg))); + value12 = rTop17; + + nativePopToReg(ssNativeTop(), value12); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value12, TempReg); + loadNativeLocalAddressto(baseOffset2, value12); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperandoperand(MoveRM16r, TempReg, 0, value12); + extA = 0; + return 0; case 210: - return genLowcodeStoreLocalInt32(); + /* begin genLowcodeStoreLocalInt32 */ + baseOffset3 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop18 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop18 == NoReg) { + rTop18 = allocateRegNotConflictingWith(0); + } + assert(!((rTop18 == NoReg))); + value13 = rTop18; + + nativePopToReg(ssNativeTop(), value13); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset3, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperandoperand(MoveRM32r, value13, 0, TempReg); + extA = 0; + return 0; case 211: - return genLowcodeStoreLocalInt64(); + /* begin genLowcodeStoreLocalInt64 */ + baseOffset6 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop115 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop115 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop115 == NoReg) { + rTop115 = allocateRegNotConflictingWith(0); + } + assert(!((rTop115 == NoReg))); + value29 = rTop115; + + nativePopToReg(ssNativeTop(), value29); + ssNativePop(1); + assert(BytesPerWord == 8); + /* begin gen:operand:quickConstant:operand: */ + anInstruction22 = genoperandoperandoperand(MoveRMwr, value29, 0, TempReg); + + + extA = 0; + return 0; case 212: - return genLowcodeStoreLocalInt8(); + /* begin genLowcodeStoreLocalInt8 */ + baseOffset4 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop19 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(0); + } + assert(!((rTop19 == NoReg))); + value14 = rTop19; + + nativePopToReg(ssNativeTop(), value14); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value14, TempReg); + loadNativeLocalAddressto(baseOffset4, value14); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperandoperand(MoveRM8r, TempReg, 0, value14); + extA = 0; + return 0; case 213: - return genLowcodeStoreLocalPointer(); + /* begin genLowcodeStoreLocalPointer */ + baseOffset5 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop20 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(0); + } + assert(!((rTop20 == NoReg))); + pointerValue5 = rTop20; + + nativePopToReg(ssNativeTop(), pointerValue5); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset5, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperandoperand(MoveRMwr, pointerValue5, 0, TempReg); + extA = 0; + return 0; case 214: - return genLowcodeStorePointerToMemory(); + /* begin genLowcodeStorePointerToMemory */ + topRegistersMask11 = 0; + rTop21 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1ULL << reg9; + } + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(topRegistersMask11); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1ULL << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext9 == NoReg)))); + memoryPointer = rTop21; + pointerValue6 = rNext9; + + nativePopToReg(ssNativeTop(), memoryPointer); + ssNativePop(1); + nativePopToReg(ssNativeTop(), pointerValue6); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperandoperand(MoveRMwr, pointerValue6, 0, memoryPointer); + return 0; case 215: - return genLowcodeSub32(); + /* begin genLowcodeSub32 */ + topRegistersMask12 = 0; + rTop22 = (rNext10 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop22 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext10 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1ULL << reg10; + } + } + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(topRegistersMask12); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1ULL << rTop22); + } + assert(!(((rTop22 == NoReg) + || (rNext10 == NoReg)))); + second2 = rTop22; + first2 = rNext10; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 216: - return genLowcodeSub64(); + /* begin genLowcodeSub64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask13 = 0; + rTop110 = (rNext12 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop110 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext12 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext12 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg11 = (rNext12 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1ULL << reg11; + } + } + if (rTop110 == NoReg) { + rTop110 = allocateRegNotConflictingWith(topRegistersMask13); + } + if (rNext12 == NoReg) { + rNext12 = allocateRegNotConflictingWith(1ULL << rTop110); + } + assert(!(((rTop110 == NoReg) + || (rNext12 == NoReg)))); + second3 = rTop110; + first3 = rNext12; + + nativePopToReg(ssNativeTop(), second3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first3); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, second3, first3); + ssPushNativeRegister(first3); + + return 0; case 217: - return genLowcodeTruncate32To16(); + /* begin genLowcodeTruncate32To16 */ + rTop24 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + assert(!((rTop24 == NoReg))); + value15 = rTop24; + + nativePopToReg(ssNativeTop(), value15); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(AndCqR, 0xFFFF, value15); + ssPushNativeRegister(value15); + return 0; case 218: - return genLowcodeTruncate32To8(); + /* begin genLowcodeTruncate32To8 */ + rTop25 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + assert(!((rTop25 == NoReg))); + value16 = rTop25; + + nativePopToReg(ssNativeTop(), value16); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction25 = genoperandoperand(AndCqR, 0xFF, value16); + ssPushNativeRegister(value16); + return 0; case 219: - return genLowcodeTruncate64To16(); + /* begin genLowcodeTruncate64To16 */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop111 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop111 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop111 == NoReg) { + rTop111 = allocateRegNotConflictingWith(0); + } + assert(!((rTop111 == NoReg))); + value17 = rTop111; + + nativePopToReg(ssNativeTop(), value17); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction27 = genoperandoperand(AndCqR, 0xFFFF, value17); + ssPushNativeRegister(value17); + + return 0; case 220: - return genLowcodeTruncate64To32(); + /* begin genLowcodeTruncate64To32 */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop112 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop112 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop112 == NoReg) { + rTop112 = allocateRegNotConflictingWith(0); + } + assert(!((rTop112 == NoReg))); + value18 = rTop112; + + nativePopToReg(ssNativeTop(), value18); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction28 = genoperandoperand(AndCqR, 0xFFFFFFFFU, value18); + ssPushNativeRegister(value18); + + return 0; case 221: - return genLowcodeTruncate64To8(); + /* begin genLowcodeTruncate64To8 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger: */ + rTop113 = NoReg; + rResult13 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop113 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop113 == NoReg) { + rTop113 = allocateRegNotConflictingWith(0); + } + rResult13 = allocateRegNotConflictingWith(1ULL << rTop113); + assert(!(((rTop113 == NoReg) + || (rResult13 == NoReg)))); + value19 = rTop113; + result4 = rResult13; + + nativePopToReg(ssNativeTop(), value19); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction30 = genoperandoperand(AndCqR, 0xFF, value19); + ssPushNativeRegister(value19); + + return 0; case 222: - return genLowcodeUdiv32(); + /* begin genLowcodeUdiv32 */ + topRegistersMask17 = 0; + rTop29 = (rNext16 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext16 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext16 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (rNext16 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask17 = 1ULL << reg15; + } + } + if (rTop29 == NoReg) { + rTop29 = allocateRegNotConflictingWith(topRegistersMask17); + } + if (rNext16 == NoReg) { + rNext16 = allocateRegNotConflictingWith(1ULL << rTop29); + } + assert(!(((rTop29 == NoReg) + || (rNext16 == NoReg)))); + second4 = rTop29; + first4 = rNext16; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + gDivRRQuoRem(second4, first4, first4, second4); + ssPushNativeRegister(first4); + return 0; case 223: - return genLowcodeUdiv64(); + /* begin genLowcodeUdiv64 */ + topRegistersMask18 = 0; + rTop30 = (rNext17 = NoReg); + rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop30 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext17 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext17 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg16 = (rNext17 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask18 = 1ULL << reg16; + } + } + if (rTop30 == NoReg) { + rTop30 = allocateRegNotConflictingWith(topRegistersMask18); + } + if (rNext17 == NoReg) { + rNext17 = allocateRegNotConflictingWith(1ULL << rTop30); + } + assert(!(((rTop30 == NoReg) + || (rNext17 == NoReg)))); + rResult6 = allocateFloatRegNotConflictingWith((1ULL << rTop30) | (1ULL << rNext17)); + assert(!((rResult6 == NoReg))); + second5 = rTop30; + first5 = rNext17; + result5 = rResult6; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + abort(); + return 0; case 224: - return genLowcodeUint32Great(); + /* begin genLowcodeUint32Great */ + topRegistersMask19 = 0; + rTop31 = (rNext18 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop31 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext18 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext18 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg17 = (rNext18 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask19 = 1ULL << reg17; + } + } + if (rTop31 == NoReg) { + rTop31 = allocateRegNotConflictingWith(topRegistersMask19); + } + if (rNext18 == NoReg) { + rNext18 = allocateRegNotConflictingWith(1ULL << rTop31); + } + assert(!(((rTop31 == NoReg) + || (rNext18 == NoReg)))); + second6 = rTop31; + first6 = rNext18; + + nativePopToReg(ssNativeTop(), second6); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first6); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second6, first6); + /* begin JumpBelowOrEqual: */ + falseJump = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperand(MoveCqR, 1, first6); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperand(MoveCqR, 0, first6); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first6); + return 0; case 225: - return genLowcodeUint32GreatEqual(); + /* begin genLowcodeUint32GreatEqual */ + topRegistersMask20 = 0; + rTop32 = (rNext19 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop32 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext19 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext19 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg18 = (rNext19 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask20 = 1ULL << reg18; + } + } + if (rTop32 == NoReg) { + rTop32 = allocateRegNotConflictingWith(topRegistersMask20); + } + if (rNext19 == NoReg) { + rNext19 = allocateRegNotConflictingWith(1ULL << rTop32); + } + assert(!(((rTop32 == NoReg) + || (rNext19 == NoReg)))); + second7 = rTop32; + first7 = rNext19; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second7, first7); + /* begin JumpBelow: */ + falseJump1 = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction33 = genoperandoperand(MoveCqR, 1, first7); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction34 = genoperandoperand(MoveCqR, 0, first7); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first7); + return 0; case 226: - return genLowcodeUint32Less(); + /* begin genLowcodeUint32Less */ + topRegistersMask21 = 0; + rTop33 = (rNext20 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop33 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext20 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext20 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg19 = (rNext20 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask21 = 1ULL << reg19; + } + } + if (rTop33 == NoReg) { + rTop33 = allocateRegNotConflictingWith(topRegistersMask21); + } + if (rNext20 == NoReg) { + rNext20 = allocateRegNotConflictingWith(1ULL << rTop33); + } + assert(!(((rTop33 == NoReg) + || (rNext20 == NoReg)))); + second8 = rTop33; + first8 = rNext20; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second8, first8); + /* begin JumpAboveOrEqual: */ + falseJump2 = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction35 = genoperandoperand(MoveCqR, 1, first8); + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction36 = genoperandoperand(MoveCqR, 0, first8); + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first8); + return 0; case 227: - return genLowcodeUint32LessEqual(); + /* begin genLowcodeUint32LessEqual */ + topRegistersMask22 = 0; + rTop34 = (rNext21 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop34 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext21 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext21 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg20 = (rNext21 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask22 = 1ULL << reg20; + } + } + if (rTop34 == NoReg) { + rTop34 = allocateRegNotConflictingWith(topRegistersMask22); + } + if (rNext21 == NoReg) { + rNext21 = allocateRegNotConflictingWith(1ULL << rTop34); + } + assert(!(((rTop34 == NoReg) + || (rNext21 == NoReg)))); + second9 = rTop34; + first9 = rNext21; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second9, first9); + /* begin JumpAbove: */ + falseJump3 = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction37 = genoperandoperand(MoveCqR, 1, first9); + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction38 = genoperandoperand(MoveCqR, 0, first9); + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first9); + return 0; case 228: - return genLowcodeUint32ToFloat32(); + /* begin genLowcodeUint32ToFloat32 */ + rTop35 = NoReg; + frResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop35 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop35 == NoReg) { + rTop35 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop35 == NoReg) + || (frResult == NoReg)))); + value20 = rTop35; + result6 = frResult; + + nativePopToReg(ssNativeTop(), value20); + ssNativePop(1); + /* begin ConvertR:Rs: */ + genoperandoperand(ConvertRRs, value20, result6); + ssPushNativeRegisterSingleFloat(result6); + return 0; case 229: - return genLowcodeUint32ToFloat64(); + /* begin genLowcodeUint32ToFloat64 */ + rTop36 = NoReg; + frResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop36 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop36 == NoReg) { + rTop36 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop36 == NoReg) + || (frResult1 == NoReg)))); + value21 = rTop36; + result7 = frResult1; + + nativePopToReg(ssNativeTop(), value21); + ssNativePop(1); + /* begin ConvertR:Rd: */ + genoperandoperand(ConvertRRd, value21, result7); + ssPushNativeRegisterDoubleFloat(result7); + return 0; case 230: - return genLowcodeUint64Great(); + /* begin genLowcodeUint64Great */ + topRegistersMask23 = 0; + rTop37 = (rNext22 = NoReg); + rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop37 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext22 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext22 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg21 = (rNext22 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask23 = 1ULL << reg21; + } + } + if (rTop37 == NoReg) { + rTop37 = allocateRegNotConflictingWith(topRegistersMask23); + } + if (rNext22 == NoReg) { + rNext22 = allocateRegNotConflictingWith(1ULL << rTop37); + } + assert(!(((rTop37 == NoReg) + || (rNext22 == NoReg)))); + rResult7 = allocateFloatRegNotConflictingWith((1ULL << rTop37) | (1ULL << rNext22)); + assert(!((rResult7 == NoReg))); + second10 = rTop37; + first10 = rNext22; + value22 = rResult7; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + abort(); + return 0; case 231: - return genLowcodeUint64GreatEqual(); + /* begin genLowcodeUint64GreatEqual */ + topRegistersMask24 = 0; + rTop38 = (rNext23 = NoReg); + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop38 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext23 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext23 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg22 = (rNext23 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask24 = 1ULL << reg22; + } + } + if (rTop38 == NoReg) { + rTop38 = allocateRegNotConflictingWith(topRegistersMask24); + } + if (rNext23 == NoReg) { + rNext23 = allocateRegNotConflictingWith(1ULL << rTop38); + } + assert(!(((rTop38 == NoReg) + || (rNext23 == NoReg)))); + rResult8 = allocateFloatRegNotConflictingWith((1ULL << rTop38) | (1ULL << rNext23)); + assert(!((rResult8 == NoReg))); + second11 = rTop38; + first11 = rNext23; + value23 = rResult8; + + nativePopToReg(ssNativeTop(), second11); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first11); + ssNativePop(1); + abort(); + return 0; case 232: - return genLowcodeUint64Less(); + /* begin genLowcodeUint64Less */ + topRegistersMask25 = 0; + rTop39 = (rNext24 = NoReg); + rResult9 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop39 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext24 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext24 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg23 = (rNext24 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask25 = 1ULL << reg23; + } + } + if (rTop39 == NoReg) { + rTop39 = allocateRegNotConflictingWith(topRegistersMask25); + } + if (rNext24 == NoReg) { + rNext24 = allocateRegNotConflictingWith(1ULL << rTop39); + } + assert(!(((rTop39 == NoReg) + || (rNext24 == NoReg)))); + rResult9 = allocateFloatRegNotConflictingWith((1ULL << rTop39) | (1ULL << rNext24)); + assert(!((rResult9 == NoReg))); + second12 = rTop39; + first12 = rNext24; + value24 = rResult9; + + nativePopToReg(ssNativeTop(), second12); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first12); + ssNativePop(1); + abort(); + return 0; case 233: - return genLowcodeUint64LessEqual(); + /* begin genLowcodeUint64LessEqual */ + topRegistersMask26 = 0; + rTop40 = (rNext25 = NoReg); + rResult10 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop40 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext25 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext25 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg24 = (rNext25 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask26 = 1ULL << reg24; + } + } + if (rTop40 == NoReg) { + rTop40 = allocateRegNotConflictingWith(topRegistersMask26); + } + if (rNext25 == NoReg) { + rNext25 = allocateRegNotConflictingWith(1ULL << rTop40); + } + assert(!(((rTop40 == NoReg) + || (rNext25 == NoReg)))); + rResult10 = allocateFloatRegNotConflictingWith((1ULL << rTop40) | (1ULL << rNext25)); + assert(!((rResult10 == NoReg))); + second13 = rTop40; + first13 = rNext25; + value25 = rResult10; + + nativePopToReg(ssNativeTop(), second13); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first13); + ssNativePop(1); + abort(); + return 0; case 234: - return genLowcodeUint64ToFloat32(); + /* begin genLowcodeUint64ToFloat32 */ + rTop41 = NoReg; + frResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop41 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop41 == NoReg) { + rTop41 = allocateRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop41 == NoReg) + || (frResult2 == NoReg)))); + value26 = rTop41; + result8 = frResult2; + + nativePopToReg(ssNativeTop(), value26); + ssNativePop(1); + abort(); + return 0; case 235: - return genLowcodeUint64ToFloat64(); + /* begin genLowcodeUint64ToFloat64 */ + rTop42 = NoReg; + frResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop42 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop42 == NoReg) { + rTop42 = allocateRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop42 == NoReg) + || (frResult3 == NoReg)))); + value27 = rTop42; + result9 = frResult3; + + nativePopToReg(ssNativeTop(), value27); + ssNativePop(1); + abort(); + return 0; case 236: - return genLowcodeUmul32(); + /* begin genLowcodeUmul32 */ + topRegistersMask27 = 0; + rTop43 = (rNext26 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop43 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext26 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext26 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg25 = (rNext26 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask27 = 1ULL << reg25; + } + } + if (rTop43 == NoReg) { + rTop43 = allocateRegNotConflictingWith(topRegistersMask27); + } + if (rNext26 == NoReg) { + rNext26 = allocateRegNotConflictingWith(1ULL << rTop43); + } + assert(!(((rTop43 == NoReg) + || (rNext26 == NoReg)))); + second14 = rTop43; + first14 = rNext26; + + nativePopToReg(ssNativeTop(), second14); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first14); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, second14, first14); + ssPushNativeRegister(first14); + return 0; case 237: - return genLowcodeUmul64(); + /* begin genLowcodeUmul64 */ + topRegistersMask28 = 0; + rTop44 = (rNext27 = NoReg); + rResult14 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop44 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext27 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext27 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg26 = (rNext27 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask28 = 1ULL << reg26; + } + } + if (rTop44 == NoReg) { + rTop44 = allocateRegNotConflictingWith(topRegistersMask28); + } + if (rNext27 == NoReg) { + rNext27 = allocateRegNotConflictingWith(1ULL << rTop44); + } + assert(!(((rTop44 == NoReg) + || (rNext27 == NoReg)))); + rResult14 = allocateFloatRegNotConflictingWith((1ULL << rTop44) | (1ULL << rNext27)); + assert(!((rResult14 == NoReg))); + second15 = rTop44; + first15 = rNext27; + result10 = rResult14; + + nativePopToReg(ssNativeTop(), second15); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first15); + ssNativePop(1); + abort(); + return 0; case 238: return 0; case 239: - return genLowcodeUnlockVM(); + /* begin genLowcodeUnlockVM */ + abort(); + return 0; case 240: - return genLowcodeUrem32(); + /* begin genLowcodeUrem32 */ + topRegistersMask31 = 0; + rTop47 = (rNext30 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop47 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext30 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext30 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg29 = (rNext30 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask31 = 1ULL << reg29; + } + } + if (rTop47 == NoReg) { + rTop47 = allocateRegNotConflictingWith(topRegistersMask31); + } + if (rNext30 == NoReg) { + rNext30 = allocateRegNotConflictingWith(1ULL << rTop47); + } + assert(!(((rTop47 == NoReg) + || (rNext30 == NoReg)))); + second16 = rTop47; + first16 = rNext30; + + nativePopToReg(ssNativeTop(), second16); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first16); + ssNativePop(1); + gDivRRQuoRem(second16, first16, second16, first16); + ssPushNativeRegister(first16); + return 0; case 241: - return genLowcodeUrem64(); + /* begin genLowcodeUrem64 */ + topRegistersMask32 = 0; + rTop48 = (rNext31 = NoReg); + rResult15 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop48 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext31 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext31 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg30 = (rNext31 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask32 = 1ULL << reg30; + } + } + if (rTop48 == NoReg) { + rTop48 = allocateRegNotConflictingWith(topRegistersMask32); + } + if (rNext31 == NoReg) { + rNext31 = allocateRegNotConflictingWith(1ULL << rTop48); + } + assert(!(((rTop48 == NoReg) + || (rNext31 == NoReg)))); + rResult15 = allocateFloatRegNotConflictingWith((1ULL << rTop48) | (1ULL << rNext31)); + assert(!((rResult15 == NoReg))); + second17 = rTop48; + first17 = rNext31; + result11 = rResult15; + + nativePopToReg(ssNativeTop(), second17); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first17); + ssNativePop(1); + abort(); + return 0; case 242: - return genLowcodeXor32(); + /* begin genLowcodeXor32 */ + topRegistersMask33 = 0; + rTop49 = (rNext32 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop49 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext32 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext32 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg31 = (rNext32 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask33 = 1ULL << reg31; + } + } + if (rTop49 == NoReg) { + rTop49 = allocateRegNotConflictingWith(topRegistersMask33); + } + if (rNext32 == NoReg) { + rNext32 = allocateRegNotConflictingWith(1ULL << rTop49); + } + assert(!(((rTop49 == NoReg) + || (rNext32 == NoReg)))); + second18 = rTop49; + first18 = rNext32; + + nativePopToReg(ssNativeTop(), second18); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first18); + ssNativePop(1); + /* begin XorR:R: */ + genoperandoperand(XorRR, second18, first18); + ssPushNativeRegister(first18); + return 0; case 243: - return genLowcodeXor64(); + /* begin genLowcodeXor64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask34 = 0; + rTop116 = (rNext111 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop116 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext111 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext111 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg32 = (rNext111 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask34 = 1ULL << reg32; + } + } + if (rTop116 == NoReg) { + rTop116 = allocateRegNotConflictingWith(topRegistersMask34); + } + if (rNext111 == NoReg) { + rNext111 = allocateRegNotConflictingWith(1ULL << rTop116); + } + assert(!(((rTop116 == NoReg) + || (rNext111 == NoReg)))); + second19 = rTop116; + first19 = rNext111; + + nativePopToReg(ssNativeTop(), second19); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first19); + ssNativePop(1); + /* begin XorR:R: */ + genoperandoperand(XorRR, second19, first19); + ssPushNativeRegister(first19); + + return 0; case 244: - return genLowcodeZeroExtend32From16(); + /* begin genLowcodeZeroExtend32From16 */ + rTop51 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop51 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop51 == NoReg) { + rTop51 = allocateRegNotConflictingWith(0); + } + assert(!((rTop51 == NoReg))); + value30 = rTop51; + + nativePopToReg(ssNativeTop(), value30); + ssNativePop(1); + /* begin ZeroExtend16R:R: */ + genoperandoperand(ZeroExtend16RR, value30, value30); + ssPushNativeRegister(value30); + return 0; case 245: - return genLowcodeZeroExtend32From8(); + /* begin genLowcodeZeroExtend32From8 */ + rTop52 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop52 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop52 == NoReg) { + rTop52 = allocateRegNotConflictingWith(0); + } + assert(!((rTop52 == NoReg))); + value31 = rTop52; + + nativePopToReg(ssNativeTop(), value31); + ssNativePop(1); + /* begin ZeroExtend8R:R: */ + genoperandoperand(ZeroExtend8RR, value31, value31); + ssPushNativeRegister(value31); + return 0; case 246: - return genLowcodeZeroExtend64From16(); + /* begin genLowcodeZeroExtend64From16 */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop117 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop117 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop117 == NoReg) { + rTop117 = allocateRegNotConflictingWith(0); + } + assert(!((rTop117 == NoReg))); + value32 = rTop117; + + nativePopToReg(ssNativeTop(), value32); + ssNativePop(1); + /* begin ZeroExtend16R:R: */ + genoperandoperand(ZeroExtend16RR, value32, value32); + ssPushNativeRegister(value32); + + return 0; default: return genLowcodeUnaryInlinePrimitive5(prim); @@ -38668,213 +36603,2425 @@ genLowcodeUnaryInlinePrimitive4(sqInt prim) /* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive5: */ -static sqInt NoDbgRegParms -genLowcodeUnaryInlinePrimitive5(sqInt prim) -{ + /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive5: */ +static sqInt NoDbgRegParms +genLowcodeUnaryInlinePrimitive5(sqInt prim) +{ + sqInt result; + sqInt resultValue; + sqInt rResult1; + sqInt rTop1; + sqInt rTop11; + sqInt value; + sqInt value1; + sqInt valueValue; + sqInt valueValue1; + + + switch (prim) { + case 247: + /* begin genLowcodeZeroExtend64From32 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger: */ + rTop1 = NoReg; + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop1 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1ULL << rTop1); + assert(!(((rTop1 == NoReg) + || (rResult1 == NoReg)))); + value = rTop1; + result = rResult1; + + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin ZeroExtend32R:R: */ + genoperandoperand(ZeroExtend32RR, value, value); + ssPushNativeRegister(value); + + return 0; + + case 0xF8: + /* begin genLowcodeZeroExtend64From8 */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop11 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop11 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop11 == NoReg) { + rTop11 = allocateRegNotConflictingWith(0); + } + assert(!((rTop11 == NoReg))); + value1 = rTop11; + + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + /* begin ZeroExtend8R:R: */ + genoperandoperand(ZeroExtend8RR, value1, value1); + ssPushNativeRegister(value1); + + return 0; + + default: + return EncounteredUnknownBytecode; + + } + return 0; +} + + +/* Lowcode instruction generator dispatch */ + + /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeUnaryInlinePrimitive(sqInt prim) +{ + AbstractInstruction *abstractInstruction; + sqInt address; + sqInt address1; + sqInt alignment; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction25; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction27; + AbstractInstruction *anInstruction28; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction30; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt base; + sqInt base1; + sqInt baseValue; + sqInt baseValue1; + sqInt check; + sqInt checkValue; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump10; + AbstractInstruction * contJump11; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + AbstractInstruction * contJump4; + AbstractInstruction * contJump5; + AbstractInstruction * contJump6; + AbstractInstruction * contJump7; + AbstractInstruction * contJump8; + AbstractInstruction * contJump9; + sqInt dup2; + sqInt dup21; + sqInt dup22; + sqInt dup23; + sqInt dup24; + sqInt dup2Value; + sqInt dup2Value1; + sqInt dup2Value2; + sqInt dup2Value3; + sqInt dup2Value4; + sqInt expectedSession; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump10; + AbstractInstruction * falseJump11; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump3; + AbstractInstruction * falseJump4; + AbstractInstruction * falseJump5; + AbstractInstruction * falseJump6; + AbstractInstruction * falseJump7; + AbstractInstruction * falseJump8; + AbstractInstruction * falseJump9; + sqInt first; + sqInt first1; + sqInt first10; + sqInt first11; + sqInt first12; + sqInt first13; + sqInt first14; + sqInt first15; + sqInt first16; + sqInt first17; + sqInt first18; + sqInt first19; + sqInt first2; + sqInt first20; + sqInt first21; + sqInt first22; + sqInt first23; + sqInt first24; + sqInt first25; + sqInt first3; + sqInt first4; + sqInt first5; + sqInt first6; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue10; + sqInt firstValue11; + sqInt firstValue12; + sqInt firstValue13; + sqInt firstValue14; + sqInt firstValue15; + sqInt firstValue16; + sqInt firstValue17; + sqInt firstValue18; + sqInt firstValue19; + sqInt firstValue2; + sqInt firstValue20; + sqInt firstValue21; + sqInt firstValue22; + sqInt firstValue23; + sqInt firstValue24; + sqInt firstValue25; + sqInt firstValue3; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue6; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt frNext; + sqInt frNext1; + sqInt frNext10; + sqInt frNext11; + sqInt frNext2; + sqInt frNext3; + sqInt frNext4; + sqInt frNext5; + sqInt frNext6; + sqInt frNext7; + sqInt frNext8; + sqInt frNext9; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frTop; + sqInt frTop1; + sqInt frTop10; + sqInt frTop11; + sqInt frTop12; + sqInt frTop13; + sqInt frTop14; + sqInt frTop15; + sqInt frTop16; + sqInt frTop17; + sqInt frTop18; + sqInt frTop19; + sqInt frTop2; + sqInt frTop20; + sqInt frTop21; + sqInt frTop22; + sqInt frTop3; + sqInt frTop4; + sqInt frTop5; + sqInt frTop6; + sqInt frTop7; + sqInt frTop8; + sqInt frTop9; + sqInt function; + sqInt index; + sqInt index1; + sqInt indexValue; + sqInt indexValue1; + sqInt literal; + sqInt nativeValueIndex2; + sqInt nativeValueIndex3; + sqInt nativeValueIndex4; + sqInt newValue; + sqInt newValueValue; + sqInt offset; + sqInt offset1; + sqInt offsetValue; + sqInt offsetValue1; + sqInt oldValue; + sqInt oldValueValue; + sqInt pointerValue; + sqInt pointerValueValue; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg11; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg16; + sqInt reg17; + sqInt reg18; + sqInt reg19; + sqInt reg20; + sqInt reg21; + sqInt reg22; + sqInt reg23; + sqInt reg24; + sqInt reg25; + sqInt reg26; + sqInt reg27; + sqInt reg28; + sqInt reg29; + sqInt reg3; + sqInt reg4; + sqInt reg5; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt registerID; + sqInt registerMask2; + sqInt registerMask3; + sqInt registerMask4; + sqInt result; + sqInt result1; + sqInt result2; + sqInt result3; + sqInt result4; + sqInt result5; + sqInt result6; + sqInt result7; + sqInt result8; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue2; + sqInt resultValue3; + sqInt resultValue4; + sqInt resultValue5; + sqInt resultValue6; + sqInt resultValue7; + sqInt resultValue8; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext11; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext17; + sqInt rNext18; + sqInt rNext19; + sqInt rNext20; + sqInt rNext21; + sqInt rNext22; + sqInt rNext4; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext2; + sqInt rNextNext3; + sqInt rNextNext4; + sqInt rNextNextNext2; + sqInt rNextNextNext3; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult11; + sqInt rResult12; + sqInt rResult13; + sqInt rResult14; + sqInt rResult15; + sqInt rResult16; + sqInt rResult17; + sqInt rResult18; + sqInt rResult19; + sqInt rResult2; + sqInt rResult20; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult3; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop11; + sqInt rTop12; + sqInt rTop13; + sqInt rTop14; + sqInt rTop16; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop4; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt scale; + sqInt scale1; + sqInt scaleValue; + sqInt scaleValue1; + sqInt second; + sqInt second1; + sqInt second10; + sqInt second11; + sqInt second12; + sqInt second13; + sqInt second14; + sqInt second15; + sqInt second16; + sqInt second17; + sqInt second18; + sqInt second19; + sqInt second2; + sqInt second20; + sqInt second21; + sqInt second22; + sqInt second23; + sqInt second24; + sqInt second25; + sqInt second3; + sqInt second4; + sqInt second5; + sqInt second6; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue10; + sqInt secondValue11; + sqInt secondValue12; + sqInt secondValue13; + sqInt secondValue14; + sqInt secondValue15; + sqInt secondValue16; + sqInt secondValue17; + sqInt secondValue18; + sqInt secondValue19; + sqInt secondValue2; + sqInt secondValue20; + sqInt secondValue21; + sqInt secondValue22; + sqInt secondValue23; + sqInt secondValue24; + sqInt secondValue25; + sqInt secondValue3; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue6; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt singleFloatValue; + sqInt singleFloatValueValue; + sqInt size; + sqInt size1; + sqInt sizeValue; + sqInt sizeValue1; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask13; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask16; + sqInt topRegistersMask17; + sqInt topRegistersMask18; + sqInt topRegistersMask19; + sqInt topRegistersMask20; + sqInt topRegistersMask21; + sqInt topRegistersMask22; + sqInt topRegistersMask23; + sqInt topRegistersMask24; + sqInt topRegistersMask25; + sqInt topRegistersMask26; + sqInt topRegistersMask27; + sqInt topRegistersMask28; + sqInt topRegistersMask29; + sqInt topRegistersMask3; + sqInt topRegistersMask30; + sqInt topRegistersMask31; + sqInt topRegistersMask32; + sqInt topRegistersMask4; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value17; + sqInt value18; + sqInt value19; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue17; + sqInt valueValue18; + sqInt valueValue19; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + switch (prim) { - case 247: - return genLowcodeZeroExtend64From32(); + case 0: + /* begin genLowcodeAdd32 */ + topRegistersMask = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1ULL << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1ULL << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; - case 0xF8: - return genLowcodeZeroExtend64From8(); + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, second, first); + ssPushNativeRegister(first); + return 0; - default: - return EncounteredUnknownBytecode; + case 1: + /* begin genLowcodeAdd64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask1 = 0; + rTop1 = (rNext1 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop1 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext1 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1ULL << reg1; + } + } + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1ULL << rTop1); + } + assert(!(((rTop1 == NoReg) + || (rNext1 == NoReg)))); + second1 = rTop1; + first1 = rNext1; - } - return 0; -} + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, second1, first1); + ssPushNativeRegister(first1); + return 0; -/* Lowcode instruction generator dispatch */ + case 2: + /* begin genLowcodeAlloca32 */ + rTop27 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(0); + } + assert(!((rTop27 == NoReg))); + size1 = rTop27; - /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeUnaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeAdd32(); + nativePopToReg(ssNativeTop(), size1); + ssNativePop(1); + /* begin MoveAw:R: */ + address = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction = genoperandoperand(MoveAwR, address, TempReg); + /* begin SubR:R: */ + genoperandoperand(SubRR, size1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(AndCqR, -16, TempReg); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, size1); + /* begin MoveR:Aw: */ + address1 = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction2 = genoperandoperand(MoveRAw, size1, address1); + ssPushNativeRegister(size1); + return 0; - case 1: - return genLowcodeAdd64(); + case 3: + /* begin genLowcodeAlloca64 */ + /* begin allocateRegistersForLowcodeInteger: */ + rTop11 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop11 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop11 == NoReg) { + rTop11 = allocateRegNotConflictingWith(0); + } + assert(!((rTop11 == NoReg))); + size = rTop11; - case 2: - return genLowcodeAlloca32(); + nativePopToReg(ssNativeTop(), size); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, size, SPReg); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, SPReg, size); + ssPushNativeRegister(size); - case 3: - return genLowcodeAlloca64(); + return 0; case 4: - return genLowcodeAnd32(); + /* begin genLowcodeAnd32 */ + topRegistersMask3 = 0; + rTop4 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1ULL << reg3; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1ULL << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext4 == NoReg)))); + second2 = rTop4; + first2 = rNext4; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin AndR:R: */ + genoperandoperand(AndRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 5: - return genLowcodeAnd64(); + /* begin genLowcodeAnd64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask4 = 0; + rTop12 = (rNext11 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop12 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext11 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext11 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext11 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1ULL << reg4; + } + } + if (rTop12 == NoReg) { + rTop12 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext11 == NoReg) { + rNext11 = allocateRegNotConflictingWith(1ULL << rTop12); + } + assert(!(((rTop12 == NoReg) + || (rNext11 == NoReg)))); + second3 = rTop12; + first3 = rNext11; + + nativePopToReg(ssNativeTop(), second3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first3); + ssNativePop(1); + /* begin AndR:R: */ + genoperandoperand(AndRR, second3, first3); + ssPushNativeRegister(first3); + + return 0; case 6: - return genLowcodeArithmeticRightShift32(); + /* begin genLowcodeArithmeticRightShift32 */ + topRegistersMask5 = 0; + rTop6 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1ULL << reg5; + } + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1ULL << rTop6); + } + assert(!(((rTop6 == NoReg) + || (rNext6 == NoReg)))); + shiftAmount = rTop6; + value = rNext6; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin ArithmeticShiftRightR:R: */ + genoperandoperand(ArithmeticShiftRightRR, shiftAmount, value); + ssPushNativeRegister(value); + return 0; case 7: - return genLowcodeArithmeticRightShift64(); + /* begin genLowcodeArithmeticRightShift64 */ + topRegistersMask6 = 0; + rTop7 = (rNext7 = NoReg); + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop7 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext7 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1ULL << reg6; + } + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1ULL << rTop7); + } + assert(!(((rTop7 == NoReg) + || (rNext7 == NoReg)))); + rResult = allocateFloatRegNotConflictingWith((1ULL << rTop7) | (1ULL << rNext7)); + assert(!((rResult == NoReg))); + shiftAmount1 = rTop7; + value1 = rNext7; + result = rResult; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + abort(); + return 0; case 8: - return genLowcodeBeginCall(); + /* begin genLowcodeBeginCall */ + alignment = extA; + beginHighLevelCall(alignment); + extA = 0; + return 0; case 9: - return genLowcodeCallArgumentFloat32(); + /* begin genLowcodeCallArgumentFloat32 */ + nativeStackPopToReg(ssNativeTop(), DPFPReg0); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + literal = -BytesPerWord; + anInstruction3 = genoperandoperandoperand(MoveRsM32r, DPFPReg0, -BytesPerWord, SPReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(SubCqR, BytesPerWord, SPReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 10: - return genLowcodeCallArgumentFloat64(); + /* begin genLowcodeCallArgumentFloat64 */ + nativeStackPopToReg(ssNativeTop(), DPFPReg0); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperandoperand(MoveRdM64r, DPFPReg0, -8, SPReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperand(SubCqR, 8, SPReg); + currentCallCleanUpSize += 8; + return 0; case 11: - return genLowcodeCallArgumentInt32(); + /* begin genLowcodeCallArgumentInt32 */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 12: - return genLowcodeCallArgumentInt64(); + /* begin genLowcodeCallArgumentInt64 */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + currentCallCleanUpSize += BytesPerWord; + + return 0; case 13: - return genLowcodeCallArgumentPointer(); + /* begin genLowcodeCallArgumentPointer */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 14: - return genLowcodeCallArgumentSpace(); + /* begin genLowcodeCallArgumentSpace */ + anInstruction7 = genoperandoperand(SubCqR, extA, SPReg); + currentCallCleanUpSize += extA; + extA = 0; + return 0; case 15: - return genLowcodeCallArgumentStructure(); + /* begin genLowcodeCallArgumentStructure */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperand(SubCqR, extA, SPReg); + + /* Copy the structure */ + currentCallCleanUpSize += extA; + genMemCopytoconstantSize(backEnd, TempReg, SPReg, extA); + extA = 0; + return 0; case 16: - return genLowcodeCallInstruction(); + /* begin genLowcodeCallInstruction */ + function = extA; + /* begin CallRT: */ + abstractInstruction = genoperand(Call, function); + (abstractInstruction->annotation = IsRelativeCall); + extA = 0; + return 0; case 17: - return genLowcodeCallPhysical(); + /* begin genLowcodeCallPhysical */ + registerID = extA; + /* begin CallR: */ + genoperand(CallR, registerID); + extA = 0; + return 0; case 18: - return genLowcodeCheckSessionIdentifier(); + /* begin genLowcodeCheckSessionIdentifier */ + expectedSession = extA; + ssPushNativeConstantInt32((expectedSession == (getThisSessionID()) + ? 1 + : 0)); + extA = 0; + return 0; case 19: - return genLowcodeCompareAndSwap32(); + /* begin genLowcodeCompareAndSwap32 */ + rTop8 = (rNext8 = (rNextNext2 = NoReg)); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext8 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + } + if (rTop8 == NoReg) { + registerMask2 = 0; + if (rNext8 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1ULL << rNext8; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1ULL << rNextNext2); + } + rTop8 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext8 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1ULL << rTop8; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1ULL << rNextNext2); + } + rNext8 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1ULL << rTop8) | (1ULL << rNext8); + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop8 == NoReg) + || ((rNext8 == NoReg) + || (rNextNext2 == NoReg))))); + rResult1 = allocateRegNotConflictingWith(((1ULL << rTop8) | (1ULL << rNext8)) | (1ULL << rNextNext2)); + assert(!((rResult1 == NoReg))); + newValue = rTop8; + oldValue = rNext8; + check = rNextNext2; + value2 = rResult1; + + nativePopToReg(ssNativeTop(), newValue); + ssNativePop(1); + nativePopToReg(ssNativeTop(), oldValue); + ssNativePop(1); + nativePopToReg(ssNativeTop(), check); + ssNativePop(1); + abort(); + return 0; case 20: - return genLowcodeDiv32(); + /* begin genLowcodeDiv32 */ + topRegistersMask7 = 0; + rTop9 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1ULL << reg7; + } + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1ULL << rTop9); + } + assert(!(((rTop9 == NoReg) + || (rNext9 == NoReg)))); + second4 = rTop9; + first4 = rNext9; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + gDivRRQuoRem(second4, first4, first4, second4); + ssPushNativeRegister(first4); + return 0; case 21: - return genLowcodeDiv64(); + /* begin genLowcodeDiv64 */ + topRegistersMask8 = 0; + rTop10 = (rNext10 = NoReg); + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1ULL << reg8; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1ULL << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext10 == NoReg)))); + rResult2 = allocateFloatRegNotConflictingWith((1ULL << rTop10) | (1ULL << rNext10)); + assert(!((rResult2 == NoReg))); + second5 = rTop10; + first5 = rNext10; + result1 = rResult2; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + abort(); + return 0; case 22: - return genLowcodeDuplicateFloat32(); + /* begin genLowcodeDuplicateFloat32 */ + frTop = NoReg; + + /* Float argument */ + frResult = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(1ULL << frTop); + assert(!(((frTop == NoReg) + || (frResult == NoReg)))); + value3 = frTop; + dup2 = frResult; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin MoveRs:Rs: */ + genoperandoperand(MoveRsRs, value3, dup2); + ssPushNativeRegisterSingleFloat(value3); + ssPushNativeRegisterSingleFloat(dup2); + return 0; case 23: - return genLowcodeDuplicateFloat64(); + /* begin genLowcodeDuplicateFloat64 */ + frTop1 = NoReg; + + /* Float argument */ + frResult1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(1ULL << frTop1); + assert(!(((frTop1 == NoReg) + || (frResult1 == NoReg)))); + value4 = frTop1; + dup21 = frResult1; + + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + /* begin MoveRd:Rd: */ + genoperandoperand(MoveRdRd, value4, dup21); + ssPushNativeRegisterDoubleFloat(value4); + ssPushNativeRegisterDoubleFloat(dup21); + return 0; case 24: - return genLowcodeDuplicateInt32(); + /* begin genLowcodeDuplicateInt32 */ + rTop13 = NoReg; + rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop13 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop13 == NoReg) { + rTop13 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1ULL << rTop13); + assert(!(((rTop13 == NoReg) + || (rResult3 == NoReg)))); + value5 = rTop13; + dup22 = rResult3; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value5, dup22); + ssPushNativeRegister(value5); + ssPushNativeRegister(dup22); + return 0; case 25: - return genLowcodeDuplicateInt64(); + /* begin genLowcodeDuplicateInt64 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger: */ + rTop14 = NoReg; + rResult11 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop14 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(0); + } + rResult11 = allocateRegNotConflictingWith(1ULL << rTop14); + assert(!(((rTop14 == NoReg) + || (rResult11 == NoReg)))); + value6 = rTop14; + dup23 = rResult11; + + nativePopToReg(ssNativeTop(), value6); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value6, dup23); + ssPushNativeRegister(value6); + ssPushNativeRegister(dup23); + + return 0; case 26: - return genLowcodeDuplicatePointer(); + /* begin genLowcodeDuplicatePointer */ + rTop16 = NoReg; + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop16 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(0); + } + rResult5 = allocateRegNotConflictingWith(1ULL << rTop16); + assert(!(((rTop16 == NoReg) + || (rResult5 == NoReg)))); + pointerValue = rTop16; + dup24 = rResult5; + + nativePopToReg(ssNativeTop(), pointerValue); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointerValue, dup24); + ssPushNativeRegister(pointerValue); + ssPushNativeRegister(dup24); + return 0; case 27: - return genLowcodeEffectiveAddress32(); + /* begin genLowcodeEffectiveAddress32 */ + rTop17 = (rNext13 = (rNextNext3 = (rNextNextNext2 = NoReg))); + nativeValueIndex3 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop17 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNext13 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + nativeValueIndex3 += 1; + } + } + if (rTop17 == NoReg) { + registerMask3 = 0; + if (rNext13 != NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1ULL << rNext13; + } + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1ULL << rNextNext3); + } + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1ULL << rNextNextNext2); + } + rTop17 = allocateRegNotConflictingWith(registerMask3); + } + if (rNext13 == NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1ULL << rTop17; + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1ULL << rNextNext3); + } + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1ULL << rNextNextNext2); + } + rNext13 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNext3 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask3 = (1ULL << rTop17) | (1ULL << rNext13); + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1ULL << rNextNextNext2); + } + rNextNext3 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNextNext2 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask3 = ((1ULL << rTop17) | (1ULL << rNext13)) | (1ULL << rNextNext3); + rNextNextNext2 = allocateRegNotConflictingWith(registerMask3); + } + assert(!(((rTop17 == NoReg) + || ((rNext13 == NoReg) + || ((rNextNext3 == NoReg) + || (rNextNextNext2 == NoReg)))))); + offset = rTop17; + scale = rNext13; + index = rNextNext3; + base = rNextNextNext2; + + nativePopToReg(ssNativeTop(), offset); + ssNativePop(1); + nativePopToReg(ssNativeTop(), scale); + ssNativePop(1); + nativePopToReg(ssNativeTop(), index); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, scale, index); + /* begin AddR:R: */ + genoperandoperand(AddRR, index, base); + /* begin AddR:R: */ + genoperandoperand(AddRR, offset, base); + ssPushNativeRegister(base); + return 0; case 28: - return genLowcodeEffectiveAddress64(); + /* begin genLowcodeEffectiveAddress64 */ + rTop18 = (rNext14 = (rNextNext4 = (rNextNextNext3 = NoReg))); + rResult6 = NoReg; + nativeValueIndex4 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNext14 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNext4 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + } + nativeValueIndex4 += 1; + } + } + if (rNextNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNext4 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNextNext3 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4)); + } + nativeValueIndex4 += 1; + } + } + if (rNextNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + nativeValueIndex4 += 1; + } + } + if (rTop18 == NoReg) { + registerMask4 = 0; + if (rNext14 != NoReg) { + /* begin registerMaskFor: */ + registerMask4 = 1ULL << rNext14; + } + if (rNextNext4 != NoReg) { + registerMask4 = registerMask4 | (1ULL << rNextNext4); + } + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1ULL << rNextNextNext3); + } + rTop18 = allocateRegNotConflictingWith(registerMask4); + } + if (rNext14 == NoReg) { + /* begin registerMaskFor: */ + registerMask4 = 1ULL << rTop18; + if (rNextNext4 != NoReg) { + registerMask4 = registerMask4 | (1ULL << rNextNext4); + } + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1ULL << rNextNextNext3); + } + rNext14 = allocateRegNotConflictingWith(registerMask4); + } + if (rNextNext4 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask4 = (1ULL << rTop18) | (1ULL << rNext14); + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1ULL << rNextNextNext3); + } + rNextNext4 = allocateRegNotConflictingWith(registerMask4); + } + if (rNextNextNext3 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask4 = ((1ULL << rTop18) | (1ULL << rNext14)) | (1ULL << rNextNext4); + rNextNextNext3 = allocateRegNotConflictingWith(registerMask4); + } + assert(!(((rTop18 == NoReg) + || ((rNext14 == NoReg) + || ((rNextNext4 == NoReg) + || (rNextNextNext3 == NoReg)))))); + rResult6 = allocateRegNotConflictingWith((((1ULL << rTop18) | (1ULL << rNext14)) | (1ULL << rNextNext4)) | (1ULL << rNextNextNext3)); + offset1 = rTop18; + scale1 = rNext14; + index1 = rNextNext4; + base1 = rNextNextNext3; + result2 = rResult6; + + nativePopToReg(ssNativeTop(), offset1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), scale1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), index1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base1); + ssNativePop(1); + abort(); + return 0; case 29: - return genLowcodeEndCall(); + /* begin genLowcodeEndCall */ + endHighLevelCallWithCleanup(); + return 0; case 30: - return genLowcodeEndCallNoCleanup(); + /* begin genLowcodeEndCallNoCleanup */ + endHighLevelCallWithoutCleanup(); + return 0; case 0x1F: - return genLowcodeFloat32Add(); + /* begin genLowcodeFloat32Add */ + topRegistersMask10 = 0; + rTop19 = (rNext15 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext15 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask10 = 1ULL << reg10; + } + if (rTop19 == NoReg) { + rTop19 = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + if (rNext15 == NoReg) { + rNext15 = allocateFloatRegNotConflictingWith(1ULL << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext15 == NoReg)))); + second6 = rTop19; + first6 = rNext15; + + nativePopToReg(ssNativeTop(), second6); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first6); + ssNativePop(1); + /* begin AddRs:Rs: */ + genoperandoperand(AddRsRs, second6, first6); + ssPushNativeRegisterSingleFloat(first6); + return 0; case 32: - return genLowcodeFloat32Div(); + /* begin genLowcodeFloat32Div */ + topRegistersMask11 = 0; + rTop20 = (rNext16 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg11 = (rNext16 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1ULL << reg11; + } + if (rTop20 == NoReg) { + rTop20 = allocateFloatRegNotConflictingWith(topRegistersMask11); + } + if (rNext16 == NoReg) { + rNext16 = allocateFloatRegNotConflictingWith(1ULL << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext16 == NoReg)))); + second7 = rTop20; + first7 = rNext16; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + /* begin DivRs:Rs: */ + genoperandoperand(DivRsRs, second7, first7); + ssPushNativeRegisterSingleFloat(first7); + return 0; case 33: - return genLowcodeFloat32Equal(); + /* begin genLowcodeFloat32Equal */ + topRegistersMask12 = 0; + frTop2 = (frNext = NoReg); + rResult7 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (frNext = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1ULL << reg12; + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(topRegistersMask12); + } + if (frNext == NoReg) { + frNext = allocateFloatRegNotConflictingWith(1ULL << frTop2); + } + rResult7 = allocateRegNotConflictingWith(0); + assert(!(((frTop2 == NoReg) + || ((frNext == NoReg) + || (rResult7))))); + second8 = frTop2; + first8 = frNext; + value7 = rResult7; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second8, first8); + + /* True result */ + falseJump = gJumpFPNotEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperand(MoveCqR, 1, value7); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperand(MoveCqR, 0, value7); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value7); + return 0; case 34: - return genLowcodeFloat32Great(); + /* begin genLowcodeFloat32Great */ + topRegistersMask13 = 0; + frTop3 = (frNext1 = NoReg); + rResult8 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (frNext1 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1ULL << reg13; + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(topRegistersMask13); + } + if (frNext1 == NoReg) { + frNext1 = allocateFloatRegNotConflictingWith(1ULL << frTop3); + } + rResult8 = allocateRegNotConflictingWith(0); + assert(!(((frTop3 == NoReg) + || ((frNext1 == NoReg) + || (rResult8))))); + second9 = frTop3; + first9 = frNext1; + value8 = rResult8; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second9, first9); + + /* True result */ + falseJump1 = gJumpFPLessOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperand(MoveCqR, 1, value8); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperand(MoveCqR, 0, value8); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value8); + return 0; case 35: - return genLowcodeFloat32GreatEqual(); + /* begin genLowcodeFloat32GreatEqual */ + topRegistersMask14 = 0; + frTop4 = (frNext2 = NoReg); + rResult9 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop4 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (frNext2 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1ULL << reg14; + } + if (frTop4 == NoReg) { + frTop4 = allocateFloatRegNotConflictingWith(topRegistersMask14); + } + if (frNext2 == NoReg) { + frNext2 = allocateFloatRegNotConflictingWith(1ULL << frTop4); + } + rResult9 = allocateRegNotConflictingWith(0); + assert(!(((frTop4 == NoReg) + || ((frNext2 == NoReg) + || (rResult9))))); + second10 = frTop4; + first10 = frNext2; + value9 = rResult9; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second10, first10); + + /* True result */ + falseJump2 = gJumpFPLess(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperand(MoveCqR, 1, value9); + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperand(MoveCqR, 0, value9); + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value9); + return 0; case 36: - return genLowcodeFloat32Less(); + /* begin genLowcodeFloat32Less */ + topRegistersMask15 = 0; + frTop5 = (frNext3 = NoReg); + rResult10 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop5 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (frNext3 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1ULL << reg15; + } + if (frTop5 == NoReg) { + frTop5 = allocateFloatRegNotConflictingWith(topRegistersMask15); + } + if (frNext3 == NoReg) { + frNext3 = allocateFloatRegNotConflictingWith(1ULL << frTop5); + } + rResult10 = allocateRegNotConflictingWith(0); + assert(!(((frTop5 == NoReg) + || ((frNext3 == NoReg) + || (rResult10))))); + second11 = frTop5; + first11 = frNext3; + value10 = rResult10; + + nativePopToReg(ssNativeTop(), second11); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first11); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second11, first11); + + /* True result */ + falseJump3 = gJumpFPGreaterOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperand(MoveCqR, 1, value10); + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCqR, 0, value10); + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value10); + return 0; case 37: - return genLowcodeFloat32LessEqual(); + /* begin genLowcodeFloat32LessEqual */ + topRegistersMask16 = 0; + frTop6 = (frNext4 = NoReg); + rResult12 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop6 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg16 = (frNext4 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask16 = 1ULL << reg16; + } + if (frTop6 == NoReg) { + frTop6 = allocateFloatRegNotConflictingWith(topRegistersMask16); + } + if (frNext4 == NoReg) { + frNext4 = allocateFloatRegNotConflictingWith(1ULL << frTop6); + } + rResult12 = allocateRegNotConflictingWith(0); + assert(!(((frTop6 == NoReg) + || ((frNext4 == NoReg) + || (rResult12))))); + second12 = frTop6; + first12 = frNext4; + value11 = rResult12; + + nativePopToReg(ssNativeTop(), second12); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first12); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second12, first12); + + /* True result */ + falseJump4 = gJumpFPGreater(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(MoveCqR, 1, value11); + /* begin Jump: */ + contJump4 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperand(MoveCqR, 0, value11); + jmpTarget(contJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value11); + return 0; case 38: - return genLowcodeFloat32Mul(); + /* begin genLowcodeFloat32Mul */ + topRegistersMask17 = 0; + rTop21 = (rNext17 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg17 = (rNext17 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask17 = 1ULL << reg17; + } + if (rTop21 == NoReg) { + rTop21 = allocateFloatRegNotConflictingWith(topRegistersMask17); + } + if (rNext17 == NoReg) { + rNext17 = allocateFloatRegNotConflictingWith(1ULL << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext17 == NoReg)))); + second13 = rTop21; + first13 = rNext17; + + nativePopToReg(ssNativeTop(), second13); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first13); + ssNativePop(1); + /* begin MulRs:Rs: */ + genoperandoperand(MulRsRs, second13, first13); + ssPushNativeRegisterSingleFloat(first13); + return 0; case 39: - return genLowcodeFloat32Neg(); + /* begin genLowcodeFloat32Neg */ + frTop7 = NoReg; + + /* Float argument */ + frResult2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop7 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop7 == NoReg) { + frTop7 = allocateFloatRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(1ULL << frTop7); + assert(!(((frTop7 == NoReg) + || (frResult2 == NoReg)))); + value12 = frTop7; + result3 = frResult2; + + nativePopToReg(ssNativeTop(), value12); + ssNativePop(1); + /* begin XorRs:Rs: */ + genoperandoperand(XorRsRs, result3, result3); + /* begin SubRs:Rs: */ + genoperandoperand(SubRsRs, value12, result3); + ssPushNativeRegisterSingleFloat(result3); + return 0; case 40: - return genLowcodeFloat32NotEqual(); + /* begin genLowcodeFloat32NotEqual */ + topRegistersMask18 = 0; + frTop8 = (frNext5 = NoReg); + rResult13 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop8 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg18 = (frNext5 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask18 = 1ULL << reg18; + } + if (frTop8 == NoReg) { + frTop8 = allocateFloatRegNotConflictingWith(topRegistersMask18); + } + if (frNext5 == NoReg) { + frNext5 = allocateFloatRegNotConflictingWith(1ULL << frTop8); + } + rResult13 = allocateRegNotConflictingWith(0); + assert(!(((frTop8 == NoReg) + || ((frNext5 == NoReg) + || (rResult13))))); + second14 = frTop8; + first14 = frNext5; + value13 = rResult13; + + nativePopToReg(ssNativeTop(), second14); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first14); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second14, first14); + + /* True result */ + falseJump5 = gJumpFPEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperand(MoveCqR, 1, value13); + /* begin Jump: */ + contJump5 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperand(MoveCqR, 0, value13); + jmpTarget(contJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value13); + return 0; case 41: - return genLowcodeFloat32Sqrt(); + /* begin genLowcodeFloat32Sqrt */ + topRegistersMask19 = 0; + frTop9 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop9 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop9 == NoReg) { + frTop9 = allocateFloatRegNotConflictingWith(topRegistersMask19); + } + assert(!((frTop9 == NoReg))); + value14 = frTop9; + + nativePopToReg(ssNativeTop(), value14); + ssNativePop(1); + /* begin SqrtRs: */ + genoperand(SqrtRs, value14); + ssPushNativeRegisterSingleFloat(value14); + return 0; case 42: - return genLowcodeFloat32Sub(); + /* begin genLowcodeFloat32Sub */ + topRegistersMask20 = 0; + rTop22 = (rNext18 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop22 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg19 = (rNext18 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask20 = 1ULL << reg19; + } + if (rTop22 == NoReg) { + rTop22 = allocateFloatRegNotConflictingWith(topRegistersMask20); + } + if (rNext18 == NoReg) { + rNext18 = allocateFloatRegNotConflictingWith(1ULL << rTop22); + } + assert(!(((rTop22 == NoReg) + || (rNext18 == NoReg)))); + second15 = rTop22; + first15 = rNext18; + + nativePopToReg(ssNativeTop(), second15); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first15); + ssNativePop(1); + /* begin SubRs:Rs: */ + genoperandoperand(SubRsRs, second15, first15); + ssPushNativeRegisterSingleFloat(first15); + return 0; case 43: - return genLowcodeFloat32ToFloat64(); + /* begin genLowcodeFloat32ToFloat64 */ + topRegistersMask21 = 0; + frTop10 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop10 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop10 == NoReg) { + frTop10 = allocateFloatRegNotConflictingWith(topRegistersMask21); + } + assert(!((frTop10 == NoReg))); + singleFloatValue = frTop10; + + nativePopToReg(ssNativeTop(), singleFloatValue); + ssNativePop(1); + /* begin ConvertRs:Rd: */ + genoperandoperand(ConvertRsRd, singleFloatValue, singleFloatValue); + ssPushNativeRegisterDoubleFloat(singleFloatValue); + return 0; case 44: - return genLowcodeFloat32ToInt32(); + /* begin genLowcodeFloat32ToInt32 */ + frTop11 = NoReg; + + /* Float argument */ + rResult14 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop11 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop11 == NoReg) { + frTop11 = allocateFloatRegNotConflictingWith(0); + } + rResult14 = allocateRegNotConflictingWith(0); + assert(!(((frTop11 == NoReg) + || (rResult14 == NoReg)))); + value15 = frTop11; + result4 = rResult14; + + nativePopToReg(ssNativeTop(), value15); + ssNativePop(1); + /* begin ConvertRs:R: */ + genoperandoperand(ConvertRsR, value15, result4); + ssPushNativeRegister(result4); + return 0; case 45: - return genLowcodeFloat32ToInt64(); + /* begin genLowcodeFloat32ToInt64 */ + frTop12 = NoReg; + + /* Float argument */ + rResult15 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop12 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop12 == NoReg) { + frTop12 = allocateFloatRegNotConflictingWith(0); + } + rResult15 = allocateRegNotConflictingWith(0); + assert(!(((frTop12 == NoReg) + || (rResult15 == NoReg)))); + value16 = frTop12; + result5 = rResult15; + + nativePopToReg(ssNativeTop(), value16); + ssNativePop(1); + abort(); + return 0; case 46: - return genLowcodeFloat32ToUInt32(); + /* begin genLowcodeFloat32ToUInt32 */ + frTop13 = NoReg; + + /* Float argument */ + rResult16 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop13 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop13 == NoReg) { + frTop13 = allocateFloatRegNotConflictingWith(0); + } + rResult16 = allocateRegNotConflictingWith(0); + assert(!(((frTop13 == NoReg) + || (rResult16 == NoReg)))); + value17 = frTop13; + result6 = rResult16; + + nativePopToReg(ssNativeTop(), value17); + ssNativePop(1); + /* begin ConvertRs:R: */ + genoperandoperand(ConvertRsR, value17, result6); + ssPushNativeRegister(result6); + return 0; case 47: - return genLowcodeFloat32ToUInt64(); + /* begin genLowcodeFloat32ToUInt64 */ + frTop14 = NoReg; + + /* Float argument */ + rResult17 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop14 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop14 == NoReg) { + frTop14 = allocateFloatRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(0); + assert(!(((frTop14 == NoReg) + || (rResult17 == NoReg)))); + value18 = frTop14; + result7 = rResult17; + + nativePopToReg(ssNativeTop(), value18); + ssNativePop(1); + abort(); + return 0; case 48: - return genLowcodeFloat64Add(); + /* begin genLowcodeFloat64Add */ + topRegistersMask22 = 0; + rTop23 = (rNext19 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg20 = (rNext19 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask22 = 1ULL << reg20; + } + if (rTop23 == NoReg) { + rTop23 = allocateFloatRegNotConflictingWith(topRegistersMask22); + } + if (rNext19 == NoReg) { + rNext19 = allocateFloatRegNotConflictingWith(1ULL << rTop23); + } + assert(!(((rTop23 == NoReg) + || (rNext19 == NoReg)))); + second16 = rTop23; + first16 = rNext19; + + nativePopToReg(ssNativeTop(), second16); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first16); + ssNativePop(1); + /* begin AddRd:Rd: */ + genoperandoperand(AddRdRd, second16, first16); + ssPushNativeRegisterDoubleFloat(first16); + return 0; case 49: - return genLowcodeFloat64Div(); + /* begin genLowcodeFloat64Div */ + topRegistersMask23 = 0; + rTop24 = (rNext20 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg21 = (rNext20 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask23 = 1ULL << reg21; + } + if (rTop24 == NoReg) { + rTop24 = allocateFloatRegNotConflictingWith(topRegistersMask23); + } + if (rNext20 == NoReg) { + rNext20 = allocateFloatRegNotConflictingWith(1ULL << rTop24); + } + assert(!(((rTop24 == NoReg) + || (rNext20 == NoReg)))); + second17 = rTop24; + first17 = rNext20; + + nativePopToReg(ssNativeTop(), second17); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first17); + ssNativePop(1); + /* begin DivRd:Rd: */ + genoperandoperand(DivRdRd, second17, first17); + ssPushNativeRegisterDoubleFloat(first17); + return 0; case 50: - return genLowcodeFloat64Equal(); + /* begin genLowcodeFloat64Equal */ + topRegistersMask24 = 0; + frTop15 = (frNext6 = NoReg); + rResult18 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop15 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg22 = (frNext6 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask24 = 1ULL << reg22; + } + if (frTop15 == NoReg) { + frTop15 = allocateFloatRegNotConflictingWith(topRegistersMask24); + } + if (frNext6 == NoReg) { + frNext6 = allocateFloatRegNotConflictingWith(1ULL << frTop15); + } + rResult18 = allocateRegNotConflictingWith(0); + assert(!(((frTop15 == NoReg) + || ((frNext6 == NoReg) + || (rResult18))))); + second18 = frTop15; + first18 = frNext6; + value19 = rResult18; + + nativePopToReg(ssNativeTop(), second18); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first18); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second18, first18); + + /* True result */ + falseJump6 = gJumpFPNotEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction21 = genoperandoperand(MoveCqR, 1, value19); + /* begin Jump: */ + contJump6 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperand(MoveCqR, 0, value19); + jmpTarget(contJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value19); + return 0; case 51: - return genLowcodeFloat64Great(); + /* begin genLowcodeFloat64Great */ + topRegistersMask25 = 0; + frTop16 = (frNext7 = NoReg); + rResult19 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop16 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg23 = (frNext7 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask25 = 1ULL << reg23; + } + if (frTop16 == NoReg) { + frTop16 = allocateFloatRegNotConflictingWith(topRegistersMask25); + } + if (frNext7 == NoReg) { + frNext7 = allocateFloatRegNotConflictingWith(1ULL << frTop16); + } + rResult19 = allocateRegNotConflictingWith(0); + assert(!(((frTop16 == NoReg) + || ((frNext7 == NoReg) + || (rResult19))))); + second19 = frTop16; + first19 = frNext7; + value20 = rResult19; + + nativePopToReg(ssNativeTop(), second19); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first19); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second19, first19); + + /* True result */ + falseJump7 = gJumpFPLessOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperand(MoveCqR, 1, value20); + /* begin Jump: */ + contJump7 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(MoveCqR, 0, value20); + jmpTarget(contJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value20); + return 0; case 52: - return genLowcodeFloat64GreatEqual(); + /* begin genLowcodeFloat64GreatEqual */ + topRegistersMask26 = 0; + frTop17 = (frNext8 = NoReg); + rResult20 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop17 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg24 = (frNext8 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask26 = 1ULL << reg24; + } + if (frTop17 == NoReg) { + frTop17 = allocateFloatRegNotConflictingWith(topRegistersMask26); + } + if (frNext8 == NoReg) { + frNext8 = allocateFloatRegNotConflictingWith(1ULL << frTop17); + } + rResult20 = allocateRegNotConflictingWith(0); + assert(!(((frTop17 == NoReg) + || ((frNext8 == NoReg) + || (rResult20))))); + second20 = frTop17; + first20 = frNext8; + value21 = rResult20; + + nativePopToReg(ssNativeTop(), second20); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first20); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second20, first20); + + /* True result */ + falseJump8 = gJumpFPLess(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction25 = genoperandoperand(MoveCqR, 1, value21); + /* begin Jump: */ + contJump8 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump8, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperand(MoveCqR, 0, value21); + jmpTarget(contJump8, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value21); + return 0; case 53: - return genLowcodeFloat64Less(); + /* begin genLowcodeFloat64Less */ + topRegistersMask27 = 0; + frTop18 = (frNext9 = NoReg); + rResult22 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop18 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg25 = (frNext9 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask27 = 1ULL << reg25; + } + if (frTop18 == NoReg) { + frTop18 = allocateFloatRegNotConflictingWith(topRegistersMask27); + } + if (frNext9 == NoReg) { + frNext9 = allocateFloatRegNotConflictingWith(1ULL << frTop18); + } + rResult22 = allocateRegNotConflictingWith(0); + assert(!(((frTop18 == NoReg) + || ((frNext9 == NoReg) + || (rResult22))))); + second21 = frTop18; + first21 = frNext9; + value22 = rResult22; + + nativePopToReg(ssNativeTop(), second21); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first21); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second21, first21); + + /* True result */ + falseJump9 = gJumpFPGreaterOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction27 = genoperandoperand(MoveCqR, 1, value22); + /* begin Jump: */ + contJump9 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump9, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction28 = genoperandoperand(MoveCqR, 0, value22); + jmpTarget(contJump9, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value22); + return 0; case 54: - return genLowcodeFloat64LessEqual(); + /* begin genLowcodeFloat64LessEqual */ + topRegistersMask28 = 0; + frTop19 = (frNext10 = NoReg); + rResult23 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop19 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg26 = (frNext10 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask28 = 1ULL << reg26; + } + if (frTop19 == NoReg) { + frTop19 = allocateFloatRegNotConflictingWith(topRegistersMask28); + } + if (frNext10 == NoReg) { + frNext10 = allocateFloatRegNotConflictingWith(1ULL << frTop19); + } + rResult23 = allocateRegNotConflictingWith(0); + assert(!(((frTop19 == NoReg) + || ((frNext10 == NoReg) + || (rResult23))))); + second22 = frTop19; + first22 = frNext10; + value23 = rResult23; + + nativePopToReg(ssNativeTop(), second22); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first22); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second22, first22); + + /* True result */ + falseJump10 = gJumpFPGreater(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperand(MoveCqR, 1, value23); + /* begin Jump: */ + contJump10 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump10, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction30 = genoperandoperand(MoveCqR, 0, value23); + jmpTarget(contJump10, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value23); + return 0; case 55: - return genLowcodeFloat64Mul(); + /* begin genLowcodeFloat64Mul */ + topRegistersMask29 = 0; + rTop25 = (rNext21 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg27 = (rNext21 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask29 = 1ULL << reg27; + } + if (rTop25 == NoReg) { + rTop25 = allocateFloatRegNotConflictingWith(topRegistersMask29); + } + if (rNext21 == NoReg) { + rNext21 = allocateFloatRegNotConflictingWith(1ULL << rTop25); + } + assert(!(((rTop25 == NoReg) + || (rNext21 == NoReg)))); + second23 = rTop25; + first23 = rNext21; + + nativePopToReg(ssNativeTop(), second23); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first23); + ssNativePop(1); + /* begin MulRd:Rd: */ + genoperandoperand(MulRdRd, second23, first23); + ssPushNativeRegisterDoubleFloat(first23); + return 0; case 56: - return genLowcodeFloat64Neg(); + /* begin genLowcodeFloat64Neg */ + frTop20 = NoReg; + + /* Float argument */ + frResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop20 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop20 == NoReg) { + frTop20 = allocateFloatRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(1ULL << frTop20); + assert(!(((frTop20 == NoReg) + || (frResult3 == NoReg)))); + value24 = frTop20; + result8 = frResult3; + + nativePopToReg(ssNativeTop(), value24); + ssNativePop(1); + /* begin XorRd:Rd: */ + genoperandoperand(XorRdRd, result8, result8); + /* begin SubRd:Rd: */ + genoperandoperand(SubRdRd, value24, result8); + ssPushNativeRegisterDoubleFloat(result8); + return 0; case 57: - return genLowcodeFloat64NotEqual(); + /* begin genLowcodeFloat64NotEqual */ + topRegistersMask30 = 0; + frTop21 = (frNext11 = NoReg); + rResult24 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop21 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg28 = (frNext11 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask30 = 1ULL << reg28; + } + if (frTop21 == NoReg) { + frTop21 = allocateFloatRegNotConflictingWith(topRegistersMask30); + } + if (frNext11 == NoReg) { + frNext11 = allocateFloatRegNotConflictingWith(1ULL << frTop21); + } + rResult24 = allocateRegNotConflictingWith(0); + assert(!(((frTop21 == NoReg) + || ((frNext11 == NoReg) + || (rResult24))))); + second24 = frTop21; + first24 = frNext11; + value25 = rResult24; + + nativePopToReg(ssNativeTop(), second24); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first24); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second24, first24); + + /* True result */ + falseJump11 = gJumpFPEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperand(MoveCqR, 1, value25); + /* begin Jump: */ + contJump11 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump11, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperand(MoveCqR, 0, value25); + jmpTarget(contJump11, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value25); + return 0; case 58: - return genLowcodeFloat64Sqrt(); + /* begin genLowcodeFloat64Sqrt */ + topRegistersMask31 = 0; + frTop22 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop22 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop22 == NoReg) { + frTop22 = allocateFloatRegNotConflictingWith(topRegistersMask31); + } + assert(!((frTop22 == NoReg))); + value26 = frTop22; + + nativePopToReg(ssNativeTop(), value26); + ssNativePop(1); + /* begin SqrtRd: */ + genoperand(SqrtRd, value26); + ssPushNativeRegisterDoubleFloat(value26); + return 0; case 59: - return genLowcodeFloat64Sub(); + /* begin genLowcodeFloat64Sub */ + topRegistersMask32 = 0; + rTop26 = (rNext22 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop26 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg29 = (rNext22 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask32 = 1ULL << reg29; + } + if (rTop26 == NoReg) { + rTop26 = allocateFloatRegNotConflictingWith(topRegistersMask32); + } + if (rNext22 == NoReg) { + rNext22 = allocateFloatRegNotConflictingWith(1ULL << rTop26); + } + assert(!(((rTop26 == NoReg) + || (rNext22 == NoReg)))); + second25 = rTop26; + first25 = rNext22; + + nativePopToReg(ssNativeTop(), second25); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first25); + ssNativePop(1); + /* begin SubRd:Rd: */ + genoperandoperand(SubRdRd, second25, first25); + ssPushNativeRegisterDoubleFloat(first25); + return 0; default: return genLowcodeUnaryInlinePrimitive2(prim); @@ -38883,304 +39030,6 @@ genLowcodeUnaryInlinePrimitive(sqInt prim) return 0; } - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnlockVM */ -static sqInt -genLowcodeUnlockVM(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnpin */ -static sqInt -genLowcodeUnpin(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUrem32 */ -static sqInt -genLowcodeUrem32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUrem64 */ -static sqInt -genLowcodeUrem64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1ULL << second)) | (1ULL << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeXor32 */ -static sqInt -genLowcodeXor32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin XorR:R: */ - genoperandoperand(XorRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeXor64 */ -static sqInt -genLowcodeXor64(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin XorR:R: */ - genoperandoperand(XorRR, second, first); - ssPushNativeRegister(first); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend32From16 */ -static sqInt -genLowcodeZeroExtend32From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend16R:R: */ - genoperandoperand(ZeroExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend32From8 */ -static sqInt -genLowcodeZeroExtend32From8(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend8R:R: */ - genoperandoperand(ZeroExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From16 */ -static sqInt -genLowcodeZeroExtend64From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend16R:R: */ - genoperandoperand(ZeroExtend16RR, value, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From32 */ -static sqInt -genLowcodeZeroExtend64From32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1ULL << value)))) == NoReg) { - ssAllocateRequiredReg((result = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend32R:R: */ - genoperandoperand(ZeroExtend32RR, value, value); - ssPushNativeRegister(value); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From8 */ -static sqInt -genLowcodeZeroExtend64From8(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend8R:R: */ - genoperandoperand(ZeroExtend8RR, value, value); - ssPushNativeRegister(value); - - return 0; -} - /* StackToRegisterMappingCogit>>#genMarshalledSend:numArgs:sendTable: */ static sqInt NoDbgRegParms genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable) @@ -39718,7 +39567,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -40004,7 +39854,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -40193,7 +40044,8 @@ genSpecialSelectorComparison(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((((argInt = ((ssTop())->constant)))) & 7) == 1)); @@ -40387,7 +40239,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -40458,7 +40311,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -40531,7 +40385,8 @@ genStorePopMaybeContextRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCh ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -40568,7 +40423,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -40593,7 +40449,8 @@ genStorePopRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCheck(sqInt po if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -40736,21 +40593,20 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; (fixup->simNativeStackPtr) = UnknownSimStackPtrFlag; (fixup->simNativeStackSize) = 0; - return fixup; } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ @@ -40979,7 +40835,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -40989,7 +40846,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -40997,7 +40855,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -41036,7 +40895,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -41104,7 +40963,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -41248,9 +41108,8 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; - (self_in_reinitialize->simNativeStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); + (self_in_reinitialize->simNativeStackPtr) = ((self_in_reinitialize->simNativeStackSize) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); @@ -41654,20 +41513,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1ULL << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushAll */ -static void -ssFlushAll(void) -{ - ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); -} - - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -41713,7 +41558,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -41739,7 +41585,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -41823,6 +41670,13 @@ ssNativeTop(void) return simNativeStackAt(simNativeStackPtr); } + /* StackToRegisterMappingCogit>>#ssNativeValue: */ +static CogSimStackNativeEntry * NoDbgRegParms +ssNativeValue(sqInt n) +{ + return simNativeStackAt(simStackPtr - n); +} + /* StackToRegisterMappingCogit>>#ssPopNativeSize: */ static void NoDbgRegParms ssPopNativeSize(sqInt popSize) @@ -42312,6 +42166,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/spurlowcode64src/vm/cointerp.c b/spurlowcode64src/vm/cointerp.c index 2be3d2f20..79fda06cc 100644 --- a/spurlowcode64src/vm/cointerp.c +++ b/spurlowcode64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -732,6 +732,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -900,6 +901,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -926,8 +928,8 @@ static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); -static usqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms copyAndForward(sqInt survivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1188,8 +1190,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1257,6 +1259,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1351,14 +1354,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1486,6 +1490,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1734,6 +1739,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1742,7 +1748,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1769,6 +1774,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1783,11 +1790,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1822,6 +1827,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1840,7 +1846,6 @@ _iss char * shadowCallStack; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1871,6 +1876,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1886,6 +1892,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2498,7 +2507,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5109,7 +5118,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l3128; + goto l3127; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5157,10 +5166,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l3155; + goto l3154; } ourContext = marryFrameSP(localFP, localSP); - l3155: /* end ensureFrameIsMarried:SP: */; + l3154: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5169,7 +5178,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l3128; + goto l3127; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5178,10 +5187,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l3148; + goto l3147; } ourContext1 = marryFrameSP(localFP, localSP); - l3148: /* end ensureFrameIsMarried:SP: */; + l3147: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5192,7 +5201,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3128; + goto l3127; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5244,10 +5253,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l3141; + goto l3140; } ourContext2 = marryFrameSP(localFP, localSP); - l3141: /* end ensureFrameIsMarried:SP: */; + l3140: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5256,7 +5265,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l3128; + goto l3127; } } assert(pageListIsWellFormed()); @@ -5361,11 +5370,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3138; + goto l3137; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l3138: /* end maybeReturnToMachineCodeFrame */; + l3137: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5380,7 +5389,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l3128: /* end case */; + l3127: /* end case */; break; case 121: case 345: /*89*/ @@ -5542,27 +5551,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l3161; + goto l3160; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l3161; + goto l3160; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l3161: /* end findFrameAbove:inPage: */; + l3160: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l3169; + goto l3168; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l3169: /* end newStackPage */; + l3168: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5585,7 +5594,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l3157; + goto l3156; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5621,7 +5630,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3157; + goto l3156; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5639,7 +5648,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3157; + goto l3156; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5664,7 +5673,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3157; + goto l3156; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5682,7 +5691,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l3157: /* end case */; + l3156: /* end case */; break; case 126: case 127: @@ -5716,10 +5725,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l3170; + goto l3169; } ourContext = marryFrameSP(theFP, theSP); - l3170: /* end ensureFrameIsMarried:SP: */; + l3169: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6161,12 +6170,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l3188; + goto l3187; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l3188: /* end classAtIndex: */; + l3187: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6187,7 +6196,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3172; + goto l3171; } /* second probe */ @@ -6197,7 +6206,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3172; + goto l3171; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6205,10 +6214,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3172; + goto l3171; } ok = 0; - l3172: /* end inlineLookupInMethodCacheSel:classTag: */; + l3171: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6280,7 +6289,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l3189; + goto l3188; } } /* begin classAtIndex: */ @@ -6293,12 +6302,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l3185; + goto l3184; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l3185: /* end classAtIndex: */; + l3184: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6312,7 +6321,7 @@ interpret(void) addNewMethodToCache(GIV(lkupClass)); } - l3189: /* end internalFindNewMethodOrdinary */; + l3188: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6325,28 +6334,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l3193; + goto l3192; } if (localPrimIndex == 256) { - goto l3193; + goto l3192; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l3193; + goto l3192; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l3193; + goto l3192; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l3193; + goto l3192; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l3193; + goto l3192; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6410,7 +6419,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l3193; + goto l3192; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6492,11 +6501,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l3187; + goto l3186; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l3187: /* end getErrorObjectFromPrimFailCode */; + l3186: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6522,7 +6531,7 @@ interpret(void) } } - l3193: /* end internalExecuteNewMethod */; + l3192: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6971,18 +6980,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7098,7 +7111,7 @@ interpret(void) case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -8555,7 +8568,7 @@ interpret(void) goto l1297; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l1297; } if (fmt >= (firstShortFormat())) { @@ -8577,14 +8590,14 @@ interpret(void) case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -16322,7 +16335,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -17180,7 +17193,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3207; + goto l3205; } if (bytecode == 172) { @@ -17189,7 +17202,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3207; + goto l3205; } if (bytecode > 167) { @@ -17199,7 +17212,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3207; + goto l3205; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -17207,7 +17220,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l3207: /* end case */; + l3205: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -17365,7 +17378,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3210; + goto l3208; } if (bytecode == 172) { @@ -17375,14 +17388,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3210; + goto l3208; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l3210: /* end case */; + l3208: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -19762,7 +19775,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3211; + goto l3209; } if (bytecode == 239) { @@ -19771,7 +19784,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3211; + goto l3209; } if (bytecode == 238) { @@ -19781,7 +19794,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3211; + goto l3209; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -19789,7 +19802,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l3211: /* end case */; + l3209: /* end case */; break; case 355: /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -19947,7 +19960,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3214; + goto l3212; } if (bytecode == 239) { @@ -19957,14 +19970,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3214; + goto l3212; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l3214: /* end case */; + l3212: /* end case */; break; case 356: /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -21668,10 +21681,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l3216; + goto l3214; } ourContext = marryFrameSP(theFP, theSP); - l3216: /* end ensureFrameIsMarried:SP: */; + l3214: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -21905,7 +21918,7 @@ interpret(void) case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -22052,6 +22065,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l1816; } @@ -24168,7 +24182,7 @@ interpret(void) goto l2762; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l2762; } if (fmt >= (firstShortFormat())) { @@ -24190,14 +24204,14 @@ interpret(void) case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -31839,7 +31853,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -31878,7 +31892,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -31890,10 +31903,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l3079; + goto l3069; } context = marryFrameSP(theFP, theSP); - l3079: /* end ensureFrameIsMarried:SP: */; + l3069: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -31921,13 +31934,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l3073; + goto l3078; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l3073: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l3078: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -31985,7 +31998,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -32010,10 +32023,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l3089; + goto l3088; } context = marryFrameSP(theFP, theSP); - l3089: /* end ensureFrameIsMarried:SP: */; + l3088: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -32041,13 +32054,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l3085; + goto l3084; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l3085: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l3084: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -32169,11 +32182,11 @@ interpret(void) value = result; } object2 = value; - goto l3095; + goto l3094; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l3095; + goto l3094; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -32196,7 +32209,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l3095; + goto l3094; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -32204,24 +32217,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l3095; + goto l3094; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l3095; + goto l3094; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); - goto l3095; + goto l3094; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l3095; + goto l3094; } error("bad index"); object2 = 0; - l3095: /* end instVar:ofContext: */; + l3094: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -32325,7 +32338,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l3107; + goto l3106; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -32346,7 +32359,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l3107; + goto l3106; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -32381,7 +32394,7 @@ interpret(void) markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l3107: /* end instVar:ofContext:put: */; + l3106: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -32399,7 +32412,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3110; + goto l3109; } # endif /* IMMUTABILITY */ @@ -32419,7 +32432,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l3110: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l3109: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -32518,7 +32531,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l3117; + goto l3116; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -32539,7 +32552,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l3117; + goto l3116; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -32574,7 +32587,7 @@ interpret(void) markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l3117: /* end instVar:ofContext:put: */; + l3116: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -32592,7 +32605,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3120; + goto l3119; } # endif /* IMMUTABILITY */ @@ -32612,7 +32625,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l3120: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l3119: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -32660,7 +32673,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3121; + goto l3120; } } if (!inverse) { @@ -32669,7 +32682,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3121; + goto l3120; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -32678,7 +32691,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l3121: /* end case */; + l3120: /* end case */; break; } } @@ -33354,7 +33367,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -33376,10 +33388,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -33920,8 +33932,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -33942,8 +33955,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -34304,6 +34318,8 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) sqInt ceNewHashOf(sqInt anObject) { + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); return (((usqInt)(newHashBitsOf(anObject)) << 3) | 1); } @@ -34577,8 +34593,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -34735,7 +34752,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -34850,7 +34866,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -34883,7 +34898,7 @@ ceSendMustBeBooleanTointerpretingAtDelta(sqInt aNonBooleanObject, sqInt jumpSize sqInt oop; char *p; char *sp; - unsigned short startBcpc; + sqInt startBcpc; sqInt top; assert(addressCouldBeOop(aNonBooleanObject)); @@ -35093,7 +35108,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -35221,18 +35235,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -35317,7 +35335,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -35683,7 +35700,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -36549,7 +36566,6 @@ flushExternalPrimitiveOf(sqInt methodObj) header = ((((CogMethod *) header1))->methodHeader); } if (header & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (methodObj + ((LiteralStart + (((header >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primIdx1 = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -36666,7 +36682,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -37746,7 +37762,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -38348,18 +38364,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -38386,7 +38403,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -38859,7 +38876,7 @@ positive32BitValueOf(sqInt oop) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -38920,7 +38937,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -39370,7 +39387,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -39860,7 +39877,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -40014,6 +40031,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -40216,6 +40236,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -40464,15 +40485,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -40529,6 +40562,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -40541,8 +40575,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -40718,6 +40754,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -41096,7 +41133,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -41174,7 +41211,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -41563,8 +41600,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -41737,6 +41775,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -42057,8 +42096,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42066,14 +42104,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42102,8 +42140,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42111,14 +42148,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -42149,8 +42186,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -42158,14 +42194,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -43845,8 +43881,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43854,14 +43889,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43885,8 +43920,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -43894,14 +43928,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -43927,8 +43961,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -43936,14 +43969,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l18; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -43966,6 +43999,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -44417,16 +44451,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -44453,7 +44487,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -44529,7 +44563,7 @@ magnitude64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -44903,7 +44937,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -45654,8 +45687,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -45834,8 +45867,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -46151,8 +46184,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -46551,7 +46584,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -46781,7 +46814,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -47048,7 +47081,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -47312,7 +47345,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -47748,7 +47781,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -47758,7 +47791,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -47769,7 +47802,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -47786,7 +47819,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -47798,8 +47831,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47817,7 +47849,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -47935,7 +47967,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -49753,8 +49785,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49762,14 +49793,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49794,8 +49825,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49803,14 +49833,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49837,8 +49867,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49846,14 +49875,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -49885,7 +49914,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -50049,7 +50078,7 @@ primitiveFullClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -50315,7 +50344,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -50578,7 +50607,7 @@ primitiveFullClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -50902,6 +50931,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -51134,7 +51210,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -52473,7 +52549,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -52711,7 +52787,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -53022,7 +53098,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -53116,7 +53192,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -53176,7 +53252,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -53320,8 +53396,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53329,18 +53404,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -53363,8 +53438,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -53372,18 +53446,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -53395,8 +53469,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -53404,22 +53477,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -53644,7 +53717,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -53660,28 +53733,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = numSlots2; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ assert(!(isFreeObject(stack))); longAtput(stack, (longAt(stack)) | (1ULL << (markedBitFullShift()))); @@ -53698,28 +53771,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = numSlots3; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -53729,7 +53802,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -53739,7 +53811,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -53778,7 +53849,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & (smallIntegerTag())) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -53800,7 +53871,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -53838,28 +53909,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = numSlots; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -53874,13 +53945,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 3); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -54859,7 +54930,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -58213,8 +58284,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58222,14 +58292,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58254,8 +58324,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58263,14 +58332,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58297,8 +58366,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58306,14 +58374,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -58572,7 +58640,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -58830,8 +58898,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58839,14 +58906,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58867,8 +58934,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58876,14 +58942,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58906,8 +58972,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58915,14 +58980,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -59065,18 +59130,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3))) != 7)) { return 0; @@ -59158,8 +59227,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -59566,7 +59634,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; sqInt newFormat; sqInt normalizedInstFormat; @@ -59817,6 +59885,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -59848,7 +59927,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -59969,7 +60048,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -59981,7 +60060,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -59992,7 +60071,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -60460,8 +60539,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60469,14 +60547,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -60499,8 +60577,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -60508,14 +60585,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -60561,8 +60638,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60570,14 +60646,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -60710,7 +60786,6 @@ copyAndForwardMourner(sqInt mourner) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -60740,12 +60815,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -60774,16 +60848,15 @@ copyAndForwardMourner(sqInt mourner) then corpse is threaded onto the weakList for later treatment. */ /* SpurGenerationScavenger>>#copyAndForward: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForward(sqInt survivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -60829,12 +60902,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -60868,12 +60940,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -61073,7 +61145,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -61585,7 +61657,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -61601,8 +61673,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61730,7 +61801,7 @@ scavengeReferentsOf(sqInt referrer) sqInt header; sqInt header1; sqInt i; - usqInt newLocation; + sqInt newLocation; sqInt numLiterals; sqInt numSlots; usqInt numSlots1; @@ -62046,8 +62117,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62055,14 +62125,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -62088,8 +62158,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -62097,14 +62166,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -62119,8 +62188,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -62128,14 +62196,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -62509,7 +62577,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -62517,7 +62585,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -62528,8 +62596,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62570,8 +62637,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -62579,14 +62645,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -62625,8 +62691,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -62673,8 +62738,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -62682,14 +62746,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -62737,8 +62801,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -62746,14 +62809,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -62798,8 +62861,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -62852,8 +62914,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -62861,14 +62922,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -62912,7 +62973,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -62931,7 +62992,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -62947,7 +63008,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -63047,8 +63108,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63084,8 +63144,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -63093,14 +63152,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -63137,8 +63196,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -63146,14 +63204,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63183,8 +63241,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -63192,14 +63249,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -63310,8 +63367,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63319,14 +63375,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63350,8 +63406,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -63359,14 +63414,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -63392,8 +63447,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -63401,14 +63455,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -63450,8 +63504,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63459,14 +63512,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -64552,8 +64605,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64561,14 +64613,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64613,8 +64665,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -64622,14 +64673,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -64709,8 +64760,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -64718,14 +64768,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -64881,12 +64931,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -64929,8 +64979,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64938,14 +64987,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64996,12 +65045,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -65044,8 +65093,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -65053,14 +65101,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -65154,12 +65202,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -65219,8 +65267,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -65228,14 +65275,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -65285,7 +65332,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -65326,7 +65373,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -65920,8 +65967,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -65929,14 +65975,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -66365,8 +66411,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -66374,14 +66419,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66413,8 +66458,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -66422,14 +66466,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66463,8 +66507,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -66472,14 +66515,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -66765,7 +66808,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -67020,8 +67062,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -67029,14 +67070,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -67059,8 +67100,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -67068,14 +67108,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -67311,8 +67351,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -67320,14 +67359,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -67360,8 +67399,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -67369,14 +67407,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -67411,8 +67449,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -67420,14 +67457,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -67507,8 +67544,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -67516,14 +67552,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -67553,8 +67589,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -67562,14 +67597,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -67601,8 +67636,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -67610,14 +67644,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -68187,7 +68221,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -68512,8 +68546,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -68521,14 +68554,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -68551,8 +68584,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -68560,14 +68592,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -68592,8 +68624,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -68601,14 +68632,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -68666,7 +68697,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -68674,7 +68705,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -68713,10 +68744,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i2 = 2; i2 < GIV(numClassTablePages); i2 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i2; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -68767,8 +68798,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -68776,14 +68806,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } @@ -70288,8 +70318,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -70311,8 +70340,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -70356,7 +70384,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -70364,7 +70392,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -70372,7 +70400,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -70380,11 +70408,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -70394,7 +70422,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -70402,11 +70430,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -70419,8 +70447,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -70428,17 +70455,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -70447,7 +70474,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -70466,7 +70493,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -70482,7 +70509,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -70503,8 +70530,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -70512,17 +70538,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -70530,8 +70556,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -70539,17 +70564,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -70569,7 +70594,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -70627,8 +70651,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -70636,14 +70659,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -70769,8 +70792,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -70778,14 +70800,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -70815,8 +70837,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -70824,14 +70845,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70854,8 +70875,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -70863,14 +70883,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -70976,8 +70996,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -70985,14 +71004,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71046,8 +71065,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71055,14 +71073,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71118,8 +71136,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71127,14 +71144,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -71274,7 +71291,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -71302,7 +71319,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -71326,7 +71343,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -71354,7 +71371,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -71377,8 +71394,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -71386,14 +71402,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -71887,7 +71903,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -72141,7 +72157,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -72516,8 +72532,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72553,7 +72568,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -72568,7 +72583,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -72832,8 +72847,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72855,8 +72869,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -72879,8 +72892,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -72901,8 +72913,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -72980,8 +72991,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72989,14 +72999,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73018,8 +73028,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -73027,14 +73036,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -73059,8 +73068,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -73068,14 +73076,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -73187,8 +73195,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -73284,8 +73291,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -73293,14 +73299,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -73339,8 +73345,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -73348,14 +73353,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73387,8 +73392,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -73396,14 +73400,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -73544,8 +73548,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74031,8 +74034,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74040,14 +74042,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74078,8 +74080,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74087,14 +74088,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -74127,8 +74128,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74136,14 +74136,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -74247,8 +74247,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74256,14 +74255,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74301,8 +74300,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74310,14 +74308,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -74357,8 +74355,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74366,14 +74363,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -74499,8 +74496,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74508,14 +74504,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -74545,8 +74541,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74554,14 +74549,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74584,8 +74579,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74593,14 +74587,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -74676,8 +74670,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74685,14 +74678,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74720,8 +74713,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74729,14 +74721,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -74759,8 +74751,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74768,14 +74759,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -75123,8 +75114,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -75132,14 +75122,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -75169,8 +75159,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -75178,14 +75167,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -75208,8 +75197,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -75217,14 +75205,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -75350,8 +75338,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -75359,14 +75346,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -75395,8 +75382,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -75404,14 +75390,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -75442,8 +75428,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -75451,14 +75436,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -75541,8 +75526,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -75550,14 +75534,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -75593,8 +75577,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -75602,14 +75585,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -75647,8 +75630,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -75656,14 +75638,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -75747,8 +75729,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -75756,14 +75737,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -75793,8 +75774,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -75802,14 +75782,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -75832,8 +75812,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -75841,14 +75820,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -76058,8 +76037,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -76067,14 +76045,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -76102,8 +76080,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -76111,14 +76088,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -76139,8 +76116,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -76148,14 +76124,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -76230,13 +76206,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -76244,15 +76220,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -76269,7 +76245,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -76293,8 +76269,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -76302,14 +76277,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -76330,13 +76305,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -76344,15 +76319,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -76369,7 +76344,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -76393,8 +76368,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -76402,14 +76376,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -76431,13 +76405,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -76445,15 +76419,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -76470,7 +76444,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -76495,8 +76469,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -76504,14 +76477,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -76924,7 +76897,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -76934,8 +76906,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -76986,7 +76957,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -77179,6 +77150,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -77279,7 +77260,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -77298,7 +77279,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -77314,7 +77295,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -77323,7 +77304,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -77342,7 +77323,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -77358,7 +77339,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -77422,8 +77403,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -77589,7 +77569,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -78271,11 +78251,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -78290,7 +78270,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -78306,8 +78286,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -78315,16 +78294,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -78350,8 +78329,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -78359,14 +78337,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -78386,16 +78364,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -78404,11 +78382,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -78416,7 +78394,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -78486,8 +78464,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -78495,14 +78472,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -78601,8 +78578,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -78622,8 +78598,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -78631,14 +78606,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -78700,8 +78675,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -78780,7 +78754,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -78802,7 +78776,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -78851,7 +78825,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -78867,8 +78841,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -78876,16 +78849,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -78956,8 +78929,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -78965,14 +78937,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -78991,9 +78963,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -79009,9 +78978,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -79043,9 +79011,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -79056,8 +79023,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -79067,9 +79033,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -79127,7 +79092,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -79202,8 +79167,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -79259,8 +79223,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -79268,14 +79231,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -79340,8 +79303,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -79349,14 +79311,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -79473,8 +79435,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -79482,14 +79443,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -79529,7 +79490,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -79695,13 +79656,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l56; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l56: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l57; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -79709,15 +79670,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l57; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l57; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l57; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -79734,7 +79695,7 @@ updatePointers(void) numLiterals1 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l57: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -79761,8 +79722,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -79770,14 +79730,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -79789,7 +79749,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -79802,13 +79762,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l63; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l63: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l64; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -79816,15 +79776,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l64; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l64; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l64; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -79841,7 +79801,7 @@ updatePointers(void) numLiterals2 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l64: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -79869,8 +79829,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -79878,16 +79837,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -79928,13 +79887,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -79942,15 +79901,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -79967,7 +79926,7 @@ updatePointers(void) numLiterals3 = ((header4 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -80004,8 +79963,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -80040,7 +79998,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -80053,8 +80011,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -80062,18 +80019,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -80096,13 +80053,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l63; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -80110,15 +80067,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l62; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l62; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -80135,7 +80092,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -80164,8 +80121,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -80173,14 +80129,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -80382,8 +80338,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -80391,14 +80346,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -80483,7 +80438,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -80583,8 +80538,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -80751,7 +80706,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -80867,8 +80822,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -80876,24 +80830,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -80956,8 +80910,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -81186,8 +81140,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); @@ -81493,7 +81447,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -81587,8 +81540,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -81596,14 +81548,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -81624,8 +81576,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -81633,14 +81584,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -81663,8 +81614,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -81672,14 +81622,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -82394,7 +82344,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -82404,7 +82354,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -82492,9 +82442,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -82600,6 +82550,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -83223,8 +83202,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -83232,14 +83210,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -83291,8 +83269,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -83300,14 +83277,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -83361,8 +83338,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -83370,20 +83346,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -83416,8 +83392,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -83425,14 +83400,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -83457,8 +83432,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -83466,14 +83440,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -83500,8 +83474,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -83509,16 +83482,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -83643,8 +83616,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -83718,8 +83692,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -83809,8 +83784,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -85143,8 +85119,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -86219,7 +86196,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -86394,7 +86371,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -86562,7 +86539,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -86728,7 +86705,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -86935,7 +86912,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -87282,8 +87259,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -87336,11 +87314,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -87366,11 +87342,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -87569,18 +87543,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -87853,6 +87828,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -88306,8 +88314,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -88315,14 +88322,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -88353,8 +88360,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -88362,14 +88368,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -88393,8 +88399,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -88402,14 +88407,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -89140,7 +89145,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -89151,7 +89156,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -89162,23 +89167,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -89194,39 +89199,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -89239,7 +89244,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -89247,7 +89252,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -89258,7 +89263,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -89272,7 +89277,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -89285,12 +89290,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -89301,7 +89306,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -89309,9 +89314,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -89325,8 +89330,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -89334,14 +89338,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -89388,7 +89392,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -89399,7 +89403,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -89410,23 +89414,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -89442,39 +89446,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -89487,7 +89491,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -89495,7 +89499,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -89506,7 +89510,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -89520,7 +89524,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -89533,12 +89537,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -89549,7 +89553,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -89557,9 +89561,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -89573,8 +89577,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -89582,14 +89585,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -89637,7 +89640,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -89648,7 +89651,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -89659,23 +89662,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -89691,39 +89694,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -89736,7 +89739,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -89744,7 +89747,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -89755,7 +89758,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -89769,7 +89772,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -89782,12 +89785,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -89798,7 +89801,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -89806,9 +89809,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -89823,8 +89826,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -89832,14 +89834,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -91157,11 +91159,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -91253,7 +91257,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - signed char accessorDepth; + sqInt accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -91415,14 +91419,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -91439,6 +91452,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -91451,21 +91465,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -91481,12 +91499,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -91502,6 +91523,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -91515,11 +91537,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -91545,6 +91570,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -92957,7 +92986,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -96484,7 +96513,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -96521,7 +96550,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -96822,7 +96851,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -97128,7 +97157,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -97440,8 +97469,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -97491,8 +97521,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -97628,6 +97660,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -97637,165 +97670,134 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer = floatObjectOf(getCogCodeZoneThreshold()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (16U << (shiftForWord())), valuePointer); + /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -97803,9 +97805,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -97813,22 +97815,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -97836,192 +97838,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -98050,7 +97957,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -98083,14 +97990,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { result = ConstZero; } + if (arg == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -98166,7 +98076,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -98279,48 +98189,42 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l84; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l84: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -98375,7 +98279,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -98397,12 +98302,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l65; + goto l77; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l65: /* end setCogVMFlags: */; + l77: /* end setCogVMFlags: */; } } if (index == 49) { @@ -98635,8 +98540,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -98644,14 +98548,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -98690,8 +98594,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -98699,14 +98602,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -98738,8 +98641,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -98747,14 +98649,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -98779,6 +98681,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -98826,6 +98729,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spurlowcode64src/vm/cointerp.h b/spurlowcode64src/vm/cointerp.h index dc74c932d..f3ac0fb14 100644 --- a/spurlowcode64src/vm/cointerp.h +++ b/spurlowcode64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ @@ -143,6 +143,7 @@ extern usqInt scavengeThresholdAddress(void); extern usqInt specialObjectsArrayAddress(void); extern sqInt withoutForwardingOnandwithsendToCogit(sqInt obj1, sqInt obj2, sqInt aBool, sqInt (*selector)(sqInt,sqInt,sqInt)); extern sqInt byteSwapped(sqInt w); +extern sqInt fetchClassTagOf(sqInt oop); extern sqInt floatObjectOf(double aFloat); extern sqInt headerIndicatesAlternateBytecodeSet(sqInt methodHeader); extern sqInt instantiateClassindexableSize(sqInt classObj, usqInt nElements); @@ -231,7 +232,7 @@ extern void NeverInline NeverInline markAndTrace(sqInt objOop); extern sqInt maybeSplObj(sqInt index); extern sqInt nilObject(void); extern sqInt nonIndexablePointerFormat(void); -extern usqInt numBytesOf(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); extern sqInt numStrongSlotsOfWeakling(sqInt objOop); @@ -286,8 +287,9 @@ extern sqInt argumentCountOf(sqInt methodPointer); extern sqInt canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader); extern sqInt checkAllAccessibleObjectsOkay(void); extern sqInt checkOkayInterpreterObjects(sqInt writeBack); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt disownVM(sqInt flags); extern sqInt doSignalSemaphoreWithIndex(sqInt index); extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ; extern usqLong getNextWakeupUsecs(void); @@ -312,6 +314,7 @@ extern sqInt methodClassOf(sqInt methodPointer); extern sqInt methodPrimitiveIndex(void); extern sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); extern sqInt objCouldBeClassObj(sqInt objOop); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); @@ -353,6 +356,9 @@ VM_EXPORT sqInt breakSelectorLength ; VM_EXPORT sqInt checkAllocFiller; VM_EXPORT sqInt checkedPluginName; VM_EXPORT sqInt checkForLeaks; +VM_EXPORT sqInt debugCallbackInvokes; +VM_EXPORT sqInt debugCallbackPath; +VM_EXPORT sqInt debugCallbackReturns; VM_EXPORT sqInt deferDisplayUpdates; VM_EXPORT sqInt desiredCogCodeSize; VM_EXPORT sqInt desiredEdenBytes; diff --git a/spurlowcode64src/vm/gcc3x-cointerp.c b/spurlowcode64src/vm/gcc3x-cointerp.c index f52a770ec..57606e329 100644 --- a/spurlowcode64src/vm/gcc3x-cointerp.c +++ b/spurlowcode64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -735,6 +735,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -903,6 +904,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -929,8 +931,8 @@ static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); -static usqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms copyAndForward(sqInt survivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1191,8 +1193,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1260,6 +1262,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1354,14 +1357,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1489,6 +1493,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1737,6 +1742,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1745,7 +1751,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1772,6 +1777,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1786,11 +1793,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1825,6 +1830,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1843,7 +1849,6 @@ _iss char * shadowCallStack; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1874,6 +1879,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1889,6 +1895,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2501,7 +2510,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5118,7 +5127,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l3128; + goto l3127; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5166,10 +5175,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l3155; + goto l3154; } ourContext = marryFrameSP(localFP, localSP); - l3155: /* end ensureFrameIsMarried:SP: */; + l3154: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5178,7 +5187,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l3128; + goto l3127; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5187,10 +5196,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l3148; + goto l3147; } ourContext1 = marryFrameSP(localFP, localSP); - l3148: /* end ensureFrameIsMarried:SP: */; + l3147: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5201,7 +5210,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3128; + goto l3127; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5253,10 +5262,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l3141; + goto l3140; } ourContext2 = marryFrameSP(localFP, localSP); - l3141: /* end ensureFrameIsMarried:SP: */; + l3140: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5265,7 +5274,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l3128; + goto l3127; } } assert(pageListIsWellFormed()); @@ -5370,11 +5379,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3138; + goto l3137; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l3138: /* end maybeReturnToMachineCodeFrame */; + l3137: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5389,7 +5398,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l3128: /* end case */; + l3127: /* end case */; BREAK; CASE(121) CASE(345) /*89*/ @@ -5551,27 +5560,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l3161; + goto l3160; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l3161; + goto l3160; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l3161: /* end findFrameAbove:inPage: */; + l3160: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l3169; + goto l3168; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l3169: /* end newStackPage */; + l3168: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5594,7 +5603,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l3157; + goto l3156; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5630,7 +5639,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3157; + goto l3156; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5648,7 +5657,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3157; + goto l3156; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5673,7 +5682,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3157; + goto l3156; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5691,7 +5700,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l3157: /* end case */; + l3156: /* end case */; BREAK; CASE(126) CASE(127) @@ -5725,10 +5734,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l3170; + goto l3169; } ourContext = marryFrameSP(theFP, theSP); - l3170: /* end ensureFrameIsMarried:SP: */; + l3169: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6170,12 +6179,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l3188; + goto l3187; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l3188: /* end classAtIndex: */; + l3187: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6196,7 +6205,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3172; + goto l3171; } /* second probe */ @@ -6206,7 +6215,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3172; + goto l3171; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6214,10 +6223,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3172; + goto l3171; } ok = 0; - l3172: /* end inlineLookupInMethodCacheSel:classTag: */; + l3171: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6289,7 +6298,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l3189; + goto l3188; } } /* begin classAtIndex: */ @@ -6302,12 +6311,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l3185; + goto l3184; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l3185: /* end classAtIndex: */; + l3184: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6321,7 +6330,7 @@ interpret(void) addNewMethodToCache(GIV(lkupClass)); } - l3189: /* end internalFindNewMethodOrdinary */; + l3188: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6334,28 +6343,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l3193; + goto l3192; } if (localPrimIndex == 256) { - goto l3193; + goto l3192; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l3193; + goto l3192; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l3193; + goto l3192; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l3193; + goto l3192; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l3193; + goto l3192; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6419,7 +6428,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l3193; + goto l3192; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6501,11 +6510,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l3187; + goto l3186; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l3187: /* end getErrorObjectFromPrimFailCode */; + l3186: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6531,7 +6540,7 @@ interpret(void) } } - l3193: /* end internalExecuteNewMethod */; + l3192: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6980,18 +6989,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7107,7 +7120,7 @@ interpret(void) CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -8564,7 +8577,7 @@ interpret(void) goto l1297; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l1297; } if (fmt >= (firstShortFormat())) { @@ -8586,14 +8599,14 @@ interpret(void) case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -16331,7 +16344,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -17189,7 +17202,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3207; + goto l3205; } if (bytecode == 172) { @@ -17198,7 +17211,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3207; + goto l3205; } if (bytecode > 167) { @@ -17208,7 +17221,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3207; + goto l3205; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -17216,7 +17229,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l3207: /* end case */; + l3205: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -17374,7 +17387,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3210; + goto l3208; } if (bytecode == 172) { @@ -17384,14 +17397,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3210; + goto l3208; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l3210: /* end case */; + l3208: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -19771,7 +19784,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3211; + goto l3209; } if (bytecode == 239) { @@ -19780,7 +19793,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3211; + goto l3209; } if (bytecode == 238) { @@ -19790,7 +19803,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3211; + goto l3209; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -19798,7 +19811,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l3211: /* end case */; + l3209: /* end case */; BREAK; CASE(355) /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -19956,7 +19969,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3214; + goto l3212; } if (bytecode == 239) { @@ -19966,14 +19979,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3214; + goto l3212; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l3214: /* end case */; + l3212: /* end case */; BREAK; CASE(356) /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -21677,10 +21690,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l3216; + goto l3214; } ourContext = marryFrameSP(theFP, theSP); - l3216: /* end ensureFrameIsMarried:SP: */; + l3214: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -21914,7 +21927,7 @@ interpret(void) CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -22061,6 +22074,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l1816; } @@ -24177,7 +24191,7 @@ interpret(void) goto l2762; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l2762; } if (fmt >= (firstShortFormat())) { @@ -24199,14 +24213,14 @@ interpret(void) case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -31848,7 +31862,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -31887,7 +31901,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -31899,10 +31912,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l3079; + goto l3069; } context = marryFrameSP(theFP, theSP); - l3079: /* end ensureFrameIsMarried:SP: */; + l3069: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -31930,13 +31943,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l3073; + goto l3078; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l3073: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l3078: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -31994,7 +32007,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -32019,10 +32032,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l3089; + goto l3088; } context = marryFrameSP(theFP, theSP); - l3089: /* end ensureFrameIsMarried:SP: */; + l3088: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -32050,13 +32063,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l3085; + goto l3084; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l3085: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l3084: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -32178,11 +32191,11 @@ interpret(void) value = result; } object2 = value; - goto l3095; + goto l3094; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l3095; + goto l3094; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -32205,7 +32218,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l3095; + goto l3094; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -32213,24 +32226,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l3095; + goto l3094; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l3095; + goto l3094; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); - goto l3095; + goto l3094; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l3095; + goto l3094; } error("bad index"); object2 = 0; - l3095: /* end instVar:ofContext: */; + l3094: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -32334,7 +32347,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l3107; + goto l3106; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -32355,7 +32368,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l3107; + goto l3106; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -32390,7 +32403,7 @@ interpret(void) markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l3107: /* end instVar:ofContext:put: */; + l3106: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -32408,7 +32421,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3110; + goto l3109; } # endif /* IMMUTABILITY */ @@ -32428,7 +32441,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l3110: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l3109: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -32527,7 +32540,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l3117; + goto l3116; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -32548,7 +32561,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l3117; + goto l3116; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -32583,7 +32596,7 @@ interpret(void) markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l3117: /* end instVar:ofContext:put: */; + l3116: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -32601,7 +32614,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3120; + goto l3119; } # endif /* IMMUTABILITY */ @@ -32621,7 +32634,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l3120: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l3119: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -32669,7 +32682,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3121; + goto l3120; } } if (!inverse) { @@ -32678,7 +32691,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3121; + goto l3120; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -32687,7 +32700,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l3121: /* end case */; + l3120: /* end case */; BREAK; } } @@ -33363,7 +33376,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -33385,10 +33397,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -33929,8 +33941,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -33951,8 +33964,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -34313,6 +34327,8 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) sqInt ceNewHashOf(sqInt anObject) { + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); return (((usqInt)(newHashBitsOf(anObject)) << 3) | 1); } @@ -34586,8 +34602,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -34744,7 +34761,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -34859,7 +34875,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -34892,7 +34907,7 @@ ceSendMustBeBooleanTointerpretingAtDelta(sqInt aNonBooleanObject, sqInt jumpSize sqInt oop; char *p; char *sp; - unsigned short startBcpc; + sqInt startBcpc; sqInt top; assert(addressCouldBeOop(aNonBooleanObject)); @@ -35102,7 +35117,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -35230,18 +35244,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -35326,7 +35344,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -35692,7 +35709,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -36558,7 +36575,6 @@ flushExternalPrimitiveOf(sqInt methodObj) header = ((((CogMethod *) header1))->methodHeader); } if (header & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (methodObj + ((LiteralStart + (((header >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primIdx1 = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -36675,7 +36691,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -37755,7 +37771,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -38357,18 +38373,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -38395,7 +38412,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -38868,7 +38885,7 @@ positive32BitValueOf(sqInt oop) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -38929,7 +38946,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -39379,7 +39396,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - sqInt numTemps; + usqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -39869,7 +39886,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -40023,6 +40040,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -40225,6 +40245,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -40473,15 +40494,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -40538,6 +40571,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -40550,8 +40584,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -40727,6 +40763,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -41105,7 +41142,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -41183,7 +41220,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -41572,8 +41609,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -41746,6 +41784,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -42066,8 +42105,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42075,14 +42113,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42111,8 +42149,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42120,14 +42157,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -42158,8 +42195,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -42167,14 +42203,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -43854,8 +43890,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43863,14 +43898,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43894,8 +43929,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -43903,14 +43937,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -43936,8 +43970,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -43945,14 +43978,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l18; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -43975,6 +44008,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -44426,16 +44460,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -44462,7 +44496,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -44538,7 +44572,7 @@ magnitude64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -44912,7 +44946,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -45663,8 +45696,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -45843,8 +45876,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -46160,8 +46193,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -46560,7 +46593,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -46790,7 +46823,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -47057,7 +47090,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -47321,7 +47354,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -47757,7 +47790,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -47767,7 +47800,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -47778,7 +47811,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -47795,7 +47828,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -47807,8 +47840,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47826,7 +47858,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -47944,7 +47976,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -49762,8 +49794,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49771,14 +49802,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49803,8 +49834,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49812,14 +49842,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49846,8 +49876,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49855,14 +49884,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -49894,7 +49923,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -50058,7 +50087,7 @@ primitiveFullClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -50324,7 +50353,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -50587,7 +50616,7 @@ primitiveFullClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -50911,6 +50940,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -51143,7 +51219,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -52482,7 +52558,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -52720,7 +52796,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -53031,7 +53107,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -53125,7 +53201,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -53185,7 +53261,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -53329,8 +53405,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53338,18 +53413,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -53372,8 +53447,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -53381,18 +53455,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -53404,8 +53478,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -53413,22 +53486,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -53653,7 +53726,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -53669,28 +53742,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = numSlots2; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ assert(!(isFreeObject(stack))); longAtput(stack, (longAt(stack)) | (1ULL << (markedBitFullShift()))); @@ -53707,28 +53780,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = numSlots3; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -53738,7 +53811,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -53748,7 +53820,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -53787,7 +53858,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & (smallIntegerTag())) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -53809,7 +53880,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -53847,28 +53918,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = numSlots; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -53883,13 +53954,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 3); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -54868,7 +54939,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -58222,8 +58293,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58231,14 +58301,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58263,8 +58333,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58272,14 +58341,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58306,8 +58375,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58315,14 +58383,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -58581,7 +58649,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -58839,8 +58907,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58848,14 +58915,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58876,8 +58943,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58885,14 +58951,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58915,8 +58981,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58924,14 +58989,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -59074,18 +59139,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3))) != 7)) { return 0; @@ -59167,8 +59236,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -59575,7 +59643,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; sqInt newFormat; sqInt normalizedInstFormat; @@ -59826,6 +59894,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -59857,7 +59936,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -59978,7 +60057,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -59990,7 +60069,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -60001,7 +60080,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -60469,8 +60548,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60478,14 +60556,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -60508,8 +60586,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -60517,14 +60594,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -60570,8 +60647,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60579,14 +60655,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -60719,7 +60795,6 @@ copyAndForwardMourner(sqInt mourner) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -60749,12 +60824,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -60783,16 +60857,15 @@ copyAndForwardMourner(sqInt mourner) then corpse is threaded onto the weakList for later treatment. */ /* SpurGenerationScavenger>>#copyAndForward: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForward(sqInt survivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -60838,12 +60911,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -60877,12 +60949,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -61082,7 +61154,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -61594,7 +61666,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -61610,8 +61682,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61739,7 +61810,7 @@ scavengeReferentsOf(sqInt referrer) sqInt header; sqInt header1; sqInt i; - usqInt newLocation; + sqInt newLocation; sqInt numLiterals; sqInt numSlots; usqInt numSlots1; @@ -62055,8 +62126,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62064,14 +62134,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -62097,8 +62167,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -62106,14 +62175,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -62128,8 +62197,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -62137,14 +62205,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -62518,7 +62586,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -62526,7 +62594,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -62537,8 +62605,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62579,8 +62646,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -62588,14 +62654,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -62634,8 +62700,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -62682,8 +62747,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -62691,14 +62755,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -62746,8 +62810,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -62755,14 +62818,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -62807,8 +62870,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -62861,8 +62923,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -62870,14 +62931,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -62921,7 +62982,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -62940,7 +63001,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -62956,7 +63017,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -63056,8 +63117,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63093,8 +63153,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -63102,14 +63161,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -63146,8 +63205,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -63155,14 +63213,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63192,8 +63250,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -63201,14 +63258,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -63319,8 +63376,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63328,14 +63384,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63359,8 +63415,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -63368,14 +63423,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -63401,8 +63456,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -63410,14 +63464,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -63459,8 +63513,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63468,14 +63521,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -64561,8 +64614,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64570,14 +64622,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64622,8 +64674,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -64631,14 +64682,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -64718,8 +64769,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -64727,14 +64777,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -64890,12 +64940,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -64938,8 +64988,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64947,14 +64996,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -65005,12 +65054,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -65053,8 +65102,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -65062,14 +65110,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -65163,12 +65211,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -65228,8 +65276,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -65237,14 +65284,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -65294,7 +65341,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -65335,7 +65382,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -65929,8 +65976,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -65938,14 +65984,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -66374,8 +66420,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -66383,14 +66428,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66422,8 +66467,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -66431,14 +66475,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66472,8 +66516,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -66481,14 +66524,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -66774,7 +66817,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -67029,8 +67071,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -67038,14 +67079,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -67068,8 +67109,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -67077,14 +67117,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -67320,8 +67360,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -67329,14 +67368,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -67369,8 +67408,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -67378,14 +67416,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -67420,8 +67458,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -67429,14 +67466,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -67516,8 +67553,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -67525,14 +67561,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -67562,8 +67598,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -67571,14 +67606,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -67610,8 +67645,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -67619,14 +67653,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -68196,7 +68230,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -68521,8 +68555,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -68530,14 +68563,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -68560,8 +68593,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -68569,14 +68601,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -68601,8 +68633,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -68610,14 +68641,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -68675,7 +68706,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -68683,7 +68714,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -68722,10 +68753,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i2 = 2; i2 < GIV(numClassTablePages); i2 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i2; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -68776,8 +68807,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -68785,14 +68815,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } @@ -70297,8 +70327,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -70320,8 +70349,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -70365,7 +70393,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -70373,7 +70401,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -70381,7 +70409,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -70389,11 +70417,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -70403,7 +70431,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -70411,11 +70439,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -70428,8 +70456,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -70437,17 +70464,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -70456,7 +70483,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -70475,7 +70502,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -70491,7 +70518,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -70512,8 +70539,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -70521,17 +70547,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -70539,8 +70565,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -70548,17 +70573,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -70578,7 +70603,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -70636,8 +70660,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -70645,14 +70668,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -70778,8 +70801,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -70787,14 +70809,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -70824,8 +70846,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -70833,14 +70854,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70863,8 +70884,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -70872,14 +70892,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -70985,8 +71005,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -70994,14 +71013,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71055,8 +71074,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71064,14 +71082,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71127,8 +71145,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71136,14 +71153,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -71283,7 +71300,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -71311,7 +71328,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -71335,7 +71352,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -71363,7 +71380,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -71386,8 +71403,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -71395,14 +71411,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -71896,7 +71912,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -72150,7 +72166,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -72525,8 +72541,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72562,7 +72577,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -72577,7 +72592,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -72841,8 +72856,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72864,8 +72878,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -72888,8 +72901,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -72910,8 +72922,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -72989,8 +73000,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72998,14 +73008,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73027,8 +73037,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -73036,14 +73045,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -73068,8 +73077,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -73077,14 +73085,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -73196,8 +73204,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -73293,8 +73300,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -73302,14 +73308,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -73348,8 +73354,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -73357,14 +73362,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73396,8 +73401,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -73405,14 +73409,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -73553,8 +73557,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74040,8 +74043,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74049,14 +74051,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74087,8 +74089,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74096,14 +74097,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -74136,8 +74137,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74145,14 +74145,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -74256,8 +74256,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74265,14 +74264,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74310,8 +74309,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74319,14 +74317,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -74366,8 +74364,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74375,14 +74372,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -74508,8 +74505,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74517,14 +74513,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -74554,8 +74550,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74563,14 +74558,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74593,8 +74588,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74602,14 +74596,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -74685,8 +74679,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -74694,14 +74687,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74729,8 +74722,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -74738,14 +74730,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -74768,8 +74760,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -74777,14 +74768,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -75132,8 +75123,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -75141,14 +75131,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -75178,8 +75168,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -75187,14 +75176,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -75217,8 +75206,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -75226,14 +75214,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -75359,8 +75347,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -75368,14 +75355,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -75404,8 +75391,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -75413,14 +75399,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -75451,8 +75437,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -75460,14 +75445,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -75550,8 +75535,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -75559,14 +75543,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -75602,8 +75586,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -75611,14 +75594,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -75656,8 +75639,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -75665,14 +75647,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -75756,8 +75738,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -75765,14 +75746,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -75802,8 +75783,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -75811,14 +75791,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -75841,8 +75821,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -75850,14 +75829,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -76067,8 +76046,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -76076,14 +76054,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -76111,8 +76089,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -76120,14 +76097,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -76148,8 +76125,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -76157,14 +76133,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -76239,13 +76215,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -76253,15 +76229,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -76278,7 +76254,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -76302,8 +76278,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -76311,14 +76286,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -76339,13 +76314,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -76353,15 +76328,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -76378,7 +76353,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -76402,8 +76377,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -76411,14 +76385,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -76440,13 +76414,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -76454,15 +76428,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -76479,7 +76453,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -76504,8 +76478,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -76513,14 +76486,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -76933,7 +76906,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -76943,8 +76915,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -76995,7 +76966,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -77188,6 +77159,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -77288,7 +77269,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -77307,7 +77288,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -77323,7 +77304,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -77332,7 +77313,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -77351,7 +77332,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -77367,7 +77348,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -77431,8 +77412,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -77598,7 +77578,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -78280,11 +78260,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -78299,7 +78279,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -78315,8 +78295,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -78324,16 +78303,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -78359,8 +78338,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -78368,14 +78346,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -78395,16 +78373,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -78413,11 +78391,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -78425,7 +78403,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -78495,8 +78473,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -78504,14 +78481,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -78610,8 +78587,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -78631,8 +78607,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -78640,14 +78615,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -78709,8 +78684,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -78789,7 +78763,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -78811,7 +78785,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -78860,7 +78834,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -78876,8 +78850,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -78885,16 +78858,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -78965,8 +78938,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -78974,14 +78946,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -79000,9 +78972,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -79018,9 +78987,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -79052,9 +79020,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -79065,8 +79032,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -79076,9 +79042,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -79136,7 +79101,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -79211,8 +79176,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -79268,8 +79232,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -79277,14 +79240,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -79349,8 +79312,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -79358,14 +79320,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -79482,8 +79444,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -79491,14 +79452,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -79538,7 +79499,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -79704,13 +79665,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l56; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l56: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l57; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -79718,15 +79679,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l57; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l57; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l57; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -79743,7 +79704,7 @@ updatePointers(void) numLiterals1 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l57: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -79770,8 +79731,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -79779,14 +79739,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -79798,7 +79758,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -79811,13 +79771,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l63; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l63: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l64; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -79825,15 +79785,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l64; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l64; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l64; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -79850,7 +79810,7 @@ updatePointers(void) numLiterals2 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l64: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -79878,8 +79838,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -79887,16 +79846,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -79937,13 +79896,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -79951,15 +79910,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -79976,7 +79935,7 @@ updatePointers(void) numLiterals3 = ((header4 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -80013,8 +79972,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -80049,7 +80007,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -80062,8 +80020,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -80071,18 +80028,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -80105,13 +80062,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l63; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -80119,15 +80076,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l62; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l62; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -80144,7 +80101,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -80173,8 +80130,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -80182,14 +80138,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -80391,8 +80347,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -80400,14 +80355,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -80492,7 +80447,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -80592,8 +80547,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -80760,7 +80715,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -80876,8 +80831,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -80885,24 +80839,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -80965,8 +80919,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -81195,8 +81149,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); @@ -81502,7 +81456,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -81596,8 +81549,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -81605,14 +81557,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -81633,8 +81585,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -81642,14 +81593,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -81672,8 +81623,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -81681,14 +81631,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -82403,7 +82353,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -82413,7 +82363,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -82501,9 +82451,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -82609,6 +82559,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -83232,8 +83211,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -83241,14 +83219,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -83300,8 +83278,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -83309,14 +83286,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -83370,8 +83347,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -83379,20 +83355,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -83425,8 +83401,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -83434,14 +83409,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -83466,8 +83441,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -83475,14 +83449,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -83509,8 +83483,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -83518,16 +83491,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -83652,8 +83625,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -83727,8 +83701,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -83818,8 +83793,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -85152,8 +85128,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -86228,7 +86205,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -86403,7 +86380,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -86571,7 +86548,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -86737,7 +86714,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -86944,7 +86921,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -87291,8 +87268,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -87345,11 +87323,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -87375,11 +87351,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -87578,18 +87552,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -87862,6 +87837,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -88315,8 +88323,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -88324,14 +88331,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -88362,8 +88369,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -88371,14 +88377,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -88402,8 +88408,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -88411,14 +88416,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -89149,7 +89154,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -89160,7 +89165,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -89171,23 +89176,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -89203,39 +89208,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -89248,7 +89253,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -89256,7 +89261,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -89267,7 +89272,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -89281,7 +89286,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -89294,12 +89299,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -89310,7 +89315,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -89318,9 +89323,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -89334,8 +89339,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -89343,14 +89347,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -89397,7 +89401,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -89408,7 +89412,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -89419,23 +89423,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -89451,39 +89455,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -89496,7 +89500,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -89504,7 +89508,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -89515,7 +89519,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -89529,7 +89533,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -89542,12 +89546,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -89558,7 +89562,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -89566,9 +89570,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -89582,8 +89586,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -89591,14 +89594,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -89646,7 +89649,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -89657,7 +89660,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -89668,23 +89671,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -89700,39 +89703,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -89745,7 +89748,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -89753,7 +89756,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -89764,7 +89767,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -89778,7 +89781,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -89791,12 +89794,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -89807,7 +89810,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -89815,9 +89818,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -89832,8 +89835,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -89841,14 +89843,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -91166,11 +91168,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -91262,7 +91266,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - signed char accessorDepth; + sqInt accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -91424,14 +91428,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -91448,6 +91461,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -91460,21 +91474,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -91490,12 +91508,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -91511,6 +91532,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -91524,11 +91546,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -91554,6 +91579,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -92966,7 +92995,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -96493,7 +96522,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -96530,7 +96559,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -96831,7 +96860,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -97137,7 +97166,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -97449,8 +97478,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -97500,8 +97530,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -97637,6 +97669,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -97646,165 +97679,134 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer = floatObjectOf(getCogCodeZoneThreshold()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (16U << (shiftForWord())), valuePointer); + /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -97812,9 +97814,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -97822,22 +97824,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -97845,192 +97847,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -98059,7 +97966,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -98092,14 +97999,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { result = ConstZero; } + if (arg == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -98175,7 +98085,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -98288,48 +98198,42 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l84; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l84: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -98384,7 +98288,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -98406,12 +98311,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l65; + goto l77; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l65: /* end setCogVMFlags: */; + l77: /* end setCogVMFlags: */; } } if (index == 49) { @@ -98644,8 +98549,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -98653,14 +98557,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -98699,8 +98603,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -98708,14 +98611,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -98747,8 +98650,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -98756,14 +98658,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -98788,6 +98690,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -98835,6 +98738,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spurlowcode64src/vm/interp.h b/spurlowcode64src/vm/interp.h index 628ec750b..a720cf6a7 100644 --- a/spurlowcode64src/vm/interp.h +++ b/spurlowcode64src/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2134 uuid: 4721ad0c-159c-4bf2-9f3e-c9917fcdead5 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 8 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1152921504606846976 #define MaxSmallInteger 1152921504606846975 diff --git a/spurlowcode64src/vm/vmCallback.h b/spurlowcode64src/vm/vmCallback.h index f996f567b..3bf23acc7 100644 --- a/spurlowcode64src/vm/vmCallback.h +++ b/spurlowcode64src/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2134 uuid: 4721ad0c-159c-4bf2-9f3e-c9917fcdead5 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/spurlowcodesrc/vm/cogit.h b/spurlowcodesrc/vm/cogit.h index 39493bfaa..7e8c42158 100644 --- a/spurlowcodesrc/vm/cogit.h +++ b/spurlowcodesrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ @@ -94,6 +94,8 @@ extern sqInt mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj); extern void recordCallOffsetIn(CogMethod *cogMethod); extern void rewritePrimInvocationInto(CogMethod *cogMethod, void (*primFunctionPointer)(void)); extern void voidCogCompiledCode(void); +extern double getCogCodeZoneThreshold(void); +extern sqInt setCogCodeZoneThreshold(double ratio); extern void callCogCodePopReceiverArg0Regs(void); extern void callCogCodePopReceiverArg1Arg0Regs(void); @@ -146,6 +148,7 @@ VM_EXPORT sqInt traceStores; #define getCFramePointer() CFramePointer #define getCStackPointer() CStackPointer #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define noCheckEntryOffset() cmNoCheckEntryOffset #define noContextSwitchBlockEntryOffset() blockNoContextSwitchOffset #define printOnTrace() (traceFlags & 1) diff --git a/spurlowcodesrc/vm/cogitARMv5.c b/spurlowcodesrc/vm/cogitARMv5.c index af596c8f8..8a2998f2b 100644 --- a/spurlowcodesrc/vm/cogitARMv5.c +++ b/spurlowcodesrc/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -272,7 +272,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 83 : 78) +#define NumTrampolines (IMMUTABILITY ? 84 : 79) #define OrCqR 108 #define OrCwR 116 #define OrOpcode 12 @@ -288,6 +288,7 @@ char *__cogitBuildInfo = __buildInfo; #define PrimCallMayCallBack 4 #define PrimCallNeedsNewMethod 1 #define PrimCallNeedsPrimitiveFunction 2 +#define PrimErrBadArgument 3 #define PrimErrNoMemory 9 #define PrimErrWritePastObject 17 #define PushCq 83 @@ -370,10 +371,10 @@ typedef struct _AbstractInstruction { unsigned char maxSize; unsigned char annotation; unsigned char conditionOrNil; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; - usqIntptr_t machineCode [5]; + unsigned int machineCode [5]; } AbstractInstruction; #define CogOutOfLineLiteralsARMCompiler AbstractInstruction @@ -441,10 +442,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -576,7 +579,7 @@ static sqInt NoDbgRegParms ldrhrnrm(AbstractInstruction * self_in_ldrhrnrm, sqIn static sqInt NoDbgRegParms ldrrnplusImm(AbstractInstruction * self_in_ldrrnplusImm, sqInt destReg, sqInt baseReg, sqInt immediate12bitValue); static sqInt NoDbgRegParms ldrrnplusimm(AbstractInstruction * self_in_ldrrnplusimm, sqInt destReg, sqInt baseReg, sqInt u, sqInt immediate12bitValue); static sqInt NoDbgRegParms ldrrnrm(AbstractInstruction * self_in_ldrrnrm, sqInt destReg, sqInt baseReg, sqInt offsetReg); -static sqInt NoDbgRegParms loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg); +static usqInt NoDbgRegParms loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg); static sqInt NoDbgRegParms loadPICLiteralByteSize(AbstractInstruction * self_in_loadPICLiteralByteSize); static sqInt NoDbgRegParms machineCodeBytes(AbstractInstruction * self_in_machineCodeBytes); static sqInt NoDbgRegParms machineCodeWords(AbstractInstruction * self_in_machineCodeWords); @@ -712,7 +715,7 @@ static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -732,7 +735,7 @@ static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointe static void generateClosedPICPrototype(void); static CogMethod * generateCogFullBlock(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateOpenPICPrototype(void); static void generateRunTimeTrampolines(void); static void generateStackPointerCapture(void); @@ -791,7 +794,7 @@ static BytecodeDescriptor * loadBytesAndGetDescriptor(void); static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc); static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); -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); @@ -873,7 +876,7 @@ static sqInt NoDbgRegParms counters(CogMethod * self_in_counters); extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void NoDbgRegParms clearSavedPICUsageCount(CogMethod *cogMethod); static void compactCompiledCode(void); @@ -882,7 +885,6 @@ static void followForwardedLiteralsInOpenPICList(void); extern void freeMethod(CogMethod *cogMethod); static void freeOlderMethodsForCompaction(void); static sqInt kosherYoungReferrers(void); -static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); extern CogMethod * methodFor(void *address); extern sqInt methodsCompiledToMachineCodeInto(sqInt arrayObj); extern sqInt numMethods(void); @@ -1120,9 +1122,12 @@ static SimStackEntry * NoDbgRegParms storeToReg(SimStackEntry * self_in_storeToR static CogSimStackNativeEntry * NoDbgRegParms ensureIsMarkedAsSpilled(CogSimStackNativeEntry * self_in_ensureIsMarkedAsSpilled); static CogSimStackNativeEntry * NoDbgRegParms ensureSpilledSPscratchRegister(CogSimStackNativeEntry * self_in_ensureSpilledSPscratchRegister, sqInt spRegister, sqInt scratchRegister); static sqInt NoDbgRegParms nativeFloatRegisterMask(CogSimStackNativeEntry * self_in_nativeFloatRegisterMask); +static sqInt NoDbgRegParms nativeFloatRegisterOrNone(CogSimStackNativeEntry * self_in_nativeFloatRegisterOrNone); static CogSimStackNativeEntry * NoDbgRegParms nativePopToReg(CogSimStackNativeEntry * self_in_nativePopToReg, sqInt reg); static CogSimStackNativeEntry * NoDbgRegParms nativePopToRegsecondReg(CogSimStackNativeEntry * self_in_nativePopToRegsecondReg, sqInt reg, sqInt secondReg); static sqInt NoDbgRegParms nativeRegisterMask(CogSimStackNativeEntry * self_in_nativeRegisterMask); +static sqInt NoDbgRegParms nativeRegisterOrNone(CogSimStackNativeEntry * self_in_nativeRegisterOrNone); +static sqInt NoDbgRegParms nativeRegisterSecondOrNone(CogSimStackNativeEntry * self_in_nativeRegisterSecondOrNone); static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToReg(CogSimStackNativeEntry * self_in_nativeStackPopToReg, sqInt reg); static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToRegsecondReg(CogSimStackNativeEntry * self_in_nativeStackPopToRegsecondReg, sqInt reg, sqInt secondReg); static sqInt NoDbgRegParms spillingNeedsScratchRegister(CogSimStackNativeEntry * self_in_spillingNeedsScratchRegister); @@ -1137,8 +1142,6 @@ static sqInt endSizeOffset(void); static sqInt NoDbgRegParms literalInstructionInRange(AbstractInstruction *litInst); static AbstractInstruction * NoDbgRegParms locateLiteral(sqInt aLiteral); static sqInt NoDbgRegParms mustDumpLiterals(sqInt currentOpcodeIndex); -static sqInt resetForBlockCompile(void); -static sqInt saveForBlockCompile(void); static sqInt compileBlockDispatch(void); static void compileGetErrorCode(void); static sqInt NoDbgRegParms compileInterpreterPrimitive(void (*primitiveRoutine)(void)); @@ -1244,8 +1247,12 @@ static sqInt NoDbgRegParms v4LongForwardBranchDistance(BytecodeDescriptor *descr static sqInt NoDbgRegParms v4LongBranchIfNotInstanceOfDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj); static sqInt NoDbgRegParms v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj); extern void voidCogCompiledCode(void); +extern double getCogCodeZoneThreshold(void); +static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); +extern sqInt setCogCodeZoneThreshold(double ratio); static BlockStart * NoDbgRegParms addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span); static void NoDbgRegParms adjustArgumentsForPerform(sqInt numArgs); +static sqInt NoDbgRegParms allocateFloatRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask); static sqInt NoDbgRegParms allocateRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms anyReferencesToRegisterinTopNItems(sqInt reg, sqInt n); @@ -1278,6 +1285,7 @@ static BytecodeFixup * NoDbgRegParms ensureNonMergeFixupAt(sqInt targetPC); static void ensureReceiverResultRegContainsSelf(void); static void NoDbgRegParms evaluateat(BytecodeDescriptor *descriptor, sqInt pc); static sqInt NoDbgRegParms eventualTargetOf(sqInt targetBytecodePC); +static sqInt NoDbgRegParms freeAnyFloatRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms freeAnyRegNotConflictingWith(sqInt regMask); static sqInt genBlockReturn(void); static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void) ; @@ -1299,294 +1307,14 @@ static sqInt NoDbgRegParms genJumpBackTo(sqInt targetBytecodePC); static sqInt NoDbgRegParms genJumpIfto(sqInt boolean, sqInt targetBytecodePC); static sqInt NoDbgRegParms genJumpTo(sqInt targetBytecodePC); static void NoDbgRegParms genLoadTempin(sqInt objectIndex, sqInt destReg); -static sqInt genLowcodeAdd32(void); -static sqInt genLowcodeAdd64(void); -static sqInt genLowcodeAlloca32(void); -static sqInt genLowcodeAlloca64(void); -static sqInt genLowcodeAnd32(void); -static sqInt genLowcodeAnd64(void); -static sqInt genLowcodeArithmeticRightShift32(void); -static sqInt genLowcodeArithmeticRightShift64(void); -static sqInt genLowcodeBeginCall(void); static sqInt NoDbgRegParms genLowcodeBinaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeBoolean32ToOop(void); -static sqInt genLowcodeBoolean64ToOop(void); -static sqInt genLowcodeByteSizeOf(void); -static sqInt genLowcodeCallArgumentFloat32(void); -static sqInt genLowcodeCallArgumentFloat64(void); -static sqInt genLowcodeCallArgumentInt32(void); -static sqInt genLowcodeCallArgumentInt64(void); -static sqInt genLowcodeCallArgumentPointer(void); -static sqInt genLowcodeCallArgumentSpace(void); -static sqInt genLowcodeCallArgumentStructure(void); -static sqInt genLowcodeCallInstruction(void); -static sqInt genLowcodeCallPhysical(void); -static sqInt genLowcodeCheckSessionIdentifier(void); -static sqInt genLowcodeCompareAndSwap32(void); -static sqInt genLowcodeDiv32(void); -static sqInt genLowcodeDiv64(void); -static sqInt genLowcodeDuplicateFloat32(void); -static sqInt genLowcodeDuplicateFloat64(void); -static sqInt genLowcodeDuplicateInt32(void); -static sqInt genLowcodeDuplicateInt64(void); -static sqInt genLowcodeDuplicatePointer(void); -static sqInt genLowcodeEffectiveAddress32(void); -static sqInt genLowcodeEffectiveAddress64(void); -static sqInt genLowcodeEndCall(void); -static sqInt genLowcodeEndCallNoCleanup(void); -static sqInt genLowcodeFirstFieldPointer(void); -static sqInt genLowcodeFirstIndexableFieldPointer(void); -static sqInt genLowcodeFloat32Add(void); -static sqInt genLowcodeFloat32Div(void); -static sqInt genLowcodeFloat32Equal(void); -static sqInt genLowcodeFloat32Great(void); -static sqInt genLowcodeFloat32GreatEqual(void); -static sqInt genLowcodeFloat32Less(void); -static sqInt genLowcodeFloat32LessEqual(void); -static sqInt genLowcodeFloat32Mul(void); -static sqInt genLowcodeFloat32Neg(void); -static sqInt genLowcodeFloat32NotEqual(void); -static sqInt genLowcodeFloat32Sqrt(void); -static sqInt genLowcodeFloat32Sub(void); -static sqInt genLowcodeFloat32ToFloat64(void); -static sqInt genLowcodeFloat32ToInt32(void); -static sqInt genLowcodeFloat32ToInt64(void); -static sqInt genLowcodeFloat32ToOop(void); -static sqInt genLowcodeFloat32ToUInt32(void); -static sqInt genLowcodeFloat32ToUInt64(void); -static sqInt genLowcodeFloat64Add(void); -static sqInt genLowcodeFloat64Div(void); -static sqInt genLowcodeFloat64Equal(void); -static sqInt genLowcodeFloat64Great(void); -static sqInt genLowcodeFloat64GreatEqual(void); -static sqInt genLowcodeFloat64Less(void); -static sqInt genLowcodeFloat64LessEqual(void); -static sqInt genLowcodeFloat64Mul(void); -static sqInt genLowcodeFloat64Neg(void); -static sqInt genLowcodeFloat64NotEqual(void); -static sqInt genLowcodeFloat64Sqrt(void); -static sqInt genLowcodeFloat64Sub(void); -static sqInt genLowcodeFloat64ToFloat32(void); -static sqInt genLowcodeFloat64ToInt32(void); -static sqInt genLowcodeFloat64ToInt64(void); -static sqInt genLowcodeFloat64ToOop(void); -static sqInt genLowcodeFloat64ToUInt32(void); -static sqInt genLowcodeFloat64ToUInt64(void); -static sqInt genLowcodeFree(void); -static sqInt genLowcodeInstantiateIndexable32Oop(void); -static sqInt genLowcodeInstantiateIndexableOop(void); -static sqInt genLowcodeInstantiateOop(void); -static sqInt genLowcodeInt32Equal(void); -static sqInt genLowcodeInt32Great(void); -static sqInt genLowcodeInt32GreatEqual(void); -static sqInt genLowcodeInt32Less(void); -static sqInt genLowcodeInt32LessEqual(void); -static sqInt genLowcodeInt32NotEqual(void); -static sqInt genLowcodeInt32ToFloat32(void); -static sqInt genLowcodeInt32ToFloat64(void); -static sqInt genLowcodeInt32ToOop(void); -static sqInt genLowcodeInt32ToPointer(void); -static sqInt genLowcodeInt64Equal(void); -static sqInt genLowcodeInt64Great(void); -static sqInt genLowcodeInt64GreatEqual(void); -static sqInt genLowcodeInt64Less(void); -static sqInt genLowcodeInt64LessEqual(void); -static sqInt genLowcodeInt64NotEqual(void); -static sqInt genLowcodeInt64ToFloat32(void); -static sqInt genLowcodeInt64ToFloat64(void); -static sqInt genLowcodeInt64ToOop(void); -static sqInt genLowcodeInt64ToPointer(void); -static sqInt genLowcodeIsBytes(void); -static sqInt genLowcodeIsFloatObject(void); -static sqInt genLowcodeIsIndexable(void); -static sqInt genLowcodeIsIntegerObject(void); -static sqInt genLowcodeIsPointers(void); -static sqInt genLowcodeIsWords(void); -static sqInt genLowcodeIsWordsOrBytes(void); -static sqInt genLowcodeLeftShift32(void); -static sqInt genLowcodeLeftShift64(void); -static sqInt genLowcodeLoadArgumentAddress(void); -static sqInt genLowcodeLoadArgumentFloat32(void); -static sqInt genLowcodeLoadArgumentFloat64(void); -static sqInt genLowcodeLoadArgumentInt16(void); -static sqInt genLowcodeLoadArgumentInt32(void); -static sqInt genLowcodeLoadArgumentInt64(void); -static sqInt genLowcodeLoadArgumentInt8(void); -static sqInt genLowcodeLoadArgumentPointer(void); -static sqInt genLowcodeLoadArgumentUInt16(void); -static sqInt genLowcodeLoadArgumentUInt32(void); -static sqInt genLowcodeLoadArgumentUInt64(void); -static sqInt genLowcodeLoadArgumentUInt8(void); -static sqInt genLowcodeLoadFloat32FromMemory(void); -static sqInt genLowcodeLoadFloat64FromMemory(void); -static sqInt genLowcodeLoadInt16FromMemory(void); -static sqInt genLowcodeLoadInt32FromMemory(void); -static sqInt genLowcodeLoadInt64FromMemory(void); -static sqInt genLowcodeLoadInt8FromMemory(void); -static sqInt genLowcodeLoadLocalAddress(void); -static sqInt genLowcodeLoadLocalFloat32(void); -static sqInt genLowcodeLoadLocalFloat64(void); -static sqInt genLowcodeLoadLocalInt16(void); -static sqInt genLowcodeLoadLocalInt32(void); -static sqInt genLowcodeLoadLocalInt64(void); -static sqInt genLowcodeLoadLocalInt8(void); -static sqInt genLowcodeLoadLocalPointer(void); -static sqInt genLowcodeLoadLocalUInt16(void); -static sqInt genLowcodeLoadLocalUInt32(void); -static sqInt genLowcodeLoadLocalUInt64(void); -static sqInt genLowcodeLoadLocalUInt8(void); -static sqInt genLowcodeLoadObjectAt(void); -static sqInt genLowcodeLoadObjectField(void); -static sqInt genLowcodeLoadPointerFromMemory(void); -static sqInt genLowcodeLoadUInt16FromMemory(void); -static sqInt genLowcodeLoadUInt32FromMemory(void); -static sqInt genLowcodeLoadUInt64FromMemory(void); -static sqInt genLowcodeLoadUInt8FromMemory(void); -static sqInt genLowcodeLocalFrameSize(void); -static sqInt genLowcodeLockRegisters(void); -static sqInt genLowcodeLockVM(void); -static sqInt genLowcodeMalloc32(void); -static sqInt genLowcodeMalloc64(void); -static sqInt genLowcodeMemcpy32(void); -static sqInt genLowcodeMemcpy64(void); -static sqInt genLowcodeMemcpyFixed(void); -static sqInt genLowcodeMoveFloat32ToPhysical(void); -static sqInt genLowcodeMoveFloat64ToPhysical(void); -static sqInt genLowcodeMoveInt32ToPhysical(void); -static sqInt genLowcodeMoveInt64ToPhysical(void); -static sqInt genLowcodeMovePointerToPhysical(void); -static sqInt genLowcodeMul32(void); -static sqInt genLowcodeMul64(void); -static sqInt genLowcodeNeg32(void); -static sqInt genLowcodeNeg64(void); -static sqInt genLowcodeNot32(void); -static sqInt genLowcodeNot64(void); static sqInt NoDbgRegParms genLowcodeNullaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeOopEqual(void); -static sqInt genLowcodeOopNotEqual(void); -static sqInt genLowcodeOopSmallIntegerToInt32(void); -static sqInt genLowcodeOopSmallIntegerToInt64(void); -static sqInt genLowcodeOopToBoolean32(void); -static sqInt genLowcodeOopToBoolean64(void); -static sqInt genLowcodeOopToFloat32(void); -static sqInt genLowcodeOopToFloat64(void); -static sqInt genLowcodeOopToInt32(void); -static sqInt genLowcodeOopToInt64(void); -static sqInt genLowcodeOopToPointer(void); -static sqInt genLowcodeOopToPointerReinterpret(void); -static sqInt genLowcodeOopToUInt32(void); -static sqInt genLowcodeOopToUInt64(void); -static sqInt genLowcodeOr32(void); -static sqInt genLowcodeOr64(void); -static sqInt genLowcodePerformCallout(void); -static sqInt genLowcodePerformCalloutIndirect(void); -static sqInt genLowcodePin(void); -static sqInt genLowcodePlaftormCode(void); -static sqInt genLowcodePointerAddConstantOffset(void); -static sqInt genLowcodePointerAddOffset32(void); -static sqInt genLowcodePointerAddOffset64(void); -static sqInt genLowcodePointerEqual(void); -static sqInt genLowcodePointerNotEqual(void); -static sqInt genLowcodePointerToInt32(void); -static sqInt genLowcodePointerToInt64(void); -static sqInt genLowcodePointerToOop(void); -static sqInt genLowcodePointerToOopReinterprer(void); -static sqInt genLowcodePopFloat32(void); -static sqInt genLowcodePopFloat64(void); -static sqInt genLowcodePopInt32(void); -static sqInt genLowcodePopInt64(void); -static sqInt genLowcodePopMultipleNative(void); -static sqInt genLowcodePopPointer(void); -static sqInt genLowcodePushCalloutResultFloat32(void); -static sqInt genLowcodePushCalloutResultFloat64(void); -static sqInt genLowcodePushCalloutResultInt32(void); -static sqInt genLowcodePushCalloutResultInt64(void); -static sqInt genLowcodePushCalloutResultPointer(void); -static sqInt genLowcodePushConstantUInt32(void); -static sqInt genLowcodePushConstantUInt64(void); -static sqInt genLowcodePushNullPointer(void); -static sqInt genLowcodePushOne32(void); -static sqInt genLowcodePushOne64(void); -static sqInt genLowcodePushOneFloat32(void); -static sqInt genLowcodePushOneFloat64(void); -static sqInt genLowcodePushPhysicalFloat32(void); -static sqInt genLowcodePushPhysicalFloat64(void); -static sqInt genLowcodePushPhysicalInt32(void); -static sqInt genLowcodePushPhysicalInt64(void); -static sqInt genLowcodePushPhysicalPointer(void); -static sqInt genLowcodePushSessionIdentifier(void); -static sqInt genLowcodePushZero32(void); -static sqInt genLowcodePushZero64(void); -static sqInt genLowcodePushZeroFloat32(void); -static sqInt genLowcodePushZeroFloat64(void); -static sqInt genLowcodeRem32(void); -static sqInt genLowcodeRem64(void); -static sqInt genLowcodeRightShift32(void); -static sqInt genLowcodeRightShift64(void); -static sqInt genLowcodeSignExtend32From16(void); -static sqInt genLowcodeSignExtend32From8(void); -static sqInt genLowcodeSignExtend64From16(void); -static sqInt genLowcodeSignExtend64From32(void); -static sqInt genLowcodeSignExtend64From8(void); -static sqInt genLowcodeSmallInt32ToOop(void); -static sqInt genLowcodeStoreFloat32ToMemory(void); -static sqInt genLowcodeStoreFloat64ToMemory(void); -static sqInt genLowcodeStoreInt16ToMemory(void); -static sqInt genLowcodeStoreInt32ToMemory(void); -static sqInt genLowcodeStoreInt64ToMemory(void); -static sqInt genLowcodeStoreInt8ToMemory(void); -static sqInt genLowcodeStoreLocalFloat32(void); -static sqInt genLowcodeStoreLocalFloat64(void); -static sqInt genLowcodeStoreLocalInt16(void); -static sqInt genLowcodeStoreLocalInt32(void); -static sqInt genLowcodeStoreLocalInt64(void); -static sqInt genLowcodeStoreLocalInt8(void); -static sqInt genLowcodeStoreLocalPointer(void); -static sqInt genLowcodeStoreObjectField(void); -static sqInt genLowcodeStoreObjectFieldAt(void); -static sqInt genLowcodeStorePointerToMemory(void); -static sqInt genLowcodeSub32(void); -static sqInt genLowcodeSub64(void); static sqInt NoDbgRegParms genLowcodeTrinaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeTruncate32To16(void); -static sqInt genLowcodeTruncate32To8(void); -static sqInt genLowcodeTruncate64To16(void); -static sqInt genLowcodeTruncate64To32(void); -static sqInt genLowcodeTruncate64To8(void); -static sqInt genLowcodeUdiv32(void); -static sqInt genLowcodeUdiv64(void); -static sqInt genLowcodeUint32Great(void); -static sqInt genLowcodeUint32GreatEqual(void); -static sqInt genLowcodeUint32Less(void); -static sqInt genLowcodeUint32LessEqual(void); -static sqInt genLowcodeUint32ToFloat32(void); -static sqInt genLowcodeUint32ToFloat64(void); -static sqInt genLowcodeUint32ToOop(void); -static sqInt genLowcodeUint64Great(void); -static sqInt genLowcodeUint64GreatEqual(void); -static sqInt genLowcodeUint64Less(void); -static sqInt genLowcodeUint64LessEqual(void); -static sqInt genLowcodeUint64ToFloat32(void); -static sqInt genLowcodeUint64ToFloat64(void); -static sqInt genLowcodeUint64ToOop(void); -static sqInt genLowcodeUmul32(void); -static sqInt genLowcodeUmul64(void); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive2(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive3(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive4(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive5(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeUnlockVM(void); -static sqInt genLowcodeUnpin(void); -static sqInt genLowcodeUrem32(void); -static sqInt genLowcodeUrem64(void); -static sqInt genLowcodeXor32(void); -static sqInt genLowcodeXor64(void); -static sqInt genLowcodeZeroExtend32From16(void); -static sqInt genLowcodeZeroExtend32From8(void); -static sqInt genLowcodeZeroExtend64From16(void); -static sqInt genLowcodeZeroExtend64From32(void); -static sqInt genLowcodeZeroExtend64From8(void); static sqInt NoDbgRegParms genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable); static sqInt NoDbgRegParms genMethodAbortTrampolineFor(sqInt numArgs); static sqInt NoDbgRegParms genPICAbortTrampolineFor(sqInt numArgs); @@ -1628,7 +1356,7 @@ static sqInt NoDbgRegParms genStorePopRemoteInstVarofObjectAtneedsStoreCheckneed static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1661,8 +1389,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void ssFlushAll(void); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1670,6 +1396,7 @@ static void NoDbgRegParms ssNativeFlushTo(sqInt index); static void NoDbgRegParms ssNativePop(sqInt n); static void NoDbgRegParms ssNativePush(sqInt n); static CogSimStackNativeEntry * ssNativeTop(void); +static CogSimStackNativeEntry * NoDbgRegParms ssNativeValue(sqInt n); static void NoDbgRegParms ssPopNativeSize(sqInt popSize); static void NoDbgRegParms ssPop(sqInt n); static sqInt NoDbgRegParms ssPushAnnotatedConstant(sqInt literal); @@ -1699,6 +1426,7 @@ static void voidReceiverResultRegContainsSelf(void); /*** Variables ***/ static AbstractInstruction * abstractOpcodes; +static usqInt allocationThreshold; static AbstractInstruction aMethodLabel; static AbstractInstruction * const backEnd = &aMethodLabel; static usqInt baseAddress; @@ -1706,7 +1434,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt breakBlock; static sqInt breakMethod; @@ -1744,6 +1471,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1790,6 +1518,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt cPICCaseSize; static sqInt cPICEndOfCodeOffset; @@ -2391,9 +2120,6 @@ void (*realCEEnterCogCodePopReceiverReg)(void); static sqInt receiverTags; static sqInt regArgsHaveBeenPushed; static sqInt runtimeObjectRefIndex; -static sqInt savedFirstOpcodeIndex; -static sqInt savedLastDumpedLiteralIndex; -static sqInt savedNextLiteralIndex; static AbstractInstruction * sendMiss; static sqInt simNativeSpillBase; static CogSimStackNativeEntry simNativeStack[70]; @@ -2407,6 +2133,7 @@ static AbstractInstruction * stackCheckLabel; static AbstractInstruction * stackOverflowCall; static sqInt superSendTrampolines[NumSendTrampolines]; static sqInt tempOop; +static float thresholdRatio = 0.5f; int traceFlags = 8 /* prim trace log on by default */; sqInt traceStores; static char *trampolineAddresses[NumTrampolines*2]; @@ -2446,6 +2173,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -3293,8 +3021,8 @@ static usqInt NoDbgRegParms concretizeCMPSMULL(AbstractInstruction * self_in_concretizeCMPSMULL) { sqInt aWord; - usqIntptr_t hiReg; - usqIntptr_t loReg; + usqInt hiReg; + usqInt loReg; hiReg = ((self_in_concretizeCMPSMULL->operands))[0]; loReg = ((self_in_concretizeCMPSMULL->operands))[1]; @@ -3313,7 +3041,7 @@ concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditi { sqInt aWord; sqInt i; - usqInt instr; + sqInt instr; unsigned char savedCond; assert(((self_in_concretizeConditionalInstruction->conditionOrNil)) != null); @@ -3360,7 +3088,7 @@ static usqInt NoDbgRegParms concretizeMSR(AbstractInstruction * self_in_concretizeMSR) { sqInt aWord; - usqIntptr_t flags; + usqInt flags; flags = ((self_in_concretizeMSR->operands))[0]; /* begin machineCodeAt:put: */ @@ -3390,8 +3118,8 @@ concretizeSMULL(AbstractInstruction * self_in_concretizeSMULL) sqInt aWord; sqInt hiResultReg; sqInt loResultReg; - usqIntptr_t srcA; - usqIntptr_t srcB; + usqInt srcA; + usqInt 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 */ @@ -3444,7 +3172,7 @@ dataOpTyperdrnrmlsr(AbstractInstruction * self_in_dataOpTyperdrnrmlsr, sqInt arm static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - usqIntptr_t addressOperand; + usqInt addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord10; @@ -3573,54 +3301,54 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt aWord7; sqInt aWord8; sqInt aWord9; - usqIntptr_t base; - usqIntptr_t base1; - usqIntptr_t base2; - usqIntptr_t base3; - usqIntptr_t baseReg; - usqIntptr_t baseReg1; - usqIntptr_t baseReg2; - usqIntptr_t constant; - usqIntptr_t constant1; - usqIntptr_t constant10; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; + usqInt baseReg; + usqInt baseReg1; + usqInt baseReg2; + usqInt constant; + usqInt constant1; + usqInt constant10; sqInt 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; + usqInt constant12; + usqInt constant13; + usqInt constant14; + usqInt constant2; + usqInt constant3; + usqInt constant4; + usqInt constant5; + usqInt constant6; + usqInt constant7; + usqInt constant8; + usqInt constant9; AbstractInstruction *dependentChain; - 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; + usqInt dest; + usqInt dest1; + usqInt destAddr; + usqInt destAddr1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg2; + usqInt destReg3; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; sqInt distance; sqInt distance1; sqInt distance2; - usqIntptr_t distReg; - usqIntptr_t distReg1; - usqIntptr_t distReg2; - usqIntptr_t dstReg; - usqIntptr_t dstReg1; + usqInt distReg; + usqInt distReg1; + usqInt distReg2; + usqInt dstReg; + usqInt dstReg1; sqInt flagsOrOpcode; sqInt flagsOrOpcode1; sqInt flagsOrOpcode11; @@ -3629,7 +3357,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt flagsOrOpcode3; sqInt flagsOrOpcode4; sqInt flagsOrOpcode5; - usqIntptr_t fpReg; + usqInt fpReg; sqInt hb; sqInt hb1; sqInt hb11; @@ -3675,10 +3403,10 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt immediate7; sqInt immediate8; sqInt immediate9; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; usqInt instrOffset; usqInt instrOffset1; usqInt instrOffset10; @@ -3696,7 +3424,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) usqInt instrOffset21; usqInt instrOffset22; sqInt instrOffset23; - sqInt instrOffset24; + usqInt instrOffset24; usqInt instrOffset25; usqInt instrOffset26; usqInt instrOffset27; @@ -3767,8 +3495,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget9; sqInt negate; sqInt negate1; - sqIntptr_t offset; - sqIntptr_t offset1; + sqInt offset; + sqInt offset1; sqInt offset10; sqInt offset11; sqInt offset12; @@ -3787,7 +3515,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset24; sqInt offset25; sqInt offset26; - usqIntptr_t offset27; + usqInt offset27; sqInt offset28; sqInt offset29; sqInt offset3; @@ -3802,77 +3530,77 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset8; sqInt offset9; sqInt p; - usqIntptr_t rd; - usqIntptr_t rd1; - usqIntptr_t rd10; - usqIntptr_t rd11; - usqIntptr_t rd110; - usqIntptr_t rd111; - 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 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 rn110; - usqIntptr_t rn111; - 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 rn3; - usqIntptr_t rn4; - usqIntptr_t rn5; - usqIntptr_t rn6; - usqIntptr_t rn7; - usqIntptr_t rn8; - usqIntptr_t rn9; + usqInt rd; + usqInt rd1; + usqInt rd10; + usqInt rd11; + usqInt rd110; + usqInt rd111; + usqInt rd12; + usqInt rd13; + usqInt rd14; + usqInt rd15; + usqInt rd16; + usqInt rd17; + usqInt rd18; + usqInt rd19; + usqInt rd2; + usqInt rd20; + usqInt rd21; + usqInt rd22; + usqInt rd3; + usqInt rd4; + usqInt rd5; + usqInt rd6; + usqInt rd7; + usqInt rd8; + usqInt rd9; + usqInt reg; + usqInt reg1; + usqInt reg2; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt regA; + usqInt regB; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS2; + usqInt regRHS3; + usqInt rn; + usqInt rn1; + usqInt rn10; + usqInt rn11; + usqInt rn110; + usqInt rn111; + usqInt rn12; + usqInt rn13; + usqInt rn14; + usqInt rn15; + usqInt rn16; + usqInt rn17; + usqInt rn18; + usqInt rn19; + usqInt rn2; + usqInt rn20; + usqInt rn21; + usqInt rn22; + usqInt rn23; + usqInt rn24; + usqInt rn3; + usqInt rn4; + usqInt rn5; + usqInt rn6; + usqInt rn7; + usqInt rn8; + usqInt rn9; sqInt rot; sqInt rot1; sqInt rot10; @@ -3887,30 +3615,30 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt rot7; sqInt rot8; sqInt rot9; - 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; + usqInt src; + usqInt src1; + usqInt srcAddr; + usqInt srcAddr1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg3; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; int u; int u1; sqInt u2; @@ -3919,14 +3647,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt u5; sqInt u6; sqInt u7; - sqIntptr_t val; - sqIntptr_t val1; - sqIntptr_t val11; - sqIntptr_t val12; - sqIntptr_t val2; - usqIntptr_t val3; - sqIntptr_t val4; - sqIntptr_t val5; + sqInt val; + sqInt val1; + sqInt val11; + sqInt val12; + sqInt val2; + usqInt val3; + sqInt val4; + sqInt val5; sqInt value; sqInt value1; unsigned int value2; @@ -3936,8 +3664,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) unsigned int value6; sqInt word; sqInt word1; - usqIntptr_t word2; - usqIntptr_t word3; + usqInt word2; + usqInt word3; if (!(((self_in_dispatchConcretize->conditionOrNil)) == null)) { concretizeConditionalInstruction(self_in_dispatchConcretize); @@ -4573,7 +4301,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord111 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(AddOpcode) << 21))) | (1U << 20)))) | ((rn1 << 16) | (rd1 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset2 / 4] = aWord111; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset2 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset2 + 4; goto l143; l136: /* end rotateable8bitSignedImmediate:ifTrue:ifFalse: */; @@ -4661,7 +4389,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i13 = 2; i13 <= 30; i13 += 2) { if ((val11 & (((0xFFU << i13) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i13)))) == val11) { rot11 = 32 - i13; - immediate14 = (((usqInt) val11) >> i13) | ((((sqIntptr_t)((usqInt)(val11) << (32 - i13)))) & 0xFFFFFFFFU); + immediate14 = (((usqInt) val11) >> i13) | ((((sqInt)((usqInt)(val11) << (32 - i13)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord410 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn21 << 16) | (rd18 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot11) >> 1)) << 8))) | immediate14) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord410; @@ -4704,7 +4432,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1110 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn19 << 16) | (rd19 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset26 / 4] = aWord1110; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset26 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset26 + 4; goto l331; l365: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -4787,7 +4515,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1111 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn20 << 16) | (rd20 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset27 / 4] = aWord1111; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset27 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset27 + 4; goto l339; } @@ -4875,7 +4603,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord112 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(CmpOpcode) << 21))) | (1U << 20)))) | ((rn11 << 16) | (rd11 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset3 / 4] = aWord112; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset3 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset3 + 4; goto l151; l144: /* end rotateable8bitSignedImmediate:ifTrue:ifFalse: */; @@ -4904,7 +4632,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i10 = 2; i10 <= 30; i10 += 2) { if ((val4 & (((0xFFU << i10) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i10)))) == val4) { rot10 = 32 - i10; - immediate17 = (((usqInt) val4) >> i10) | ((((sqIntptr_t)((usqInt)(val4) << (32 - i10)))) & 0xFFFFFFFFU); + immediate17 = (((usqInt) val4) >> i10) | ((((sqInt)((usqInt)(val4) << (32 - i10)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord67 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn22 << 16) | (rd21 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot10) >> 1)) << 8))) | immediate17) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord67; @@ -4947,7 +4675,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1112 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn110 << 16) | (rd110 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset28 / 4] = aWord1112; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset28 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset28 + 4; goto l349; l347: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -5026,7 +4754,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord113 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(SubOpcode) << 21))) | (1U << 20)))) | ((rn3 << 16) | (rd3 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset4 / 4] = aWord113; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset4 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset4 + 4; goto l159; l366: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -5078,7 +4806,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord15 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(TstOpcode) << 21))) | (1U << 20)))) | ((rn4 << 16) | (rd4 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset5 / 4] = aWord15; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset5 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset5 + 4; goto l165; l160: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -5166,7 +4894,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i14 = 2; i14 <= 30; i14 += 2) { if ((val12 & (((0xFFU << i14) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i14)))) == val12) { rot13 = 32 - i14; - immediate18 = (((usqInt) val12) >> i14) | ((((sqIntptr_t)((usqInt)(val12) << (32 - i14)))) & 0xFFFFFFFFU); + immediate18 = (((usqInt) val12) >> i14) | ((((sqInt)((usqInt)(val12) << (32 - i14)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord411 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn24 << 16) | (rd22 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot13) >> 1)) << 8))) | immediate18) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord411; @@ -5209,7 +4937,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1113 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn111 << 16) | (rd111 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset29 / 4] = aWord1113; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset29 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset29 + 4; goto l363; l367: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -7068,16 +6796,16 @@ ldrrnrm(AbstractInstruction * self_in_ldrrnrm, sqInt destReg, sqInt baseReg, sqI the size of the instructions generated to do so. */ /* CogARMCompiler>>#loadCwInto: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) { sqInt aWord; sqInt aWord1; - usqIntptr_t distance; + sqInt distance; sqInt i; sqInt immediate; sqInt negate; - usqIntptr_t operand; + usqInt operand; sqInt rot; sqInt value; @@ -7134,7 +6862,7 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) ? 1 : 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))); + return ((self_in_loadCwInto->machineCodeSize) = 4); } @@ -9258,7 +8986,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -9316,7 +9044,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -9383,7 +9111,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -10816,7 +10544,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -10902,11 +10630,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { sqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -11104,7 +10832,7 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) /* Cogit>>#findMapLocationForMcpc:inMethod: */ static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -11653,7 +11381,7 @@ generateClosedPICPrototype(void) assert(usesOutOfLineLiteral(anInstruction1)); (anInstruction1->dependent = allocateLiteral(wordConstant1)); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -11671,7 +11399,7 @@ generateClosedPICPrototype(void) operandOne = 3133021973U + h; checkLiteralforInstruction(operandOne, genoperandoperand(opcode, operandOne, TempReg)); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -11718,7 +11446,7 @@ generateCogFullBlock(void) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -11767,7 +11495,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -11813,17 +11541,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; + usqInt location; sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -13066,7 +12794,7 @@ gMoveCwR(sqInt wordConstant, sqInt reg) /* 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; @@ -14979,7 +14707,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -15797,14 +15525,14 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; sqInt roundedBytes; roundedBytes = (numBytes + 7) & -8; - if ((mzFreeStart + roundedBytes) >= (limitAddress - (methodCount * BytesPerWord))) { + if ((mzFreeStart + roundedBytes) >= ((((limitAddress - (methodCount * BytesPerWord)) < allocationThreshold) ? (limitAddress - (methodCount * BytesPerWord)) : allocationThreshold))) { return 0; } allocation = mzFreeStart; @@ -15987,15 +15715,15 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; - zoneSize = limitAddress - baseAddress; - initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; + zoneSize = ((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - baseAddress; + initialFreeSpace = (((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - mzFreeStart) + methodBytesFreedSinceLastCompaction; freedSoFar = initialFreeSpace; /* 4 needs to be e.g. a start-up parameter */ @@ -16046,17 +15774,6 @@ kosherYoungReferrers(void) return 1; } - /* CogMethodZone>>#manageFrom:to: */ -static void NoDbgRegParms -manageFromto(sqInt theStartAddress, sqInt theLimitAddress) -{ - mzFreeStart = (baseAddress = theStartAddress); - youngReferrers = (limitAddress = theLimitAddress); - openPICList = null; - methodBytesFreedSinceLastCompaction = 0; - methodCount = 0; -} - /* CogMethodZone>>#methodFor: */ CogMethod * methodFor(void *address) @@ -19136,6 +18853,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *jumpImm; AbstractInstruction *jumpNotSet; @@ -19164,7 +18882,17 @@ genPrimitiveIdentityHash(void) /* begin Jump: */ genoperand(Jump, ((sqInt)ret)); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } @@ -20991,7 +20719,9 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ - ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(1, "newHashTrampoline", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 1); + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); + ceInlineNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceInlineNewHash", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { @@ -23468,7 +23198,7 @@ cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize) static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral) { - usqIntptr_t literal; + usqInt literal; AbstractInstruction * literalAsInstruction; literalAsInstruction = ((AbstractInstruction *) (((self_in_concretizeLiteral->operands))[0])); @@ -23715,7 +23445,7 @@ rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, s static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - usqIntptr_t alignment; + usqInt alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -24415,6 +24145,16 @@ nativeFloatRegisterMask(CogSimStackNativeEntry * self_in_nativeFloatRegisterMask : 0); } + /* CogSimStackNativeEntry>>#nativeFloatRegisterOrNone */ +static sqInt NoDbgRegParms +nativeFloatRegisterOrNone(CogSimStackNativeEntry * self_in_nativeFloatRegisterOrNone) +{ + return ((((self_in_nativeFloatRegisterOrNone->type)) == SSRegisterSingleFloat) + || (((self_in_nativeFloatRegisterOrNone->type)) == SSRegisterDoubleFloat) + ? (self_in_nativeFloatRegisterOrNone->registerr) + : NoReg); +} + /* CogSimStackNativeEntry>>#nativePopToReg: */ static CogSimStackNativeEntry * NoDbgRegParms nativePopToReg(CogSimStackNativeEntry * self_in_nativePopToReg, sqInt reg) @@ -24628,6 +24368,25 @@ nativeRegisterMask(CogSimStackNativeEntry * self_in_nativeRegisterMask) : 0)); } + /* CogSimStackNativeEntry>>#nativeRegisterOrNone */ +static sqInt NoDbgRegParms +nativeRegisterOrNone(CogSimStackNativeEntry * self_in_nativeRegisterOrNone) +{ + return ((((self_in_nativeRegisterOrNone->type)) == SSRegister) + || (((self_in_nativeRegisterOrNone->type)) == SSRegisterPair) + ? (self_in_nativeRegisterOrNone->registerr) + : NoReg); +} + + /* CogSimStackNativeEntry>>#nativeRegisterSecondOrNone */ +static sqInt NoDbgRegParms +nativeRegisterSecondOrNone(CogSimStackNativeEntry * self_in_nativeRegisterSecondOrNone) +{ + return (((self_in_nativeRegisterSecondOrNone->type)) == SSRegisterPair + ? (self_in_nativeRegisterSecondOrNone->registerSecond) + : NoReg); +} + /* CogSimStackNativeEntry>>#nativeStackPopToReg: */ static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToReg(CogSimStackNativeEntry * self_in_nativeStackPopToReg, sqInt reg) @@ -25000,26 +24759,6 @@ mustDumpLiterals(sqInt currentOpcodeIndex) && ((currentOpcodeIndex - firstOpcodeIndex) >= (outOfLineLiteralOpcodeLimit(backEnd()))); } - /* OutOfLineLiteralsManager>>#resetForBlockCompile */ -static sqInt -resetForBlockCompile(void) -{ - firstOpcodeIndex = savedFirstOpcodeIndex; - nextLiteralIndex = savedNextLiteralIndex; - lastDumpedLiteralIndex = savedLastDumpedLiteralIndex; - return 0; -} - - /* OutOfLineLiteralsManager>>#saveForBlockCompile */ -static sqInt -saveForBlockCompile(void) -{ - savedFirstOpcodeIndex = firstOpcodeIndex; - savedNextLiteralIndex = nextLiteralIndex; - savedLastDumpedLiteralIndex = lastDumpedLiteralIndex; - return 0; -} - /* Compile the jump instruction(s) at the end of the method that dispatch to each block body. @@ -27252,7 +26991,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -27281,7 +27020,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1)); introspectionDataIndex += 2; } return 0; @@ -27539,7 +27278,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -27840,6 +27579,41 @@ voidCogCompiledCode(void) } } + /* SistaMethodZone>>#getCogCodeZoneThreshold */ +double +getCogCodeZoneThreshold(void) +{ + return thresholdRatio; +} + + /* SistaMethodZone>>#manageFrom:to: */ +static void NoDbgRegParms +manageFromto(sqInt theStartAddress, sqInt theLimitAddress) +{ + mzFreeStart = (baseAddress = theStartAddress); + youngReferrers = (limitAddress = theLimitAddress); + openPICList = null; + methodBytesFreedSinceLastCompaction = 0; + methodCount = 0; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; +} + + /* SistaMethodZone>>#setCogCodeZoneThreshold: */ +sqInt +setCogCodeZoneThreshold(double ratio) +{ + /* send of break elided */; + if (!((ratio >= 0.1) + && (ratio <= 1.0))) { + return PrimErrBadArgument; + } + thresholdRatio = ratio; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; + return 0; +} + /* Add a blockStart for an embedded block. For a binary tree walk block dispatch blocks must be compiled in pc/depth-first order but are scanned @@ -27962,6 +27736,24 @@ adjustArgumentsForPerform(sqInt numArgs) } +/* if there's a free register, use it */ + + /* StackToRegisterMappingCogit>>#allocateFloatRegNotConflictingWith: */ +static sqInt NoDbgRegParms +allocateFloatRegNotConflictingWith(sqInt regMask) +{ + sqInt reg; + + reg = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | regMask); + if (reg == NoReg) { + + /* No free register, choose one that does not conflict with regMask */ + reg = freeAnyFloatRegNotConflictingWith(regMask); + } + return reg; +} + + /* If the stack entry is already in a register not conflicting with regMask, answers it, else allocate a new register not conflicting with reg mask @@ -28041,7 +27833,8 @@ beginHighLevelCall(sqInt alignment) sqInt mask; sqInt offset; - ssFlushAll(); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin MoveR:Aw: */ address1 = stackPointerAddress(); /* begin gen:operand:literal: */ @@ -28232,7 +28025,10 @@ compileBlockBodies(void) sqInt initialOpcodeIndex; sqInt initialStackPtr; sqInt result; + sqInt savedFirstOpcodeIndex; + sqInt savedLastDumpedLiteralIndex; sqInt savedNeedsFrame; + sqInt savedNextLiteralIndex; sqInt savedNumArgs; sqInt savedNumTemps; @@ -28243,7 +28039,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -28252,7 +28048,10 @@ compileBlockBodies(void) /* for SistaCogit */ initialCounterIndex = 0; - saveForBlockCompile(); + /* begin saveForRecompile */ + savedFirstOpcodeIndex = firstOpcodeIndex; + savedNextLiteralIndex = nextLiteralIndex; + savedLastDumpedLiteralIndex = lastDumpedLiteralIndex; while (1) { compileBlockEntry(blockStart); initialStackPtr = simStackPtr; @@ -28263,15 +28062,18 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); bzero(abstractOpcodes + initialOpcodeIndex, (opcodeIndex - initialOpcodeIndex) * sizeof(AbstractInstruction)); opcodeIndex = initialOpcodeIndex; - resetForBlockCompile(); + /* begin resetForRecompile */ + firstOpcodeIndex = savedFirstOpcodeIndex; + nextLiteralIndex = savedNextLiteralIndex; + lastDumpedLiteralIndex = savedLastDumpedLiteralIndex; } compiledBlocksCount += 1; } @@ -28473,7 +28275,11 @@ compileCogFullBlockMethod(sqInt numCopied) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -28547,7 +28353,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -29370,6 +29180,39 @@ eventualTargetOf(sqInt targetBytecodePC) } +/* Spill the closest register on stack not conflicting with regMask. + Assertion Failure if regMask has already all the registers */ + + /* StackToRegisterMappingCogit>>#freeAnyFloatRegNotConflictingWith: */ +static sqInt NoDbgRegParms +freeAnyFloatRegNotConflictingWith(sqInt regMask) +{ + CogSimStackEntry *desc; + sqInt index; + sqInt reg; + + assert(needsFrame); + reg = NoReg; + index = ((simSpillBase < 0) ? 0 : simSpillBase); + index = ((simNativeSpillBase < 0) ? 0 : simNativeSpillBase); + while ((reg == NoReg) + && (index < simNativeStackPtr)) { + desc = simNativeStackAt(index); + if ((((desc->type)) == SSRegisterSingleFloat) + || (((desc->type)) == SSRegisterDoubleFloat)) { + if (!(regMask & (registerMaskFor((desc->registerr))))) { + reg = (desc->registerr); + } + } + index += 1; + } + + assert(!((reg == NoReg))); + ssAllocateRequiredFloatReg(reg); + return reg; +} + + /* Spill the closest register on stack not conflicting with regMask. Assertion Failure if regMask has already all the registers */ @@ -30034,7 +29877,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -30291,7 +30135,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -30332,7 +30177,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc = ssTop(); ssPop(1); if ((((desc->type)) == SSConstant) @@ -30409,7 +30255,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -30440,397 +30287,664 @@ genLoadTempin(sqInt objectIndex, sqInt destReg) } -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAdd32 */ -static sqInt -genLowcodeAdd32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAdd64 */ -static sqInt -genLowcodeAdd64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, secondLow, firstLow); - /* begin AddcR:R: */ - genoperandoperand(AddcRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAlloca32 */ -static sqInt -genLowcodeAlloca32(void) -{ - sqInt address; - sqInt address1; - AbstractInstruction *anInstruction; - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (size == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - /* begin MoveAw:R: */ - address = nativeStackPointerAddress(); - /* begin gen:literal:operand: */ - checkLiteralforInstruction(address, genoperandoperand(MoveAwR, address, TempReg)); - /* begin SubR:R: */ - genoperandoperand(SubRR, size, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, -16, TempReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(-16)); - } - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, size); - /* begin MoveR:Aw: */ - address1 = nativeStackPointerAddress(); - /* begin gen:operand:literal: */ - checkLiteralforInstruction(address1, genoperandoperand(MoveRAw, size, address1)); - ssPushNativeRegister(size); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAlloca64 */ -static sqInt -genLowcodeAlloca64(void) -{ - sqInt sizeHigh; - sqInt sizeLow; - - if (((sizeLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((sizeLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((sizeHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << sizeLow)))) == NoReg) { - ssAllocateRequiredReg((sizeHigh = Arg1Reg)); - } - if ((sizeLow == ReceiverResultReg) - || (sizeHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, sizeLow, SPReg); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, SPReg, sizeLow); - ssPushNativeRegister(sizeLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAnd32 */ -static sqInt -genLowcodeAnd32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AndR:R: */ - genoperandoperand(AndRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAnd64 */ -static sqInt -genLowcodeAnd64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin AndR:R: */ - genoperandoperand(AndRR, secondLow, firstLow); - /* begin AndR:R: */ - genoperandoperand(AndRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeArithmeticRightShift32 */ -static sqInt -genLowcodeArithmeticRightShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ArithmeticShiftRightR:R: */ - genoperandoperand(ArithmeticShiftRightRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeArithmeticRightShift64 */ -static sqInt -genLowcodeArithmeticRightShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << shiftAmount)) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeBeginCall */ -static sqInt -genLowcodeBeginCall(void) -{ - sqInt alignment; - - alignment = extA; - beginHighLevelCall(alignment); - extA = 0; - return 0; -} - - /* Lowcode instruction generator dispatch */ /* StackToRegisterMappingCogit>>#genLowcodeBinaryInlinePrimitive: */ static sqInt NoDbgRegParms genLowcodeBinaryInlinePrimitive(sqInt prim) { + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + sqInt frResult; + sqInt frResult1; + sqInt object; + sqInt object1; + sqInt object10; + sqInt object11; + sqInt object12; + sqInt object13; + sqInt object14; + sqInt object15; + sqInt object16; + sqInt object17; + sqInt object18; + sqInt object19; + sqInt object2; + sqInt object20; + sqInt object21; + sqInt object22; + sqInt object23; + sqInt object3; + sqInt object4; + sqInt object5; + sqInt object6; + sqInt object7; + sqInt object8; + sqInt object9; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue10; + sqInt objectValue11; + sqInt objectValue12; + sqInt objectValue13; + sqInt objectValue14; + sqInt objectValue15; + sqInt objectValue16; + sqInt objectValue17; + sqInt objectValue18; + sqInt objectValue19; + sqInt objectValue2; + sqInt objectValue20; + sqInt objectValue21; + sqInt objectValue22; + sqInt objectValue23; + sqInt objectValue3; + sqInt objectValue4; + sqInt objectValue5; + sqInt objectValue6; + sqInt objectValue7; + sqInt objectValue8; + sqInt objectValue9; + sqInt pointer; + sqInt pointerValue; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop10; + sqInt rOopTop12; + sqInt rOopTop13; + sqInt rOopTop15; + sqInt rOopTop16; + sqInt rOopTop17; + sqInt rOopTop18; + sqInt rOopTop19; + sqInt rOopTop2; + sqInt rOopTop20; + sqInt rOopTop21; + sqInt rOopTop22; + sqInt rOopTop23; + sqInt rOopTop24; + sqInt rOopTop25; + sqInt rOopTop3; + sqInt rOopTop4; + sqInt rOopTop5; + sqInt rOopTop6; + sqInt rOopTop7; + sqInt rOopTop8; + sqInt rOopTop9; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult14; + sqInt rResult15; + sqInt rResult17; + sqInt rResult2; + sqInt rResult21; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value13; + sqInt value2; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value9; + sqInt valueHigh; + sqInt valueHigh1; + sqInt valueHigh2; + sqInt valueHigh3; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueHighValue3; + sqInt valueLow; + sqInt valueLow1; + sqInt valueLow2; + sqInt valueLow3; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueLowValue3; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue13; + sqInt valueValue2; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue9; + switch (prim) { case 0: - return genLowcodeByteSizeOf(); + /* begin genLowcodeByteSizeOf */ + rOopTop19 = NoReg; + rResult10 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop19 = registerOrNone(ssTop()); + } + if (rOopTop19 == NoReg) { + rOopTop19 = allocateRegNotConflictingWith(0); + } + rResult10 = allocateRegNotConflictingWith(1U << rOopTop19); + assert(!(((rOopTop19 == NoReg) + || (rResult10 == NoReg)))); + object17 = rOopTop19; + value9 = rResult10; + + popToReg(ssTop(), object17); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcByteSizeOfto(object17, value9); + return 0; case 1: - return genLowcodeFirstFieldPointer(); + /* begin genLowcodeFirstFieldPointer */ + rOopTop = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop == NoReg))); + object = rOopTop; + + popToReg(ssTop(), object); + ssPop(1); + genLcFirstFieldPointer(object); + return 0; case 2: - return genLowcodeFirstIndexableFieldPointer(); + /* begin genLowcodeFirstIndexableFieldPointer */ + rOopTop1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop1 == NoReg))); + object1 = rOopTop1; + + popToReg(ssTop(), object1); + ssPop(1); + genLcFirstIndexableFieldPointer(object1); + return 0; case 3: - return genLowcodeIsBytes(); + /* begin genLowcodeIsBytes */ + rOopTop2 = NoReg; + rResult = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rOopTop2); + assert(!(((rOopTop2 == NoReg) + || (rResult == NoReg)))); + object2 = rOopTop2; + value = rResult; + + popToReg(ssTop(), object2); + ssPop(1); + genLcIsBytesto(object2, value); + return 0; case 4: - return genLowcodeIsFloatObject(); + /* begin genLowcodeIsFloatObject */ + rOopTop3 = NoReg; + rResult1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1U << rOopTop3); + assert(!(((rOopTop3 == NoReg) + || (rResult1 == NoReg)))); + object3 = rOopTop3; + value1 = rResult1; + + popToReg(ssTop(), object3); + ssPop(1); + genLcIsFloatObjectto(object3, value1); + return 0; case 5: - return genLowcodeIsIndexable(); + /* begin genLowcodeIsIndexable */ + rOopTop4 = NoReg; + rResult2 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop4 = registerOrNone(ssTop()); + } + if (rOopTop4 == NoReg) { + rOopTop4 = allocateRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(1U << rOopTop4); + assert(!(((rOopTop4 == NoReg) + || (rResult2 == NoReg)))); + object4 = rOopTop4; + value2 = rResult2; + + popToReg(ssTop(), object4); + ssPop(1); + genLcIsIndexableto(object4, value2); + return 0; case 6: - return genLowcodeIsIntegerObject(); + /* begin genLowcodeIsIntegerObject */ + rOopTop5 = NoReg; + rResult3 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop5 = registerOrNone(ssTop()); + } + if (rOopTop5 == NoReg) { + rOopTop5 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rOopTop5); + assert(!(((rOopTop5 == NoReg) + || (rResult3 == NoReg)))); + object5 = rOopTop5; + value3 = rResult3; + + popToReg(ssTop(), object5); + ssPop(1); + genLcIsIntegerObjectto(object5, value3); + return 0; case 7: - return genLowcodeIsPointers(); + /* begin genLowcodeIsPointers */ + rOopTop6 = NoReg; + rResult4 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop6 = registerOrNone(ssTop()); + } + if (rOopTop6 == NoReg) { + rOopTop6 = allocateRegNotConflictingWith(0); + } + rResult4 = allocateRegNotConflictingWith(1U << rOopTop6); + assert(!(((rOopTop6 == NoReg) + || (rResult4 == NoReg)))); + object6 = rOopTop6; + value4 = rResult4; + + popToReg(ssTop(), object6); + ssPop(1); + genLcIsPointersto(object6, value4); + return 0; case 8: - return genLowcodeIsWords(); + /* begin genLowcodeIsWords */ + rOopTop7 = NoReg; + rResult5 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop7 = registerOrNone(ssTop()); + } + if (rOopTop7 == NoReg) { + rOopTop7 = allocateRegNotConflictingWith(0); + } + rResult5 = allocateRegNotConflictingWith(1U << rOopTop7); + assert(!(((rOopTop7 == NoReg) + || (rResult5 == NoReg)))); + object7 = rOopTop7; + value5 = rResult5; + + popToReg(ssTop(), object7); + ssPop(1); + genLcIsWordsto(object7, value5); + return 0; case 9: - return genLowcodeIsWordsOrBytes(); + /* begin genLowcodeIsWordsOrBytes */ + rOopTop8 = NoReg; + rResult6 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop8 = registerOrNone(ssTop()); + } + if (rOopTop8 == NoReg) { + rOopTop8 = allocateRegNotConflictingWith(0); + } + rResult6 = allocateRegNotConflictingWith(1U << rOopTop8); + assert(!(((rOopTop8 == NoReg) + || (rResult6 == NoReg)))); + object8 = rOopTop8; + value6 = rResult6; + + popToReg(ssTop(), object8); + ssPop(1); + genLcIsWordsOrBytesto(object8, value6); + return 0; case 10: - return genLowcodeOopSmallIntegerToInt32(); + /* begin genLowcodeOopSmallIntegerToInt32 */ + rOopTop9 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop9 = registerOrNone(ssTop()); + } + if (rOopTop9 == NoReg) { + rOopTop9 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop9 == NoReg))); + object9 = rOopTop9; + + popToReg(ssTop(), object9); + ssPop(1); + genConvertSmallIntegerToIntegerInReg(object9); + ssPushNativeRegister(object9); + return 0; case 11: - return genLowcodeOopSmallIntegerToInt64(); + /* begin genLowcodeOopSmallIntegerToInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop10 = NoReg; + rResult7 = (rResult21 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop10 = registerOrNone(ssTop()); + } + if (rOopTop10 == NoReg) { + rOopTop10 = allocateRegNotConflictingWith(0); + } + rResult7 = allocateRegNotConflictingWith(1U << rOopTop10); + rResult21 = allocateRegNotConflictingWith((1U << rOopTop10) | (1U << rResult7)); + assert(!(((rOopTop10 == NoReg) + || (rResult7 == NoReg)))); + object10 = rOopTop10; + valueLow = rResult7; + valueHigh = rResult21; + + popToReg(ssTop(), object10); + ssPop(1); + genConvertSmallIntegerToIntegerInReg(object10); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); + if (usesOutOfLineLiteral(anInstruction)) { + (anInstruction->dependent = locateLiteral(0)); + } + ssPushNativeRegistersecondRegister(object10, valueHigh); + + return 0; case 12: - return genLowcodeOopToBoolean32(); + /* begin genLowcodeOopToBoolean32 */ + rOopTop12 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop12 = registerOrNone(ssTop()); + } + if (rOopTop12 == NoReg) { + rOopTop12 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop12 == NoReg))); + object11 = rOopTop12; + + popToReg(ssTop(), object11); + ssPop(1); + annotateobjRef(gSubCwR(falseObject(), object11), falseObject()); + ssPushNativeRegister(object11); + return 0; case 13: - return genLowcodeOopToBoolean64(); + /* begin genLowcodeOopToBoolean64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop13 = NoReg; + rResult8 = (rResult22 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop13 = registerOrNone(ssTop()); + } + if (rOopTop13 == NoReg) { + rOopTop13 = allocateRegNotConflictingWith(0); + } + rResult8 = allocateRegNotConflictingWith(1U << rOopTop13); + rResult22 = allocateRegNotConflictingWith((1U << rOopTop13) | (1U << rResult8)); + assert(!(((rOopTop13 == NoReg) + || (rResult8 == NoReg)))); + object12 = rOopTop13; + valueLow1 = rResult8; + valueHigh1 = rResult22; + + popToReg(ssTop(), object12); + ssPop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh1); + if (usesOutOfLineLiteral(anInstruction1)) { + (anInstruction1->dependent = locateLiteral(0)); + } + annotateobjRef(gSubCwR(falseObject(), object12), falseObject()); + ssPushNativeRegistersecondRegister(object12, valueHigh1); + + return 0; case 14: - return genLowcodeOopToFloat32(); + /* begin genLowcodeOopToFloat32 */ + rOopTop20 = NoReg; + frResult = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop20 = registerOrNone(ssTop()); + } + if (rOopTop20 == NoReg) { + rOopTop20 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rOopTop20 == NoReg) + || (frResult == NoReg)))); + object18 = rOopTop20; + value10 = frResult; + + popToReg(ssTop(), object18); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoFloat32(object18, value10); + return 0; case 15: - return genLowcodeOopToFloat64(); + /* begin genLowcodeOopToFloat64 */ + rOopTop21 = NoReg; + frResult1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop21 = registerOrNone(ssTop()); + } + if (rOopTop21 == NoReg) { + rOopTop21 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rOopTop21 == NoReg) + || (frResult1 == NoReg)))); + object19 = rOopTop21; + value11 = frResult1; + + popToReg(ssTop(), object19); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoFloat64(object19, value11); + return 0; case 16: - return genLowcodeOopToInt32(); + /* begin genLowcodeOopToInt32 */ + rOopTop22 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop22 = registerOrNone(ssTop()); + } + if (rOopTop22 == NoReg) { + rOopTop22 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop22 == NoReg))); + object20 = rOopTop22; + + popToReg(ssTop(), object20); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToInt32(object20); + return 0; case 17: - return genLowcodeOopToInt64(); + /* begin genLowcodeOopToInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop23 = NoReg; + rResult14 = (rResult23 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop23 = registerOrNone(ssTop()); + } + if (rOopTop23 == NoReg) { + rOopTop23 = allocateRegNotConflictingWith(0); + } + rResult14 = allocateRegNotConflictingWith(1U << rOopTop23); + rResult23 = allocateRegNotConflictingWith((1U << rOopTop23) | (1U << rResult14)); + assert(!(((rOopTop23 == NoReg) + || (rResult14 == NoReg)))); + object21 = rOopTop23; + valueLow2 = rResult14; + valueHigh2 = rResult23; + + popToReg(ssTop(), object21); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoInt64highPart(object21, valueLow2, valueHigh2); + + return 0; case 18: - return genLowcodeOopToPointer(); + /* begin genLowcodeOopToPointer */ + rOopTop15 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop15 = registerOrNone(ssTop()); + } + if (rOopTop15 == NoReg) { + rOopTop15 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop15 == NoReg))); + object13 = rOopTop15; + + popToReg(ssTop(), object13); + ssPop(1); + genLcOopToPointer(object13); + return 0; case 19: - return genLowcodeOopToPointerReinterpret(); + /* begin genLowcodeOopToPointerReinterpret */ + rOopTop16 = NoReg; + rResult9 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop16 = registerOrNone(ssTop()); + } + if (rOopTop16 == NoReg) { + rOopTop16 = allocateRegNotConflictingWith(0); + } + rResult9 = allocateRegNotConflictingWith(1U << rOopTop16); + assert(!(((rOopTop16 == NoReg) + || (rResult9 == NoReg)))); + object14 = rOopTop16; + pointer = rResult9; + + popToReg(ssTop(), object14); + ssPop(1); + ssPushNativeRegister(object14); + return 0; case 20: - return genLowcodeOopToUInt32(); + /* begin genLowcodeOopToUInt32 */ + rOopTop24 = NoReg; + rResult15 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop24 = registerOrNone(ssTop()); + } + if (rOopTop24 == NoReg) { + rOopTop24 = allocateRegNotConflictingWith(0); + } + rResult15 = allocateRegNotConflictingWith(1U << rOopTop24); + assert(!(((rOopTop24 == NoReg) + || (rResult15 == NoReg)))); + object22 = rOopTop24; + value13 = rResult15; + + popToReg(ssTop(), object22); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToUInt32(object22); + return 0; case 21: - return genLowcodeOopToUInt64(); + /* begin genLowcodeOopToUInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop25 = NoReg; + rResult17 = (rResult24 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop25 = registerOrNone(ssTop()); + } + if (rOopTop25 == NoReg) { + rOopTop25 = allocateRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(1U << rOopTop25); + rResult24 = allocateRegNotConflictingWith((1U << rOopTop25) | (1U << rResult17)); + assert(!(((rOopTop25 == NoReg) + || (rResult17 == NoReg)))); + object23 = rOopTop25; + valueLow3 = rResult17; + valueHigh3 = rResult24; + + popToReg(ssTop(), object23); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoUInt64highPart(object23, valueLow3, valueHigh3); + + return 0; case 22: - return genLowcodePin(); + /* begin genLowcodePin */ + rOopTop17 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop17 = registerOrNone(ssTop()); + } + if (rOopTop17 == NoReg) { + rOopTop17 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop17 == NoReg))); + object15 = rOopTop17; + + popToReg(ssTop(), object15); + ssPop(1); + abort(); + return 0; case 23: - return genLowcodeUnpin(); + /* begin genLowcodeUnpin */ + rOopTop18 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop18 = registerOrNone(ssTop()); + } + if (rOopTop18 == NoReg) { + rOopTop18 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop18 == NoReg))); + object16 = rOopTop18; + + popToReg(ssTop(), object16); + ssPop(1); + abort(); + return 0; default: return EncounteredUnknownBytecode; @@ -30840,7479 +30954,403 @@ genLowcodeBinaryInlinePrimitive(sqInt prim) } -/* Lowcode instruction generator */ +/* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeBoolean32ToOop */ -static sqInt -genLowcodeBoolean32ToOop(void) + /* StackToRegisterMappingCogit>>#genLowcodeNullaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeNullaryInlinePrimitive(sqInt prim) { AbstractInstruction *anInstruction; AbstractInstruction * cont; + AbstractInstruction * cont1; + sqInt floatValue; + sqInt floatValueValue; + sqInt frTop; + sqInt frTop1; AbstractInstruction * inst; + AbstractInstruction * inst1; sqInt object; + sqInt object1; + sqInt object2; + sqInt object3; + sqInt object4; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue2; + sqInt objectValue3; + sqInt objectValue4; + sqInt pointer; + sqInt pointer1; + sqInt pointerClassLiteral; + sqInt pointerValue; + sqInt pointerValue1; + sqInt reg; + sqInt reg1; + sqInt reg2; + sqInt rNext; + sqInt rNext1; + sqInt rNext2; + sqInt rResult; + sqInt rResult2; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rTop; + sqInt rTop2; + sqInt rTop3; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt singleFloatValue; + sqInt singleFloatValueValue; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask2; AbstractInstruction * trueJump; + AbstractInstruction * trueJump1; sqInt value; + sqInt value2; + sqInt value4; + sqInt value5; + sqInt valueHigh; + sqInt valueHigh1; + sqInt valueHigh2; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueLow; + sqInt valueLow1; + sqInt valueLow2; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueValue; + sqInt valueValue2; + sqInt valueValue4; + sqInt valueValue5; sqInt wordConstant; + sqInt wordConstant2; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin JumpNonZero: */ - trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - annotateobjRef(gMoveCwR(falseObject(), value), falseObject()); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - /* begin MoveCw:R: */ - wordConstant = trueObject(); - /* begin gen:literal:operand: */ - inst = checkLiteralforInstruction(wordConstant, genoperandoperand(MoveCwR, wordConstant, value)); - jmpTarget(trueJump, inst); - annotateobjRef(inst, trueObject()); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushRegister(value); - return 0; -} + + switch (prim) { + case 0: + /* begin genLowcodeBoolean32ToOop */ + rTop = NoReg; + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rTop); + assert(!(((rTop == NoReg) + || (rResult == NoReg)))); + value = rTop; + object = rResult; + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(CmpCqR, 0, value); + if (usesOutOfLineLiteral(anInstruction)) { + (anInstruction->dependent = locateLiteral(0)); + } + /* begin JumpNonZero: */ + trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + annotateobjRef(gMoveCwR(falseObject(), value), falseObject()); + /* begin Jump: */ + cont = genoperand(Jump, ((sqInt)0)); + /* begin MoveCw:R: */ + wordConstant = trueObject(); + /* begin gen:literal:operand: */ + inst = checkLiteralforInstruction(wordConstant, genoperandoperand(MoveCwR, wordConstant, value)); + jmpTarget(trueJump, inst); + annotateobjRef(inst, trueObject()); + jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushRegister(value); + return 0; -/* Lowcode instruction generator */ + case 1: + /* begin genLowcodeBoolean64ToOop */ + /* begin allocateRegistersForLowcodeInteger2ResultOop: */ + topRegistersMask = 0; + rTop2 = (rNext = NoReg); + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop2 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext == NoReg)))); + rResult2 = allocateFloatRegNotConflictingWith((1U << rTop2) | (1U << rNext)); + assert(!((rResult2 == NoReg))); + valueLow = rTop2; + valueHigh = rNext; + object1 = rResult2; - /* StackToRegisterMappingCogit>>#genLowcodeBoolean64ToOop */ -static sqInt -genLowcodeBoolean64ToOop(void) -{ - AbstractInstruction * cont; - AbstractInstruction * inst; - sqInt object; - AbstractInstruction * trueJump; - sqInt valueHigh; - sqInt valueLow; - sqInt wordConstant; + nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, valueLow, valueHigh); + /* begin JumpNonZero: */ + trueJump1 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + annotateobjRef(gMoveCwR(falseObject(), valueLow), falseObject()); + /* begin Jump: */ + cont1 = genoperand(Jump, ((sqInt)0)); + /* begin MoveCw:R: */ + wordConstant2 = trueObject(); + /* begin gen:literal:operand: */ + inst1 = checkLiteralforInstruction(wordConstant2, genoperandoperand(MoveCwR, wordConstant2, valueLow)); + jmpTarget(trueJump1, inst1); + annotateobjRef(inst1, trueObject()); + jmpTarget(cont1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushRegister(valueLow); - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, valueLow, valueHigh); - /* begin JumpNonZero: */ - trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - annotateobjRef(gMoveCwR(falseObject(), valueLow), falseObject()); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - /* begin MoveCw:R: */ - wordConstant = trueObject(); - /* begin gen:literal:operand: */ - inst = checkLiteralforInstruction(wordConstant, genoperandoperand(MoveCwR, wordConstant, valueLow)); - jmpTarget(trueJump, inst); - annotateobjRef(inst, trueObject()); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushRegister(valueLow); + return 0; - return 0; -} + case 2: + /* begin genLowcodeFloat32ToOop */ + frTop = NoReg; + + /* Float argument */ + rResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(0); + assert(!(((frTop == NoReg) + || (rResult3 == NoReg)))); + singleFloatValue = frTop; + object2 = rResult3; + + nativePopToReg(ssNativeTop(), singleFloatValue); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcFloat32toOop(singleFloatValue, object2); + return 0; + case 3: + /* begin genLowcodeFloat64ToOop */ + frTop1 = NoReg; + + /* Float argument */ + rResult4 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + rResult4 = allocateRegNotConflictingWith(0); + assert(!(((frTop1 == NoReg) + || (rResult4 == NoReg)))); + floatValue = frTop1; + object3 = rResult4; + + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcFloat64toOop(floatValue, object3); + return 0; -/* Lowcode instruction generator */ + case 4: + /* begin genLowcodeInt32ToOop */ + rTop3 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(0); + } + assert(!((rTop3 == NoReg))); + value2 = rTop3; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInt32ToOop(value2); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeByteSizeOf */ -static sqInt -genLowcodeByteSizeOf(void) -{ - sqInt object; - sqInt value; + case 5: + /* begin genLowcodeInt64ToOop */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask1 = 0; + rTop4 = (rNext1 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext1 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg1; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext1 == NoReg)))); + valueLow1 = rTop4; + valueHigh1 = rNext1; - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcByteSizeOfto(object, value); - return 0; -} + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInt64ToOophighPart(valueLow1, valueHigh1); + return 0; -/* Lowcode instruction generator */ + case 6: + /* begin genLowcodePointerToOop */ + pointerClassLiteral = getLiteral(extA); + /* begin allocateRegistersForLowcodeInteger: */ + rTop7 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop7 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + assert(!((rTop7 == NoReg))); + pointer1 = rTop7; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcPointerToOopclass(pointer1, pointerClassLiteral); + extA = 0; + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentFloat32 */ -static sqInt -genLowcodeCallArgumentFloat32(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; + case 7: + /* begin genLowcodePointerToOopReinterprer */ + rTop5 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(0); + } + assert(!((rTop5 == NoReg))); + pointer = rTop5; - nativeStackPopToReg(ssNativeTop(), DPFPReg0); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRsM32r, DPFPReg0, -BytesPerWord, SPReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(-BytesPerWord)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(SubCqR, BytesPerWord, SPReg); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(BytesPerWord)); - } - currentCallCleanUpSize += BytesPerWord; - return 0; -} + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + ssPushRegister(pointer); + return 0; + case 8: + /* begin genLowcodeSmallInt32ToOop */ + rTop6 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + assert(!((rTop6 == NoReg))); + value4 = rTop6; -/* Lowcode instruction generator */ + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + genConvertIntegerToSmallIntegerInReg(value4); + ssPushRegister(value4); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentFloat64 */ -static sqInt -genLowcodeCallArgumentFloat64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - - nativeStackPopToReg(ssNativeTop(), DPFPReg0); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, DPFPReg0, -8, SPReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(-8)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(SubCqR, 8, SPReg); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(8)); - } - currentCallCleanUpSize += 8; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentInt32 */ -static sqInt -genLowcodeCallArgumentInt32(void) -{ - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentInt64 */ -static sqInt -genLowcodeCallArgumentInt64(void) -{ - nativeStackPopToRegsecondReg(ssNativeTop(), TempReg, ReceiverResultReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - /* begin PushR: */ - genoperand(PushR, ReceiverResultReg); - currentCallCleanUpSize += 8; - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentPointer */ -static sqInt -genLowcodeCallArgumentPointer(void) -{ - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} - - -/* Lowcode instruction generator */ -/* Allocate space */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentSpace */ -static sqInt -genLowcodeCallArgumentSpace(void) -{ - AbstractInstruction *anInstruction; - - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(SubCqR, extA, SPReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(extA)); - } - currentCallCleanUpSize += extA; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ -/* Fetch the pointer */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentStructure */ -static sqInt -genLowcodeCallArgumentStructure(void) -{ - AbstractInstruction *anInstruction; - - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(SubCqR, extA, SPReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(extA)); - } - - /* Copy the structure */ - currentCallCleanUpSize += extA; - genMemCopytoconstantSize(backEnd, TempReg, SPReg, extA); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallInstruction */ -static sqInt -genLowcodeCallInstruction(void) -{ - AbstractInstruction *abstractInstruction; - sqInt function; - - function = extA; - /* begin CallRT: */ - abstractInstruction = genoperand(Call, function); - (abstractInstruction->annotation = IsRelativeCall); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallPhysical */ -static sqInt -genLowcodeCallPhysical(void) -{ - sqInt registerID; - - registerID = extA; - /* begin CallR: */ - genoperand(CallR, registerID); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCheckSessionIdentifier */ -static sqInt -genLowcodeCheckSessionIdentifier(void) -{ - sqInt expectedSession; - - expectedSession = extA; - ssPushNativeConstantInt32((expectedSession == (getThisSessionID()) - ? 1 - : 0)); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCompareAndSwap32 */ -static sqInt -genLowcodeCompareAndSwap32(void) -{ - sqInt check; - sqInt newValue; - sqInt oldValue; - sqInt value; - - if (((newValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((newValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((oldValue = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << newValue)))) == NoReg) { - ssAllocateRequiredReg((oldValue = Arg1Reg)); - } - if (((check = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << newValue)) | (1U << oldValue)))) == NoReg) { - ssAllocateRequiredReg((check = SendNumArgsReg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << newValue)) | (1U << oldValue)) | (1U << check)))) == NoReg) { - ssAllocateRequiredReg((value = ClassReg)); - } - if ((((newValue == ReceiverResultReg) - || (oldValue == ReceiverResultReg)) - || (check == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), newValue); - ssNativePop(1); - nativePopToReg(ssNativeTop(), oldValue); - ssNativePop(1); - nativePopToReg(ssNativeTop(), check); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDiv32 */ -static sqInt -genLowcodeDiv32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, first, second); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDiv64 */ -static sqInt -genLowcodeDiv64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateFloat32 */ -static sqInt -genLowcodeDuplicateFloat32(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((dup2 = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((dup2 = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveRs:Rs: */ - genoperandoperand(MoveRsRs, value, dup2); - ssPushNativeRegisterSingleFloat(value); - ssPushNativeRegisterSingleFloat(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateFloat64 */ -static sqInt -genLowcodeDuplicateFloat64(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((dup2 = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((dup2 = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveRd:Rd: */ - genoperandoperand(MoveRdRd, value, dup2); - ssPushNativeRegisterDoubleFloat(value); - ssPushNativeRegisterDoubleFloat(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateInt32 */ -static sqInt -genLowcodeDuplicateInt32(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dup2 = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((dup2 = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (dup2 == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, dup2); - ssPushNativeRegister(value); - ssPushNativeRegister(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateInt64 */ -static sqInt -genLowcodeDuplicateInt64(void) -{ - sqInt dup2High; - sqInt dup2Low; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((dup2Low = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((dup2Low = SendNumArgsReg)); - } - if (((dup2High = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)) | (1U << dup2Low)))) == NoReg) { - ssAllocateRequiredReg((dup2High = ClassReg)); - } - if ((((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (dup2Low == ReceiverResultReg)) - || (dup2High == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, valueLow, dup2Low); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, valueHigh, dup2High); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - ssPushNativeRegistersecondRegister(dup2Low, dup2High); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicatePointer */ -static sqInt -genLowcodeDuplicatePointer(void) -{ - sqInt dup2; - sqInt pointerValue; - - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dup2 = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointerValue)))) == NoReg) { - ssAllocateRequiredReg((dup2 = Arg1Reg)); - } - if ((pointerValue == ReceiverResultReg) - || (dup2 == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointerValue, dup2); - ssPushNativeRegister(pointerValue); - ssPushNativeRegister(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEffectiveAddress32 */ -static sqInt -genLowcodeEffectiveAddress32(void) -{ - sqInt base; - sqInt index; - sqInt offset; - sqInt scale; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((scale = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offset)))) == NoReg) { - ssAllocateRequiredReg((scale = Arg1Reg)); - } - if (((index = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << offset)) | (1U << scale)))) == NoReg) { - ssAllocateRequiredReg((index = SendNumArgsReg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << offset)) | (1U << scale)) | (1U << index)))) == NoReg) { - ssAllocateRequiredReg((base = ClassReg)); - } - if ((((offset == ReceiverResultReg) - || (scale == ReceiverResultReg)) - || (index == ReceiverResultReg)) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), scale); - ssNativePop(1); - nativePopToReg(ssNativeTop(), index); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, scale, index); - /* begin AddR:R: */ - genoperandoperand(AddRR, index, base); - /* begin AddR:R: */ - genoperandoperand(AddRR, offset, base); - ssPushNativeRegister(base); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEffectiveAddress64 */ -static sqInt -genLowcodeEffectiveAddress64(void) -{ - sqInt base; - sqInt index; - sqInt offset; - sqInt result; - sqInt scale; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((scale = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offset)))) == NoReg) { - ssAllocateRequiredReg((scale = Arg1Reg)); - } - if (((index = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << offset)) | (1U << scale)))) == NoReg) { - ssAllocateRequiredReg((index = SendNumArgsReg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << offset)) | (1U << scale)) | (1U << index)))) == NoReg) { - ssAllocateRequiredReg((base = ClassReg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((((liveRegisters()) | (1U << offset)) | (1U << scale)) | (1U << index)) | (1U << base)))) == NoReg) { - ssAllocateRequiredReg((result = ReceiverResultReg)); - } - if (((((offset == ReceiverResultReg) - || (scale == ReceiverResultReg)) - || (index == ReceiverResultReg)) - || (base == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), scale); - ssNativePop(1); - nativePopToReg(ssNativeTop(), index); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEndCall */ -static sqInt -genLowcodeEndCall(void) -{ - endHighLevelCallWithCleanup(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEndCallNoCleanup */ -static sqInt -genLowcodeEndCallNoCleanup(void) -{ - endHighLevelCallWithoutCleanup(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFirstFieldPointer */ -static sqInt -genLowcodeFirstFieldPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcFirstFieldPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFirstIndexableFieldPointer */ -static sqInt -genLowcodeFirstIndexableFieldPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcFirstIndexableFieldPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Add */ -static sqInt -genLowcodeFloat32Add(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddRs:Rs: */ - genoperandoperand(AddRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Div */ -static sqInt -genLowcodeFloat32Div(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin DivRs:Rs: */ - genoperandoperand(DivRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Equal */ -static sqInt -genLowcodeFloat32Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPNotEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Great */ -static sqInt -genLowcodeFloat32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPLessOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32GreatEqual */ -static sqInt -genLowcodeFloat32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPLess(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Less */ -static sqInt -genLowcodeFloat32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPGreaterOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32LessEqual */ -static sqInt -genLowcodeFloat32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPGreater(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Mul */ -static sqInt -genLowcodeFloat32Mul(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulRs:Rs: */ - genoperandoperand(MulRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Neg */ -static sqInt -genLowcodeFloat32Neg(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin XorRs:Rs: */ - genoperandoperand(XorRsRs, result, result); - /* begin SubRs:Rs: */ - genoperandoperand(SubRsRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32NotEqual */ -static sqInt -genLowcodeFloat32NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Sqrt */ -static sqInt -genLowcodeFloat32Sqrt(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SqrtRs: */ - genoperand(SqrtRs, value); - ssPushNativeRegisterSingleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Sub */ -static sqInt -genLowcodeFloat32Sub(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubRs:Rs: */ - genoperandoperand(SubRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToFloat64 */ -static sqInt -genLowcodeFloat32ToFloat64(void) -{ - sqInt singleFloatValue; - - if (((singleFloatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((singleFloatValue = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), singleFloatValue); - ssNativePop(1); - /* begin ConvertRs:Rd: */ - genoperandoperand(ConvertRsRd, singleFloatValue, singleFloatValue); - ssPushNativeRegisterDoubleFloat(singleFloatValue); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToInt32 */ -static sqInt -genLowcodeFloat32ToInt32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertRs:R: */ - genoperandoperand(ConvertRsR, value, result); - ssPushNativeRegister(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToInt64 */ -static sqInt -genLowcodeFloat32ToInt64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToOop */ -static sqInt -genLowcodeFloat32ToOop(void) -{ - sqInt object; - sqInt singleFloatValue; - - if (((singleFloatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((singleFloatValue = DPFPReg0)); - } - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), singleFloatValue); - ssNativePop(1); - ssFlushAll(); - genLcFloat32toOop(singleFloatValue, object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToUInt32 */ -static sqInt -genLowcodeFloat32ToUInt32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertRs:R: */ - genoperandoperand(ConvertRsR, value, result); - ssPushNativeRegister(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToUInt64 */ -static sqInt -genLowcodeFloat32ToUInt64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Add */ -static sqInt -genLowcodeFloat64Add(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddRd:Rd: */ - genoperandoperand(AddRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Div */ -static sqInt -genLowcodeFloat64Div(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin DivRd:Rd: */ - genoperandoperand(DivRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Equal */ -static sqInt -genLowcodeFloat64Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPNotEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Great */ -static sqInt -genLowcodeFloat64Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPLessOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64GreatEqual */ -static sqInt -genLowcodeFloat64GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPLess(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Less */ -static sqInt -genLowcodeFloat64Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPGreaterOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64LessEqual */ -static sqInt -genLowcodeFloat64LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPGreater(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Mul */ -static sqInt -genLowcodeFloat64Mul(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulRd:Rd: */ - genoperandoperand(MulRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Neg */ -static sqInt -genLowcodeFloat64Neg(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin XorRd:Rd: */ - genoperandoperand(XorRdRd, result, result); - /* begin SubRd:Rd: */ - genoperandoperand(SubRdRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64NotEqual */ -static sqInt -genLowcodeFloat64NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Sqrt */ -static sqInt -genLowcodeFloat64Sqrt(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SqrtRd: */ - genoperand(SqrtRd, value); - ssPushNativeRegisterDoubleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Sub */ -static sqInt -genLowcodeFloat64Sub(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubRd:Rd: */ - genoperandoperand(SubRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToFloat32 */ -static sqInt -genLowcodeFloat64ToFloat32(void) -{ - sqInt floatValue; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:Rs: */ - genoperandoperand(ConvertRdRs, floatValue, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToInt32 */ -static sqInt -genLowcodeFloat64ToInt32(void) -{ - sqInt floatValue; - sqInt int32Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int32Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int32Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int32Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:R: */ - genoperandoperand(ConvertRdR, floatValue, int32Result); - ssPushNativeRegister(int32Result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToInt64 */ -static sqInt -genLowcodeFloat64ToInt64(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToOop */ -static sqInt -genLowcodeFloat64ToOop(void) -{ - sqInt floatValue; - sqInt object; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - ssFlushAll(); - genLcFloat64toOop(floatValue, object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToUInt32 */ -static sqInt -genLowcodeFloat64ToUInt32(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:R: */ - genoperandoperand(ConvertRdR, floatValue, int64Result); - ssPushNativeRegister(int64Result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToUInt64 */ -static sqInt -genLowcodeFloat64ToUInt64(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFree */ -static sqInt -genLowcodeFree(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssFlushAll(); - if (pointer != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointer, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFreeTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateIndexable32Oop */ -static sqInt -genLowcodeInstantiateIndexable32Oop(void) -{ - sqInt classOop; - sqInt indexableSize; - sqInt object; - - if (((indexableSize = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((indexableSize = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((classOop = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << indexableSize)))) == NoReg) { - ssAllocateRequiredReg((classOop = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << indexableSize)) | (1U << classOop)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((indexableSize == ReceiverResultReg) - || (classOop == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), indexableSize); - ssNativePop(1); - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOopindexableSize(classOop, indexableSize); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateIndexableOop */ -static sqInt -genLowcodeInstantiateIndexableOop(void) -{ - sqInt classOop; - sqInt indexableSize; - sqInt object; - - indexableSize = extA; - if (((classOop = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((classOop = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << classOop)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((classOop == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOopconstantIndexableSize(classOop, indexableSize); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateOop */ -static sqInt -genLowcodeInstantiateOop(void) -{ - sqInt classOop; - - if (((classOop = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((classOop = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (classOop == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOop(classOop); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Equal */ -static sqInt -genLowcodeInt32Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Great */ -static sqInt -genLowcodeInt32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpLessOrEqual: */ - falseJump = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32GreatEqual */ -static sqInt -genLowcodeInt32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpLess: */ - falseJump = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Less */ -static sqInt -genLowcodeInt32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpGreaterOrEqual: */ - falseJump = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32LessEqual */ -static sqInt -genLowcodeInt32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpGreater: */ - falseJump = genConditionalBranchoperand(JumpGreater, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32NotEqual */ -static sqInt -genLowcodeInt32NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToFloat32 */ -static sqInt -genLowcodeInt32ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rs: */ - genoperandoperand(ConvertRRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToFloat64 */ -static sqInt -genLowcodeInt32ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rd: */ - genoperandoperand(ConvertRRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToOop */ -static sqInt -genLowcodeInt32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcInt32ToOop(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToPointer */ -static sqInt -genLowcodeInt32ToPointer(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Equal */ -static sqInt -genLowcodeInt64Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - AbstractInstruction * falseJump2; - AbstractInstruction * falseLabel; - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondHigh, firstHigh); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondLow, firstLow); - /* begin JumpNonZero: */ - falseJump2 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, firstLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, firstLow); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - falseLabel = anInstruction1; - jmpTarget(falseJump, falseLabel); - jmpTarget(falseJump2, falseLabel); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(firstLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Great */ -static sqInt -genLowcodeInt64Great(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64GreatEqual */ -static sqInt -genLowcodeInt64GreatEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Less */ -static sqInt -genLowcodeInt64Less(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64LessEqual */ -static sqInt -genLowcodeInt64LessEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64NotEqual */ -static sqInt -genLowcodeInt64NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - AbstractInstruction * falseJump2; - AbstractInstruction * falseLabel; - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondHigh, firstHigh); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondLow, firstLow); - /* begin JumpNonZero: */ - falseJump2 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, firstLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 1, firstLow); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(1)); - } - falseLabel = anInstruction1; - jmpTarget(falseJump, falseLabel); - jmpTarget(falseJump2, falseLabel); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(firstLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToFloat32 */ -static sqInt -genLowcodeInt64ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToFloat64 */ -static sqInt -genLowcodeInt64ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToOop */ -static sqInt -genLowcodeInt64ToOop(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssFlushAll(); - genLcInt64ToOophighPart(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToPointer */ -static sqInt -genLowcodeInt64ToPointer(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsBytes */ -static sqInt -genLowcodeIsBytes(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsBytesto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsFloatObject */ -static sqInt -genLowcodeIsFloatObject(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsFloatObjectto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsIndexable */ -static sqInt -genLowcodeIsIndexable(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsIndexableto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsIntegerObject */ -static sqInt -genLowcodeIsIntegerObject(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsIntegerObjectto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsPointers */ -static sqInt -genLowcodeIsPointers(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsPointersto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsWords */ -static sqInt -genLowcodeIsWords(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsWordsto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsWordsOrBytes */ -static sqInt -genLowcodeIsWordsOrBytes(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsWordsOrBytesto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLeftShift32 */ -static sqInt -genLowcodeLeftShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin LogicalShiftLeftR:R: */ - genoperandoperand(LogicalShiftLeftRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLeftShift64 */ -static sqInt -genLowcodeLeftShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << shiftAmount)) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentAddress */ -static sqInt -genLowcodeLoadArgumentAddress(void) -{ - sqInt baseOffset; - sqInt pointer; - - baseOffset = extA; - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, pointer); - ssPushNativeRegister(pointer); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentFloat32 */ -static sqInt -genLowcodeLoadArgumentFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt floatValue; - - baseOffset = extA; - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegisterSingleFloat(floatValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentFloat64 */ -static sqInt -genLowcodeLoadArgumentFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt doubleValue; - - baseOffset = extA; - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegisterDoubleFloat(doubleValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt16 */ -static sqInt -genLowcodeLoadArgumentInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt32 */ -static sqInt -genLowcodeLoadArgumentInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt64 */ -static sqInt -genLowcodeLoadArgumentInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(4)); - } - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt8 */ -static sqInt -genLowcodeLoadArgumentInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentPointer */ -static sqInt -genLowcodeLoadArgumentPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerResult; - - baseOffset = extA; - if (((pointerResult = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerResult = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerResult == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(pointerResult); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt16 */ -static sqInt -genLowcodeLoadArgumentUInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt32 */ -static sqInt -genLowcodeLoadArgumentUInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt64 */ -static sqInt -genLowcodeLoadArgumentUInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(4)); - } - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt8 */ -static sqInt -genLowcodeLoadArgumentUInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadFloat32FromMemory */ -static sqInt -genLowcodeLoadFloat32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, pointer, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegisterSingleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadFloat64FromMemory */ -static sqInt -genLowcodeLoadFloat64FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, pointer, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegisterDoubleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt16FromMemory */ -static sqInt -genLowcodeLoadInt16FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, pointer, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt32FromMemory */ -static sqInt -genLowcodeLoadInt32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt64FromMemory */ -static sqInt -genLowcodeLoadInt64FromMemory(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt pointer; - sqInt valueHigh; - sqInt valueLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, pointer, valueHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(4)); - } - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt8FromMemory */ -static sqInt -genLowcodeLoadInt8FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, pointer, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalAddress */ -static sqInt -genLowcodeLoadLocalAddress(void) -{ - sqInt baseOffset; - sqInt pointer; - - baseOffset = extA; - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, pointer); - ssPushNativeRegister(pointer); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalFloat32 */ -static sqInt -genLowcodeLoadLocalFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt floatValue; - - baseOffset = extA; - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegisterSingleFloat(floatValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalFloat64 */ -static sqInt -genLowcodeLoadLocalFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt doubleValue; - - baseOffset = extA; - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegisterDoubleFloat(doubleValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt16 */ -static sqInt -genLowcodeLoadLocalInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt32 */ -static sqInt -genLowcodeLoadLocalInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt64 */ -static sqInt -genLowcodeLoadLocalInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(4)); - } - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt8 */ -static sqInt -genLowcodeLoadLocalInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalPointer */ -static sqInt -genLowcodeLoadLocalPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerResult; - - baseOffset = extA; - if (((pointerResult = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerResult = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerResult == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(pointerResult); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt16 */ -static sqInt -genLowcodeLoadLocalUInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt32 */ -static sqInt -genLowcodeLoadLocalUInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt64 */ -static sqInt -genLowcodeLoadLocalUInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(4)); - } - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt8 */ -static sqInt -genLowcodeLoadLocalUInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadObjectAt */ -static sqInt -genLowcodeLoadObjectAt(void) -{ - sqInt fieldIndex; - sqInt object; - - if (((fieldIndex = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((fieldIndex = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << fieldIndex)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((fieldIndex == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), fieldIndex); - ssNativePop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcLoadObjectat(object, fieldIndex); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadObjectField */ -static sqInt -genLowcodeLoadObjectField(void) -{ - sqInt fieldIndex; - sqInt object; - - fieldIndex = extA; - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcLoadObjectfield(object, fieldIndex); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadPointerFromMemory */ -static sqInt -genLowcodeLoadPointerFromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt pointerResult; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointerResult = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((pointerResult = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (pointerResult == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, pointer, pointerResult); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(pointerResult); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt16FromMemory */ -static sqInt -genLowcodeLoadUInt16FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, pointer, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt32FromMemory */ -static sqInt -genLowcodeLoadUInt32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt64FromMemory */ -static sqInt -genLowcodeLoadUInt64FromMemory(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt pointer; - sqInt valueHigh; - sqInt valueLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, pointer, valueHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(4)); - } - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt8FromMemory */ -static sqInt -genLowcodeLoadUInt8FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, pointer, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLocalFrameSize */ -static sqInt -genLowcodeLocalFrameSize(void) -{ - sqInt address; - sqInt address1; - sqInt alignedSize; - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction *anInstruction2; - AbstractInstruction *anInstruction3; - AbstractInstruction *anInstruction4; - AbstractInstruction *anInstruction5; - AbstractInstruction *anInstruction6; - sqInt offset; - sqInt offset1; - sqInt offset2; - sqInt offset3; - sqInt quickConstant; - sqInt size; - - size = extA; - assert(needsFrame); - - /* Align the size to 16 bytes. */ - hasNativeFrame = 1; - - /* Mark the stack frame */ - alignedSize = (size + 15) & -16; - annotateobjRef(gMoveCwR(splObj(LowcodeContextMark), TempReg), splObj(LowcodeContextMark)); - /* begin MoveR:Mw:r: */ - offset = frameOffsetOfNativeFrameMark(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, TempReg, offset, FPReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(offset)); - } - /* begin MoveAw:R: */ - address = nativeStackPointerAddress(); - /* begin gen:literal:operand: */ - checkLiteralforInstruction(address, genoperandoperand(MoveAwR, address, TempReg)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(AddCqR, 1, TempReg); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(1)); - } - /* begin MoveR:Mw:r: */ - offset1 = frameOffsetOfPreviousNativeStackPointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction2 = genoperandoperandoperand(MoveRMwr, TempReg, offset1, FPReg); - if (usesOutOfLineLiteral(anInstruction2)) { - (anInstruction2->dependent = locateLiteral(offset1)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction3 = genoperandoperand(SubCqR, alignedSize, TempReg); - if (usesOutOfLineLiteral(anInstruction3)) { - (anInstruction3->dependent = locateLiteral(alignedSize)); - } - /* begin MoveR:Mw:r: */ - offset2 = frameOffsetOfNativeFramePointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction4 = genoperandoperandoperand(MoveRMwr, TempReg, offset2, FPReg); - if (usesOutOfLineLiteral(anInstruction4)) { - (anInstruction4->dependent = locateLiteral(offset2)); - } - /* begin MoveR:Mw:r: */ - offset3 = frameOffsetOfNativeStackPointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction5 = genoperandoperandoperand(MoveRMwr, TempReg, offset3, FPReg); - if (usesOutOfLineLiteral(anInstruction5)) { - (anInstruction5->dependent = locateLiteral(offset3)); - } - /* begin SubCq:R: */ - quickConstant = 1 + (defaultNativeStackFrameSize()); - /* begin checkQuickConstant:forInstruction: */ - anInstruction6 = genoperandoperand(SubCqR, quickConstant, TempReg); - if (usesOutOfLineLiteral(anInstruction6)) { - (anInstruction6->dependent = locateLiteral(quickConstant)); - } - /* begin MoveR:Aw: */ - address1 = nativeStackPointerAddress(); - /* begin gen:operand:literal: */ - checkLiteralforInstruction(address1, genoperandoperand(MoveRAw, TempReg, address1)); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLockRegisters */ -static sqInt -genLowcodeLockRegisters(void) -{ - ssFlushAll(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLockVM */ -static sqInt -genLowcodeLockVM(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMalloc32 */ -static sqInt -genLowcodeMalloc32(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << size)))) == NoReg) { - ssAllocateRequiredReg((pointer = Arg1Reg)); - } - if ((size == ReceiverResultReg) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - ssFlushAll(); - if (size != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, size, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceMallocTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, pointer); - ssPushNativeRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMalloc64 */ -static sqInt -genLowcodeMalloc64(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - sqInt sizeHigh; - sqInt sizeLow; - - if (((sizeLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((sizeLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((sizeHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << sizeLow)))) == NoReg) { - ssAllocateRequiredReg((sizeHigh = Arg1Reg)); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << sizeLow)) | (1U << sizeHigh)))) == NoReg) { - ssAllocateRequiredReg((pointer = SendNumArgsReg)); - } - if (((sizeLow == ReceiverResultReg) - || (sizeHigh == ReceiverResultReg)) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); - ssNativePop(1); - ssFlushAll(); - if (sizeLow != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, sizeLow, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceMallocTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, pointer); - ssPushNativeRegister(pointer); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpy32 */ -static sqInt -genLowcodeMemcpy32(void) -{ - sqInt dest; - sqInt size; - sqInt source; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((source = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << size)))) == NoReg) { - ssAllocateRequiredReg((source = Arg1Reg)); - } - if (((dest = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << size)) | (1U << source)))) == NoReg) { - ssAllocateRequiredReg((dest = SendNumArgsReg)); - } - if (((size == ReceiverResultReg) - || (source == ReceiverResultReg)) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - ssFlushAll(); - genMemCopytosize(backEnd, source, dest, size); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpy64 */ -static sqInt -genLowcodeMemcpy64(void) -{ - sqInt dest; - sqInt size; - sqInt sizeLow; - sqInt source; - - sizeLow = 0; - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((source = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << size)))) == NoReg) { - ssAllocateRequiredReg((source = Arg1Reg)); - } - if (((dest = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << size)) | (1U << source)))) == NoReg) { - ssAllocateRequiredReg((dest = SendNumArgsReg)); - } - if (((size == ReceiverResultReg) - || (source == ReceiverResultReg)) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - ssFlushAll(); - genMemCopytosize(backEnd, source, dest, sizeLow); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpyFixed */ -static sqInt -genLowcodeMemcpyFixed(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt dest; - sqInt size; - sqInt source; - - size = extA; - if (((source = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((source = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dest = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << source)))) == NoReg) { - ssAllocateRequiredReg((dest = Arg1Reg)); - } - if ((source == ReceiverResultReg) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - if (size == BytesPerWord) { - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, source, TempReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRMwr, TempReg, 0, dest); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - } - else { - ssFlushAll(); - genMemCopytoconstantSize(backEnd, source, dest, size); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveFloat32ToPhysical */ -static sqInt -genLowcodeMoveFloat32ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveFloat64ToPhysical */ -static sqInt -genLowcodeMoveFloat64ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += 8; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveInt32ToPhysical */ -static sqInt -genLowcodeMoveInt32ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveInt64ToPhysical */ -static sqInt -genLowcodeMoveInt64ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += 8; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMovePointerToPhysical */ -static sqInt -genLowcodeMovePointerToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMul32 */ -static sqInt -genLowcodeMul32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMul64 */ -static sqInt -genLowcodeMul64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNeg32 */ -static sqInt -genLowcodeNeg32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NegateR: */ - genoperand(NegateR, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNeg64 */ -static sqInt -genLowcodeNeg64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, valueLow); - /* begin NotR: */ - genoperand(NotR, valueHigh); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AddCqR, 1, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(AddcCqR, 0, valueHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNot32 */ -static sqInt -genLowcodeNot32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNot64 */ -static sqInt -genLowcodeNot64(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, valueLow); - /* begin NotR: */ - genoperand(NotR, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator dispatch */ - - /* StackToRegisterMappingCogit>>#genLowcodeNullaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeNullaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeBoolean32ToOop(); - - case 1: - return genLowcodeBoolean64ToOop(); - - case 2: - return genLowcodeFloat32ToOop(); - - case 3: - return genLowcodeFloat64ToOop(); - - case 4: - return genLowcodeInt32ToOop(); - - case 5: - return genLowcodeInt64ToOop(); - - case 6: - return genLowcodePointerToOop(); - - case 7: - return genLowcodePointerToOopReinterprer(); - - case 8: - return genLowcodeSmallInt32ToOop(); - - case 9: - return genLowcodeUint32ToOop(); - - case 10: - return genLowcodeUint64ToOop(); - - default: - return EncounteredUnknownBytecode; - - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopEqual */ -static sqInt -genLowcodeOopEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), second); - ssPop(1); - popToReg(ssTop(), first); - ssPop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopNotEqual */ -static sqInt -genLowcodeOopNotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), second); - ssPop(1); - popToReg(ssTop(), first); - ssPop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopSmallIntegerToInt32 */ -static sqInt -genLowcodeOopSmallIntegerToInt32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genConvertSmallIntegerToIntegerInReg(object); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopSmallIntegerToInt64 */ -static sqInt -genLowcodeOopSmallIntegerToInt64(void) -{ - AbstractInstruction *anInstruction; - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genConvertSmallIntegerToIntegerInReg(object); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegistersecondRegister(object, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToBoolean32 */ -static sqInt -genLowcodeOopToBoolean32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - annotateobjRef(gSubCwR(falseObject(), object), falseObject()); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToBoolean64 */ -static sqInt -genLowcodeOopToBoolean64(void) -{ - AbstractInstruction *anInstruction; - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - annotateobjRef(gSubCwR(falseObject(), object), falseObject()); - ssPushNativeRegistersecondRegister(object, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToFloat32 */ -static sqInt -genLowcodeOopToFloat32(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoFloat32(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToFloat64 */ -static sqInt -genLowcodeOopToFloat64(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoFloat64(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToInt32 */ -static sqInt -genLowcodeOopToInt32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToInt32(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToInt64 */ -static sqInt -genLowcodeOopToInt64(void) -{ - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoInt64highPart(object, valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToPointer */ -static sqInt -genLowcodeOopToPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcOopToPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToPointerReinterpret */ -static sqInt -genLowcodeOopToPointerReinterpret(void) -{ - sqInt object; - sqInt pointer; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((pointer = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToUInt32 */ -static sqInt -genLowcodeOopToUInt32(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToUInt32(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToUInt64 */ -static sqInt -genLowcodeOopToUInt64(void) -{ - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoUInt64highPart(object, valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOr32 */ -static sqInt -genLowcodeOr32(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOr64 */ -static sqInt -genLowcodeOr64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, secondLow, firstLow); - /* begin OrR:R: */ - genoperandoperand(OrRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePerformCallout */ -static sqInt -genLowcodePerformCallout(void) -{ - AbstractInstruction *abstractInstruction; - AbstractInstruction *abstractInstruction1; - - callSwitchToCStack(); - /* begin MoveCw:R: */ - checkLiteralforInstruction(extA, genoperandoperand(MoveCwR, extA, TempReg)); - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin annotateBytecode: */ - abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); - (abstractInstruction1->annotation = HasBytecodePC); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePerformCalloutIndirect */ -static sqInt -genLowcodePerformCalloutIndirect(void) -{ - AbstractInstruction *abstractInstruction; - AbstractInstruction *abstractInstruction1; - - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - callSwitchToCStack(); - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin annotateBytecode: */ - abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); - (abstractInstruction1->annotation = HasBytecodePC); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePin */ -static sqInt -genLowcodePin(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePlaftormCode */ -static sqInt -genLowcodePlaftormCode(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddConstantOffset */ -static sqInt -genLowcodePointerAddConstantOffset(void) -{ - AbstractInstruction *anInstruction; - sqInt base; - sqInt offset; - - offset = extB; - if (((base = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((base = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (base == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AddCqR, offset, base); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(offset)); - } - ssPushNativeRegister(base); - extB = 0; - numExtB = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddOffset32 */ -static sqInt -genLowcodePointerAddOffset32(void) -{ - sqInt base; - sqInt offset; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((base = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offset)))) == NoReg) { - ssAllocateRequiredReg((base = Arg1Reg)); - } - if ((offset == ReceiverResultReg) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, offset, base); - ssPushNativeRegister(base); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddOffset64 */ -static sqInt -genLowcodePointerAddOffset64(void) -{ - sqInt base; - sqInt offsetHigh; - sqInt offsetLow; - - if (((offsetLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offsetLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((offsetHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offsetLow)))) == NoReg) { - ssAllocateRequiredReg((offsetHigh = Arg1Reg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << offsetLow)) | (1U << offsetHigh)))) == NoReg) { - ssAllocateRequiredReg((base = SendNumArgsReg)); - } - if (((offsetLow == ReceiverResultReg) - || (offsetHigh == ReceiverResultReg)) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), offsetLow, offsetHigh); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, offsetLow, base); - ssPushNativeRegister(base); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerEqual */ -static sqInt -genLowcodePointerEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerNotEqual */ -static sqInt -genLowcodePointerNotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToInt32 */ -static sqInt -genLowcodePointerToInt32(void) -{ - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssPushNativeRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToInt64 */ -static sqInt -genLowcodePointerToInt64(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt resultHigh; - sqInt resultLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((resultLow = Arg1Reg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointer, resultLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, resultHigh); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegistersecondRegister(resultLow, resultHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToOop */ -static sqInt -genLowcodePointerToOop(void) -{ - sqInt pointer; - sqInt pointerClassLiteral; - - pointerClassLiteral = getLiteral(extA); - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssFlushAll(); - genLcPointerToOopclass(pointer, pointerClassLiteral); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToOopReinterprer */ -static sqInt -genLowcodePointerToOopReinterprer(void) -{ - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssPushRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopFloat32 */ -static sqInt -genLowcodePopFloat32(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopFloat64 */ -static sqInt -genLowcodePopFloat64(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopInt32 */ -static sqInt -genLowcodePopInt32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopInt64 */ -static sqInt -genLowcodePopInt64(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopMultipleNative */ -static sqInt -genLowcodePopMultipleNative(void) -{ - ssPopNativeSize(extA); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopPointer */ -static sqInt -genLowcodePopPointer(void) -{ - sqInt pointerValue; - - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerValue == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultFloat32 */ -static sqInt -genLowcodePushCalloutResultFloat32(void) -{ - cFloatResultToRs(backEnd, DPFPReg0); - ssPushNativeRegisterSingleFloat(DPFPReg0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultFloat64 */ -static sqInt -genLowcodePushCalloutResultFloat64(void) -{ - cFloatResultToRd(backEnd, DPFPReg0); - ssPushNativeRegisterDoubleFloat(DPFPReg0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultInt32 */ -static sqInt -genLowcodePushCalloutResultInt32(void) -{ - sqInt reg1; - - /* begin MoveR:R: */ - reg1 = R0; - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - ssPushNativeRegister(ReceiverResultReg); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultInt64 */ -static sqInt -genLowcodePushCalloutResultInt64(void) -{ - sqInt reg1; - sqInt reg11; - - /* begin MoveR:R: */ - reg1 = cResultRegisterLow(backEnd); - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - /* begin MoveR:R: */ - reg11 = cResultRegisterHigh(backEnd); - genoperandoperand(MoveRR, reg11, Arg0Reg); - ssPushNativeRegistersecondRegister(ReceiverResultReg, Arg0Reg); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultPointer */ -static sqInt -genLowcodePushCalloutResultPointer(void) -{ - sqInt reg1; - - /* begin MoveR:R: */ - reg1 = R0; - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - ssPushNativeRegister(ReceiverResultReg); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushConstantUInt32 */ -static sqInt -genLowcodePushConstantUInt32(void) -{ - sqInt constant; - - constant = extA; - ssPushNativeConstantInt32(constant); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushConstantUInt64 */ -static sqInt -genLowcodePushConstantUInt64(void) -{ - sqInt constant; - - constant = extA; - ssPushNativeConstantInt64(constant); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushNullPointer */ -static sqInt -genLowcodePushNullPointer(void) -{ - ssPushNativeConstantPointer(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOne32 */ -static sqInt -genLowcodePushOne32(void) -{ - ssPushNativeConstantInt32(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOne64 */ -static sqInt -genLowcodePushOne64(void) -{ - ssPushNativeConstantInt64(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOneFloat32 */ -static sqInt -genLowcodePushOneFloat32(void) -{ - ssPushNativeConstantFloat32(1.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOneFloat64 */ -static sqInt -genLowcodePushOneFloat64(void) -{ - ssPushNativeConstantFloat64(1.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalFloat32 */ -static sqInt -genLowcodePushPhysicalFloat32(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalFloat64 */ -static sqInt -genLowcodePushPhysicalFloat64(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalInt32 */ -static sqInt -genLowcodePushPhysicalInt32(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalInt64 */ -static sqInt -genLowcodePushPhysicalInt64(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalPointer */ -static sqInt -genLowcodePushPhysicalPointer(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushSessionIdentifier */ -static sqInt -genLowcodePushSessionIdentifier(void) -{ - ssPushNativeConstantInt32(getThisSessionID()); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZero32 */ -static sqInt -genLowcodePushZero32(void) -{ - ssPushNativeConstantInt32(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZero64 */ -static sqInt -genLowcodePushZero64(void) -{ - ssPushNativeConstantInt64(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZeroFloat32 */ -static sqInt -genLowcodePushZeroFloat32(void) -{ - ssPushNativeConstantFloat32(0.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZeroFloat64 */ -static sqInt -genLowcodePushZeroFloat64(void) -{ - ssPushNativeConstantFloat64(0.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRem32 */ -static sqInt -genLowcodeRem32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRem64 */ -static sqInt -genLowcodeRem64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRightShift32 */ -static sqInt -genLowcodeRightShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin LogicalShiftRightR:R: */ - genoperandoperand(LogicalShiftRightRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRightShift64 */ -static sqInt -genLowcodeRightShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << shiftAmount)) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend32From16 */ -static sqInt -genLowcodeSignExtend32From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend32From8 */ -static sqInt -genLowcodeSignExtend32From8(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From16 */ -static sqInt -genLowcodeSignExtend64From16(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * isNegative; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin JumpLess: */ - isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh))); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From32 */ -static sqInt -genLowcodeSignExtend64From32(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * isNegative; - sqInt resultHigh; - sqInt resultLow; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((resultLow = Arg1Reg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << value)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, resultLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin JumpLess: */ - isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, resultHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, resultHigh))); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegistersecondRegister(resultLow, resultHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From8 */ -static sqInt -genLowcodeSignExtend64From8(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * isNegative; - sqInt resultHigh; - sqInt resultLow; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((resultLow = SendNumArgsReg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = ClassReg)); - } - if ((((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin JumpLess: */ - isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh))); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSmallInt32ToOop */ -static sqInt -genLowcodeSmallInt32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - genConvertIntegerToSmallIntegerInReg(value); - ssPushRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreFloat32ToMemory */ -static sqInt -genLowcodeStoreFloat32ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt floatValue; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRsM32r, floatValue, 0, pointer); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreFloat64ToMemory */ -static sqInt -genLowcodeStoreFloat64ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt doubleValue; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), doubleValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, doubleValue, 0, pointer); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt16ToMemory */ -static sqInt -genLowcodeStoreInt16ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM16r, TempReg, 0, pointer); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt32ToMemory */ -static sqInt -genLowcodeStoreInt32ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, value, 0, pointer); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt64ToMemory */ -static sqInt -genLowcodeStoreInt64ToMemory(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt pointer; - sqInt valueHigh; - sqInt valueLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, valueLow, 0, pointer); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRM32r, valueHigh, 4, pointer); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(4)); - } - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt8ToMemory */ -static sqInt -genLowcodeStoreInt8ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM8r, TempReg, 0, pointer); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalFloat32 */ -static sqInt -genLowcodeStoreLocalFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRsM32r, value, 0, TempReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalFloat64 */ -static sqInt -genLowcodeStoreLocalFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, value, 0, TempReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt16 */ -static sqInt -genLowcodeStoreLocalInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - loadNativeLocalAddressto(baseOffset, value); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM16r, TempReg, 0, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt32 */ -static sqInt -genLowcodeStoreLocalInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, value, 0, TempReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt64 */ -static sqInt -genLowcodeStoreLocalInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, valueLow, 0, TempReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRM32r, valueHigh, 4, TempReg); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(4)); - } - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt8 */ -static sqInt -genLowcodeStoreLocalInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - loadNativeLocalAddressto(baseOffset, value); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM8r, TempReg, 0, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalPointer */ -static sqInt -genLowcodeStoreLocalPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerValue; - - baseOffset = extA; - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerValue == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, pointerValue, 0, TempReg); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreObjectField */ -static sqInt -genLowcodeStoreObjectField(void) -{ - sqInt fieldIndex; - sqInt object; - sqInt value; - - fieldIndex = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), value); - ssPop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcStoreobjectfield(value, object, fieldIndex); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreObjectFieldAt */ -static sqInt -genLowcodeStoreObjectFieldAt(void) -{ - sqInt fieldIndex; - sqInt object; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((fieldIndex = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((fieldIndex = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << value)) | (1U << fieldIndex)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (fieldIndex == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), value); - ssPop(1); - nativePopToReg(ssNativeTop(), fieldIndex); - ssNativePop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcStoreobjectat(value, object, fieldIndex); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStorePointerToMemory */ -static sqInt -genLowcodeStorePointerToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt memoryPointer; - sqInt pointerValue; - - if (((memoryPointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((memoryPointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointerValue = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << memoryPointer)))) == NoReg) { - ssAllocateRequiredReg((pointerValue = Arg1Reg)); - } - if ((memoryPointer == ReceiverResultReg) - || (pointerValue == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), memoryPointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, pointerValue, 0, memoryPointer); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSub32 */ -static sqInt -genLowcodeSub32(void) -{ - sqInt first; - sqInt second; + case 9: + /* begin genLowcodeUint32ToOop */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value5 = rTop8; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcUInt32ToOop(value5); + return 0; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, second, first); - ssPushNativeRegister(first); - return 0; -} + case 10: + /* begin genLowcodeUint64ToOop */ + /* begin allocateRegistersForLowcodeInteger2ResultOop: */ + topRegistersMask2 = 0; + rTop9 = (rNext2 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop9 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext2 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop9); + } + assert(!(((rTop9 == NoReg) + || (rNext2 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop9) | (1U << rNext2)); + assert(!((rResult5 == NoReg))); + valueLow2 = rTop9; + valueHigh2 = rNext2; + object4 = rResult5; + nativePopToRegsecondReg(ssNativeTop(), valueLow2, valueHigh2); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcUInt64ToOophighPart(valueLow2, valueHigh2); -/* Lowcode instruction generator */ + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeSub64 */ -static sqInt -genLowcodeSub64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; + default: + return EncounteredUnknownBytecode; - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, secondLow, firstLow); - /* begin SubbR:R: */ - genoperandoperand(SubbRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - return 0; } @@ -38322,1030 +31360,2511 @@ genLowcodeSub64(void) /* StackToRegisterMappingCogit>>#genLowcodeTrinaryInlinePrimitive: */ static sqInt NoDbgRegParms genLowcodeTrinaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeOopEqual(); - - case 1: - return genLowcodeOopNotEqual(); - - case 2: - return genLowcodeStoreObjectField(); - - case 3: - return genLowcodeStoreObjectFieldAt(); - - default: - return EncounteredUnknownBytecode; - - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate32To16 */ -static sqInt -genLowcodeTruncate32To16(void) -{ - AbstractInstruction *anInstruction; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFFFF, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0xFFFF)); - } - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate32To8 */ -static sqInt -genLowcodeTruncate32To8(void) -{ - AbstractInstruction *anInstruction; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFF, value); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0xFF)); - } - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To16 */ -static sqInt -genLowcodeTruncate64To16(void) -{ - AbstractInstruction *anInstruction; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFFFF, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0xFFFF)); - } - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To32 */ -static sqInt -genLowcodeTruncate64To32(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To8 */ -static sqInt -genLowcodeTruncate64To8(void) -{ - AbstractInstruction *anInstruction; - sqInt result; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFF, valueLow); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0xFF)); - } - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUdiv32 */ -static sqInt -genLowcodeUdiv32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, first, second); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUdiv64 */ -static sqInt -genLowcodeUdiv64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32Great */ -static sqInt -genLowcodeUint32Great(void) { AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction3; AbstractInstruction * contJump; + AbstractInstruction * contJump1; AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + sqInt fieldIndex; + sqInt fieldIndex1; + sqInt fieldIndexValue; sqInt first; + sqInt first1; + sqInt firstValue; + sqInt firstValue1; + sqInt object; + sqInt object1; + sqInt objectValue; + sqInt objectValue1; + sqInt oopTopRegisterMask; + sqInt oopTopRegisterMask1; + sqInt oopTopRegisterMask2; + sqInt oopTopRegisterMask3; + sqInt rOopNext; + sqInt rOopNext1; + sqInt rOopNext2; + sqInt rOopNext3; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop2; + sqInt rOopTop3; + sqInt rResult; + sqInt rTop; sqInt second; + sqInt second1; + sqInt secondValue; + sqInt secondValue1; + sqInt topRegisterMask; + sqInt value; + sqInt value1; + sqInt value2; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue2; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpBelowOrEqual: */ - falseJump = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ + + switch (prim) { + case 0: + /* begin genLowcodeOopEqual */ + rOopTop = (rOopNext = NoReg); + rResult = NoReg; + oopTopRegisterMask = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask = 1U << rOopNext; + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(oopTopRegisterMask); + } + if (rOopNext == NoReg) { + rOopNext = allocateRegNotConflictingWith(1U << rOopTop); + } + rResult = allocateRegNotConflictingWith((1U << rOopTop) | (1U << rOopNext)); + assert(!(((rOopTop == NoReg) + || ((rOopNext == NoReg) + || (rResult == NoReg))))); + second = rOopTop; + first = rOopNext; + value = rResult; + + popToReg(ssTop(), second); + ssPop(1); + popToReg(ssTop(), first); + ssPop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second, first); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 1, first); + if (usesOutOfLineLiteral(anInstruction)) { + (anInstruction->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, first); + if (usesOutOfLineLiteral(anInstruction1)) { + (anInstruction1->dependent = locateLiteral(0)); + } + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeUint32GreatEqual */ -static sqInt -genLowcodeUint32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; + case 1: + /* begin genLowcodeOopNotEqual */ + rOopTop1 = (rOopNext1 = NoReg); + oopTopRegisterMask1 = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext1 = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask1 = 1U << rOopNext1; + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(oopTopRegisterMask1); + } + if (rOopNext1 == NoReg) { + rOopNext1 = allocateRegNotConflictingWith(1U << rOopTop1); + } + assert(!(((rOopTop1 == NoReg) + || (rOopNext1 == NoReg)))); + second1 = rOopTop1; + first1 = rOopNext1; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpBelow: */ - falseJump = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} + popToReg(ssTop(), second1); + ssPop(1); + popToReg(ssTop(), first1); + ssPop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second1, first1); + /* begin JumpZero: */ + falseJump1 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(MoveCqR, 1, first1); + if (usesOutOfLineLiteral(anInstruction2)) { + (anInstruction2->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, first1); + if (usesOutOfLineLiteral(anInstruction3)) { + (anInstruction3->dependent = locateLiteral(0)); + } + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first1); + return 0; + case 2: + /* begin genLowcodeStoreObjectField */ + fieldIndex = extA; + /* begin allocateRegistersForLowcodeOop2: */ + rOopTop2 = (rOopNext2 = NoReg); + oopTopRegisterMask2 = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext2 = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask2 = 1U << rOopNext2; + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(oopTopRegisterMask2); + } + if (rOopNext2 == NoReg) { + rOopNext2 = allocateRegNotConflictingWith(1U << rOopTop2); + } + assert(!(((rOopTop2 == NoReg) + || (rOopNext2 == NoReg)))); + value1 = rOopTop2; + object = rOopNext2; + + popToReg(ssTop(), value1); + ssPop(1); + popToReg(ssTop(), object); + ssPop(1); + genLcStoreobjectfield(value1, object, fieldIndex); + extA = 0; + return 0; -/* Lowcode instruction generator */ + case 3: + /* begin genLowcodeStoreObjectFieldAt */ + rTop = (rOopTop3 = (rOopNext3 = NoReg)); + oopTopRegisterMask3 = (topRegisterMask = 0); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + /* begin registerMaskFor: */ + oopTopRegisterMask3 = 1U << rTop; + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask = 1U << rOopTop3; + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext3 = registerOrNone(ssValue(1)); + topRegisterMask = topRegisterMask | (1U << rOopNext3); + oopTopRegisterMask3 = oopTopRegisterMask3 | (1U << rOopNext3); + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegisterMask); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(oopTopRegisterMask3); + } + if (rOopNext3 == NoReg) { + rOopNext3 = allocateRegNotConflictingWith((1U << rTop) | (1U << rOopTop3)); + } + assert(!(((rTop == NoReg) + || ((rOopTop3 == NoReg) + || (rOopNext3 == NoReg))))); + fieldIndex1 = rTop; + value2 = rOopTop3; + object1 = rOopNext3; + + popToReg(ssTop(), value2); + ssPop(1); + nativePopToReg(ssNativeTop(), fieldIndex1); + ssNativePop(1); + popToReg(ssTop(), object1); + ssPop(1); + genLcStoreobjectat(value2, object1, fieldIndex1); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeUint32Less */ -static sqInt -genLowcodeUint32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; + default: + return EncounteredUnknownBytecode; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpAboveOrEqual: */ - falseJump = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); return 0; } -/* Lowcode instruction generator */ +/* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeUint32LessEqual */ -static sqInt -genLowcodeUint32LessEqual(void) + /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive2: */ +static sqInt NoDbgRegParms +genLowcodeUnaryInlinePrimitive2(sqInt prim) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpAbove: */ - falseJump = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(1)); - } - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - if (usesOutOfLineLiteral(anInstruction1)) { - (anInstruction1->dependent = locateLiteral(0)); - } - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToFloat32 */ -static sqInt -genLowcodeUint32ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rs: */ - genoperandoperand(ConvertRRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToFloat64 */ -static sqInt -genLowcodeUint32ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rd: */ - genoperandoperand(ConvertRRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToOop */ -static sqInt -genLowcodeUint32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcUInt32ToOop(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64Great */ -static sqInt -genLowcodeUint64Great(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64GreatEqual */ -static sqInt -genLowcodeUint64GreatEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64Less */ -static sqInt -genLowcodeUint64Less(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64LessEqual */ -static sqInt -genLowcodeUint64LessEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToFloat32 */ -static sqInt -genLowcodeUint64ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToFloat64 */ -static sqInt -genLowcodeUint64ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToOop */ -static sqInt -genLowcodeUint64ToOop(void) -{ - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssFlushAll(); - genLcUInt64ToOophighPart(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUmul32 */ -static sqInt -genLowcodeUmul32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUmul64 */ -static sqInt -genLowcodeUmul64(void) -{ + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction110; + AbstractInstruction *anInstruction111; + AbstractInstruction *anInstruction112; + AbstractInstruction *anInstruction113; + AbstractInstruction *anInstruction114; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction27; + AbstractInstruction *anInstruction28; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction30; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction33; + AbstractInstruction *anInstruction34; + AbstractInstruction *anInstruction35; + AbstractInstruction *anInstruction36; + AbstractInstruction *anInstruction37; + AbstractInstruction *anInstruction38; + AbstractInstruction *anInstruction39; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction40; + AbstractInstruction *anInstruction41; + AbstractInstruction *anInstruction42; + AbstractInstruction *anInstruction43; + AbstractInstruction *anInstruction44; + AbstractInstruction *anInstruction45; + AbstractInstruction *anInstruction46; + AbstractInstruction *anInstruction47; + AbstractInstruction *anInstruction48; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt baseOffset; + sqInt baseOffset1; + sqInt baseOffset10; + sqInt baseOffset11; + sqInt baseOffset12; + sqInt baseOffset13; + sqInt baseOffset14; + sqInt baseOffset15; + sqInt baseOffset16; + sqInt baseOffset17; + sqInt baseOffset18; + sqInt baseOffset19; + sqInt baseOffset2; + sqInt baseOffset20; + sqInt baseOffset21; + sqInt baseOffset22; + sqInt baseOffset23; + sqInt baseOffset3; + sqInt baseOffset4; + sqInt baseOffset5; + sqInt baseOffset6; + sqInt baseOffset7; + sqInt baseOffset8; + sqInt baseOffset9; + sqInt classOop; + sqInt classOop1; + sqInt classOop2; + sqInt classOopValue; + sqInt classOopValue1; + sqInt classOopValue2; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + AbstractInstruction * contJump4; + AbstractInstruction * contJump5; + AbstractInstruction * contJump6; + AbstractInstruction * contJump7; + sqInt doubleValue; + sqInt doubleValue1; + sqInt doubleValueValue; + sqInt doubleValueValue1; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump21; + AbstractInstruction * falseJump22; + AbstractInstruction * falseJump3; + AbstractInstruction * falseJump4; + AbstractInstruction * falseJump5; + AbstractInstruction * falseJump6; + AbstractInstruction * falseJump7; + AbstractInstruction * falseLabel; + AbstractInstruction * falseLabel1; + sqInt fieldIndex; + sqInt fieldIndexValue; sqInt first; + sqInt first1; + sqInt first10; + sqInt first2; + sqInt first3; + sqInt first4; + sqInt first5; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstHigh; + sqInt firstHigh5; + sqInt firstHighValue; + sqInt firstHighValue1; + sqInt firstLow; + sqInt firstLow5; + sqInt firstLowValue; + sqInt firstLowValue1; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue10; + sqInt firstValue2; + sqInt firstValue3; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt floatValue; + sqInt floatValue1; + sqInt floatValue2; + sqInt floatValue3; + sqInt floatValue4; + sqInt floatValue5; + sqInt floatValue6; + sqInt floatValueValue; + sqInt floatValueValue1; + sqInt floatValueValue2; + sqInt floatValueValue3; + sqInt floatValueValue4; + sqInt floatValueValue5; + sqInt floatValueValue6; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frResult4; + sqInt frResult5; + sqInt frResult6; + sqInt frResult7; + sqInt frResult8; + sqInt frResult9; + sqInt frTop; + sqInt frTop1; + sqInt frTop2; + sqInt frTop3; + sqInt frTop4; + sqInt indexableSize; + sqInt indexableSize1; + sqInt indexableSizeValue; + sqInt int32Result; + sqInt int32ResultValue; + sqInt int64Result; + sqInt int64Result1; + sqInt int64Result2; + sqInt int64ResultValue; + sqInt int64ResultValue1; + sqInt int64ResultValue2; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt object; + sqInt object1; + sqInt object2; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue2; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointer6; + sqInt pointer7; + sqInt pointer8; + sqInt pointerResult; + sqInt pointerResult1; + sqInt pointerResultValue; + sqInt pointerResultValue1; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValue8; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg2; + sqInt reg3; + sqInt reg4; + sqInt reg5; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerMask; + sqInt registerMask1; sqInt result; + sqInt result1; + sqInt result2; + sqInt result3; + sqInt result4; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue2; + sqInt resultValue3; + sqInt resultValue4; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext12; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext2; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNextNext; + sqInt rNextNextNext1; + sqInt rOopResult; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop2; + sqInt rOopTop3; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult11; + sqInt rResult12; + sqInt rResult13; + sqInt rResult14; + sqInt rResult15; + sqInt rResult16; + sqInt rResult17; + sqInt rResult18; + sqInt rResult19; + sqInt rResult2; + sqInt rResult20; + sqInt rResult21; + sqInt rResult210; + sqInt rResult211; + sqInt rResult212; + sqInt rResult213; + sqInt rResult214; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult25; + sqInt rResult26; + sqInt rResult27; + sqInt rResult28; + sqInt rResult29; + sqInt rResult3; + sqInt rResult30; + sqInt rResult31; + sqInt rResult32; + sqInt rResult33; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop12; + sqInt rTop13; + sqInt rTop14; + sqInt rTop15; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; sqInt second; + sqInt second1; + sqInt second10; + sqInt second2; + sqInt second3; + sqInt second4; + sqInt second5; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondHigh; + sqInt secondHigh5; + sqInt secondHighValue; + sqInt secondHighValue1; + sqInt secondLow; + sqInt secondLow5; + sqInt secondLowValue; + sqInt secondLowValue1; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue10; + sqInt secondValue2; + sqInt secondValue3; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt topRegisterMask; + sqInt topRegisterMask1; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask13; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask2; + sqInt topRegistersMask3; + sqInt topRegistersMask4; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value17; + sqInt value18; + sqInt value19; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value27; + sqInt value28; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value7; + sqInt value8; + sqInt valueHigh2; + sqInt valueHigh4; + sqInt valueHigh5; + sqInt valueHigh6; + sqInt valueHigh7; + sqInt valueHigh8; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueHighValue3; + sqInt valueHighValue4; + sqInt valueHighValue5; + sqInt valueLow2; + sqInt valueLow4; + sqInt valueLow5; + sqInt valueLow6; + sqInt valueLow7; + sqInt valueLow8; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueLowValue3; + sqInt valueLowValue4; + sqInt valueLowValue5; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue17; + sqInt valueValue18; + sqInt valueValue19; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue27; + sqInt valueValue28; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue7; + sqInt valueValue8; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator dispatch */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive2: */ -static sqInt NoDbgRegParms -genLowcodeUnaryInlinePrimitive2(sqInt prim) -{ switch (prim) { case 60: - return genLowcodeFloat64ToFloat32(); + /* begin genLowcodeFloat64ToFloat32 */ + topRegistersMask = 0; + frTop = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(topRegistersMask); + } + assert(!((frTop == NoReg))); + floatValue = frTop; + + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin ConvertRd:Rs: */ + genoperandoperand(ConvertRdRs, floatValue, floatValue); + ssPushNativeRegisterSingleFloat(floatValue); + return 0; case 61: - return genLowcodeFloat64ToInt32(); + /* begin genLowcodeFloat64ToInt32 */ + frTop1 = NoReg; + + /* Float argument */ + rResult = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(0); + assert(!(((frTop1 == NoReg) + || (rResult == NoReg)))); + floatValue1 = frTop1; + int32Result = rResult; + + nativePopToReg(ssNativeTop(), floatValue1); + ssNativePop(1); + /* begin ConvertRd:R: */ + genoperandoperand(ConvertRdR, floatValue1, int32Result); + ssPushNativeRegister(int32Result); + return 0; case 0x3E: - return genLowcodeFloat64ToInt64(); + /* begin genLowcodeFloat64ToInt64 */ + frTop2 = NoReg; + + /* Float argument */ + rResult1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(0); + assert(!(((frTop2 == NoReg) + || (rResult1 == NoReg)))); + floatValue2 = frTop2; + int64Result = rResult1; + + nativePopToReg(ssNativeTop(), floatValue2); + ssNativePop(1); + abort(); + return 0; case 0x3F: - return genLowcodeFloat64ToUInt32(); + /* begin genLowcodeFloat64ToUInt32 */ + frTop3 = NoReg; + + /* Float argument */ + rResult2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(0); + assert(!(((frTop3 == NoReg) + || (rResult2 == NoReg)))); + floatValue3 = frTop3; + int64Result1 = rResult2; + + nativePopToReg(ssNativeTop(), floatValue3); + ssNativePop(1); + /* begin ConvertRd:R: */ + genoperandoperand(ConvertRdR, floatValue3, int64Result1); + ssPushNativeRegister(int64Result1); + return 0; case 64: - return genLowcodeFloat64ToUInt64(); + /* begin genLowcodeFloat64ToUInt64 */ + frTop4 = NoReg; + + /* Float argument */ + rResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop4 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop4 == NoReg) { + frTop4 = allocateFloatRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(0); + assert(!(((frTop4 == NoReg) + || (rResult3 == NoReg)))); + floatValue4 = frTop4; + int64Result2 = rResult3; + + nativePopToReg(ssNativeTop(), floatValue4); + ssNativePop(1); + abort(); + return 0; case 65: - return genLowcodeFree(); + /* begin genLowcodeFree */ + rTop28 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop28 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(0); + } + assert(!((rTop28 == NoReg))); + pointer7 = rTop28; + + nativePopToReg(ssNativeTop(), pointer7); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (pointer7 != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointer7, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceFreeTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + return 0; case 66: - return genLowcodeInstantiateIndexable32Oop(); + /* begin genLowcodeInstantiateIndexable32Oop */ + rTop29 = (rOopTop1 = NoReg); + rOopResult = NoReg; + topRegisterMask1 = 0; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask1 = 1U << rOopTop1; + } + if (rTop29 == NoReg) { + rTop29 = allocateRegNotConflictingWith(topRegisterMask1); + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(1U << rTop29); + } + rOopResult = allocateRegNotConflictingWith((1U << rTop29) | (1U << rOopTop1)); + assert(!(((rTop29 == NoReg) + || ((rOopTop1 == NoReg) + || (rOopResult == NoReg))))); + indexableSize = rTop29; + classOop = rOopTop1; + object1 = rOopResult; + + nativePopToReg(ssNativeTop(), indexableSize); + ssNativePop(1); + popToReg(ssTop(), classOop); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOopindexableSize(classOop, indexableSize); + return 0; case 67: - return genLowcodeInstantiateIndexableOop(); + /* begin genLowcodeInstantiateIndexableOop */ + indexableSize1 = extA; + /* begin allocateRegistersForLowcodeOopResultOop: */ + rOopTop2 = NoReg; + rResult28 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(0); + } + rResult28 = allocateRegNotConflictingWith(1U << rOopTop2); + assert(!(((rOopTop2 == NoReg) + || (rResult28 == NoReg)))); + classOop1 = rOopTop2; + object2 = rResult28; + + popToReg(ssTop(), classOop1); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOopconstantIndexableSize(classOop1, indexableSize1); + extA = 0; + return 0; case 68: - return genLowcodeInstantiateOop(); + /* begin genLowcodeInstantiateOop */ + rOopTop3 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop3 == NoReg))); + classOop2 = rOopTop3; + + popToReg(ssTop(), classOop2); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOop(classOop2); + return 0; case 69: - return genLowcodeInt32Equal(); + /* begin genLowcodeInt32Equal */ + topRegistersMask1 = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second, first); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 1, first); + if (usesOutOfLineLiteral(anInstruction)) { + (anInstruction->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, first); + if (usesOutOfLineLiteral(anInstruction1)) { + (anInstruction1->dependent = locateLiteral(0)); + } + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first); + return 0; case 70: - return genLowcodeInt32Great(); + /* begin genLowcodeInt32Great */ + topRegistersMask2 = 0; + rTop1 = (rNext1 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop1 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext1 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg1; + } + } + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop1); + } + assert(!(((rTop1 == NoReg) + || (rNext1 == NoReg)))); + second1 = rTop1; + first1 = rNext1; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second1, first1); + /* begin JumpLessOrEqual: */ + falseJump1 = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(MoveCqR, 1, first1); + if (usesOutOfLineLiteral(anInstruction2)) { + (anInstruction2->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, first1); + if (usesOutOfLineLiteral(anInstruction3)) { + (anInstruction3->dependent = locateLiteral(0)); + } + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first1); + return 0; case 71: - return genLowcodeInt32GreatEqual(); + /* begin genLowcodeInt32GreatEqual */ + topRegistersMask3 = 0; + rTop2 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg2; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext2 == NoReg)))); + second2 = rTop2; + first2 = rNext2; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second2, first2); + /* begin JumpLess: */ + falseJump2 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(MoveCqR, 1, first2); + if (usesOutOfLineLiteral(anInstruction4)) { + (anInstruction4->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperand(MoveCqR, 0, first2); + if (usesOutOfLineLiteral(anInstruction5)) { + (anInstruction5->dependent = locateLiteral(0)); + } + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first2); + return 0; case 72: - return genLowcodeInt32Less(); + /* begin genLowcodeInt32Less */ + topRegistersMask4 = 0; + rTop3 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1U << reg3; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + second3 = rTop3; + first3 = rNext3; + + nativePopToReg(ssNativeTop(), second3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first3); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second3, first3); + /* begin JumpGreaterOrEqual: */ + falseJump3 = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperand(MoveCqR, 1, first3); + if (usesOutOfLineLiteral(anInstruction6)) { + (anInstruction6->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperand(MoveCqR, 0, first3); + if (usesOutOfLineLiteral(anInstruction7)) { + (anInstruction7->dependent = locateLiteral(0)); + } + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first3); + return 0; case 73: - return genLowcodeInt32LessEqual(); + /* begin genLowcodeInt32LessEqual */ + topRegistersMask5 = 0; + rTop4 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1U << reg4; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext4 == NoReg)))); + second4 = rTop4; + first4 = rNext4; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second4, first4); + /* begin JumpGreater: */ + falseJump4 = genConditionalBranchoperand(JumpGreater, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperand(MoveCqR, 1, first4); + if (usesOutOfLineLiteral(anInstruction8)) { + (anInstruction8->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump4 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperand(MoveCqR, 0, first4); + if (usesOutOfLineLiteral(anInstruction9)) { + (anInstruction9->dependent = locateLiteral(0)); + } + jmpTarget(contJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first4); + return 0; case 74: - return genLowcodeInt32NotEqual(); + /* begin genLowcodeInt32NotEqual */ + topRegistersMask6 = 0; + rTop5 = (rNext5 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext5 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg5; + } + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext5 == NoReg) { + rNext5 = allocateRegNotConflictingWith(1U << rTop5); + } + assert(!(((rTop5 == NoReg) + || (rNext5 == NoReg)))); + second5 = rTop5; + first5 = rNext5; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second5, first5); + /* begin JumpZero: */ + falseJump5 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperand(MoveCqR, 1, first5); + if (usesOutOfLineLiteral(anInstruction10)) { + (anInstruction10->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump5 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperand(MoveCqR, 0, first5); + if (usesOutOfLineLiteral(anInstruction11)) { + (anInstruction11->dependent = locateLiteral(0)); + } + jmpTarget(contJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first5); + return 0; case 75: - return genLowcodeInt32ToFloat32(); + /* begin genLowcodeInt32ToFloat32 */ + rTop6 = NoReg; + frResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop6 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop6 == NoReg) + || (frResult == NoReg)))); + value = rTop6; + result = frResult; + + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin ConvertR:Rs: */ + genoperandoperand(ConvertRRs, value, result); + ssPushNativeRegisterSingleFloat(result); + return 0; case 76: - return genLowcodeInt32ToFloat64(); + /* begin genLowcodeInt32ToFloat64 */ + rTop7 = NoReg; + frResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop7 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop7 == NoReg) + || (frResult1 == NoReg)))); + value1 = rTop7; + result1 = frResult1; + + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + /* begin ConvertR:Rd: */ + genoperandoperand(ConvertRRd, value1, result1); + ssPushNativeRegisterDoubleFloat(result1); + return 0; case 77: - return genLowcodeInt32ToPointer(); + /* begin genLowcodeInt32ToPointer */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value2 = rTop8; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + ssPushNativeRegister(value2); + return 0; case 78: - return genLowcodeInt64Equal(); + /* begin genLowcodeInt64Equal */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop9 = (rNext6 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext6 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop9 == NoReg) { + registerMask = 0; + if (rNext6 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext6; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop9 = allocateRegNotConflictingWith(registerMask); + } + if (rNext6 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop9; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext6 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop9) | (1U << rNext6); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop9) | (1U << rNext6)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop9 == NoReg) + || ((rNext6 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow = rTop9; + secondHigh = rNext6; + firstLow = rNextNext; + firstHigh = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondHigh, firstHigh); + /* begin JumpNonZero: */ + falseJump6 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondLow, firstLow); + /* begin JumpNonZero: */ + falseJump21 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperand(MoveCqR, 1, firstLow); + if (usesOutOfLineLiteral(anInstruction12)) { + (anInstruction12->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump6 = genoperand(Jump, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperand(MoveCqR, 0, firstLow); + if (usesOutOfLineLiteral(anInstruction13)) { + (anInstruction13->dependent = locateLiteral(0)); + } + falseLabel = anInstruction13; + jmpTarget(falseJump6, falseLabel); + jmpTarget(falseJump21, falseLabel); + jmpTarget(contJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(firstLow); + + return 0; case 79: - return genLowcodeInt64Great(); + /* begin genLowcodeInt64Great */ + topRegistersMask8 = 0; + rTop10 = (rNext7 = NoReg); + rResult4 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext7 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg7; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1U << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext7 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop10) | (1U << rNext7)); + assert(!((rResult4 == NoReg))); + second7 = rTop10; + first7 = rNext7; + value3 = rResult4; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + abort(); + return 0; case 80: - return genLowcodeInt64GreatEqual(); + /* begin genLowcodeInt64GreatEqual */ + topRegistersMask9 = 0; + rTop12 = (rNext8 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop12 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext8 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1U << reg8; + } + } + if (rTop12 == NoReg) { + rTop12 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1U << rTop12); + } + assert(!(((rTop12 == NoReg) + || (rNext8 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop12) | (1U << rNext8)); + assert(!((rResult5 == NoReg))); + second8 = rTop12; + first8 = rNext8; + value4 = rResult5; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + abort(); + return 0; case 81: - return genLowcodeInt64Less(); + /* begin genLowcodeInt64Less */ + topRegistersMask10 = 0; + rTop13 = (rNext9 = NoReg); + rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop13 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext9 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask10 = 1U << reg9; + } + } + if (rTop13 == NoReg) { + rTop13 = allocateRegNotConflictingWith(topRegistersMask10); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop13); + } + assert(!(((rTop13 == NoReg) + || (rNext9 == NoReg)))); + rResult6 = allocateFloatRegNotConflictingWith((1U << rTop13) | (1U << rNext9)); + assert(!((rResult6 == NoReg))); + second9 = rTop13; + first9 = rNext9; + value5 = rResult6; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + abort(); + return 0; case 82: - return genLowcodeInt64LessEqual(); + /* begin genLowcodeInt64LessEqual */ + topRegistersMask11 = 0; + rTop14 = (rNext10 = NoReg); + rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop14 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1U << reg10; + } + } + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(topRegistersMask11); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop14); + } + assert(!(((rTop14 == NoReg) + || (rNext10 == NoReg)))); + rResult7 = allocateFloatRegNotConflictingWith((1U << rTop14) | (1U << rNext10)); + assert(!((rResult7 == NoReg))); + second10 = rTop14; + first10 = rNext10; + value6 = rResult7; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + abort(); + return 0; case 83: - return genLowcodeInt64NotEqual(); + /* begin genLowcodeInt64NotEqual */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop15 = (rNext12 = (rNextNext1 = (rNextNextNext1 = NoReg))); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext12 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext12 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext12 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + nativeValueIndex1 += 1; + } + } + if (rTop15 == NoReg) { + registerMask1 = 0; + if (rNext12 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext12; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rTop15 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext12 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop15; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNext12 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop15) | (1U << rNext12); + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNextNext1 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask1 = ((1U << rTop15) | (1U << rNext12)) | (1U << rNextNext1); + rNextNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop15 == NoReg) + || ((rNext12 == NoReg) + || ((rNextNext1 == NoReg) + || (rNextNextNext1 == NoReg)))))); + secondLow5 = rTop15; + secondHigh5 = rNext12; + firstLow5 = rNextNext1; + firstHigh5 = rNextNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), secondLow5, secondHigh5); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow5, firstHigh5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondHigh5, firstHigh5); + /* begin JumpNonZero: */ + falseJump7 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondLow5, firstLow5); + /* begin JumpNonZero: */ + falseJump22 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCqR, 0, firstLow5); + if (usesOutOfLineLiteral(anInstruction16)) { + (anInstruction16->dependent = locateLiteral(0)); + } + /* begin Jump: */ + contJump7 = genoperand(Jump, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(MoveCqR, 1, firstLow5); + if (usesOutOfLineLiteral(anInstruction17)) { + (anInstruction17->dependent = locateLiteral(1)); + } + falseLabel1 = anInstruction17; + jmpTarget(falseJump7, falseLabel1); + jmpTarget(falseJump22, falseLabel1); + jmpTarget(contJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(firstLow5); + + return 0; case 84: - return genLowcodeInt64ToFloat32(); + /* begin genLowcodeInt64ToFloat32 */ + rTop17 = NoReg; + frResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop17 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop17 == NoReg) + || (frResult2 == NoReg)))); + value7 = rTop17; + result2 = frResult2; + + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + abort(); + return 0; case 85: - return genLowcodeInt64ToFloat64(); + /* begin genLowcodeInt64ToFloat64 */ + rTop18 = NoReg; + frResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop18 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop18 == NoReg) { + rTop18 = allocateRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop18 == NoReg) + || (frResult3 == NoReg)))); + value8 = rTop18; + result3 = frResult3; + + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + abort(); + return 0; case 86: - return genLowcodeInt64ToPointer(); + /* begin genLowcodeInt64ToPointer */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask13 = 0; + rTop19 = (rNext14 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (rNext14 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1U << reg12; + } + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(topRegistersMask13); + } + if (rNext14 == NoReg) { + rNext14 = allocateRegNotConflictingWith(1U << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext14 == NoReg)))); + valueLow2 = rTop19; + valueHigh2 = rNext14; + + nativePopToRegsecondReg(ssNativeTop(), valueLow2, valueHigh2); + ssNativePop(1); + ssPushNativeRegister(valueLow2); + + return 0; case 87: - return genLowcodeLeftShift32(); + /* begin genLowcodeLeftShift32 */ + topRegistersMask14 = 0; + rTop20 = (rNext15 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext15 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1U << reg13; + } + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(topRegistersMask14); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1U << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext15 == NoReg)))); + shiftAmount = rTop20; + value10 = rNext15; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + /* begin LogicalShiftLeftR:R: */ + genoperandoperand(LogicalShiftLeftRR, shiftAmount, value10); + ssPushNativeRegister(value10); + return 0; case 88: - return genLowcodeLeftShift64(); + /* begin genLowcodeLeftShift64 */ + topRegistersMask15 = 0; + rTop21 = (rNext16 = NoReg); + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop21 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext16 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext16 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (rNext16 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1U << reg14; + } + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(topRegistersMask15); + } + if (rNext16 == NoReg) { + rNext16 = allocateRegNotConflictingWith(1U << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext16 == NoReg)))); + rResult8 = allocateFloatRegNotConflictingWith((1U << rTop21) | (1U << rNext16)); + assert(!((rResult8 == NoReg))); + shiftAmount1 = rTop21; + value11 = rNext16; + result4 = rResult8; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value11); + ssNativePop(1); + abort(); + return 0; case 89: - return genLowcodeLoadArgumentAddress(); + /* begin genLowcodeLoadArgumentAddress */ + baseOffset = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult9 = NoReg; + rResult9 = allocateRegNotConflictingWith(0); + assert(!((rResult9 == NoReg))); + pointer = rResult9; + + loadNativeArgumentAddressto(baseOffset, pointer); + ssPushNativeRegister(pointer); + extA = 0; + return 0; case 90: - return genLowcodeLoadArgumentFloat32(); + /* begin genLowcodeLoadArgumentFloat32 */ + baseOffset1 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult4 = NoReg; + frResult4 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult4 == NoReg))); + floatValue5 = frResult4; + + loadNativeArgumentAddressto(baseOffset1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue5); + if (usesOutOfLineLiteral(anInstruction20)) { + (anInstruction20->dependent = locateLiteral(0)); + } + ssPushNativeRegisterSingleFloat(floatValue5); + extA = 0; + return 0; case 91: - return genLowcodeLoadArgumentFloat64(); + /* begin genLowcodeLoadArgumentFloat64 */ + baseOffset2 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult5 = NoReg; + frResult5 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult5 == NoReg))); + doubleValue = frResult5; + + loadNativeArgumentAddressto(baseOffset2, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction21 = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); + if (usesOutOfLineLiteral(anInstruction21)) { + (anInstruction21->dependent = locateLiteral(0)); + } + ssPushNativeRegisterDoubleFloat(doubleValue); + extA = 0; + return 0; case 92: - return genLowcodeLoadArgumentInt16(); + /* begin genLowcodeLoadArgumentInt16 */ + baseOffset3 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult10 = NoReg; + rResult10 = allocateRegNotConflictingWith(0); + assert(!((rResult10 == NoReg))); + value12 = rResult10; + + loadNativeArgumentAddressto(baseOffset3, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value12); + if (usesOutOfLineLiteral(anInstruction22)) { + (anInstruction22->dependent = locateLiteral(0)); + } + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value12, value12); + ssPushNativeRegister(value12); + extA = 0; + return 0; case 93: - return genLowcodeLoadArgumentInt32(); + /* begin genLowcodeLoadArgumentInt32 */ + baseOffset4 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult11 = NoReg; + rResult11 = allocateRegNotConflictingWith(0); + assert(!((rResult11 == NoReg))); + value13 = rResult11; + + loadNativeArgumentAddressto(baseOffset4, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value13); + if (usesOutOfLineLiteral(anInstruction23)) { + (anInstruction23->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value13); + extA = 0; + return 0; case 94: - return genLowcodeLoadArgumentInt64(); + /* begin genLowcodeLoadArgumentInt64 */ + baseOffset20 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult29 = (rResult210 = NoReg); + rResult29 = allocateRegNotConflictingWith(0); + rResult210 = allocateRegNotConflictingWith(1U << rResult29); + assert(!(((rResult29 == NoReg) + || (rResult210 == NoReg)))); + valueLow4 = rResult29; + valueHigh4 = rResult210; + + loadNativeArgumentAddressto(baseOffset20, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow4); + if (usesOutOfLineLiteral(anInstruction24)) { + (anInstruction24->dependent = locateLiteral(0)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction110 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh4); + if (usesOutOfLineLiteral(anInstruction110)) { + (anInstruction110->dependent = locateLiteral(4)); + } + ssPushNativeRegistersecondRegister(valueLow4, valueHigh4); + + extA = 0; + return 0; case 95: - return genLowcodeLoadArgumentInt8(); + /* begin genLowcodeLoadArgumentInt8 */ + baseOffset5 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult12 = NoReg; + rResult12 = allocateRegNotConflictingWith(0); + assert(!((rResult12 == NoReg))); + value14 = rResult12; + + loadNativeArgumentAddressto(baseOffset5, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value14); + if (usesOutOfLineLiteral(anInstruction26)) { + (anInstruction26->dependent = locateLiteral(0)); + } + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value14, value14); + ssPushNativeRegister(value14); + extA = 0; + return 0; case 96: - return genLowcodeLoadArgumentPointer(); + /* begin genLowcodeLoadArgumentPointer */ + baseOffset6 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult13 = NoReg; + rResult13 = allocateRegNotConflictingWith(0); + assert(!((rResult13 == NoReg))); + pointerResult = rResult13; + + loadNativeArgumentAddressto(baseOffset6, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction27 = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); + if (usesOutOfLineLiteral(anInstruction27)) { + (anInstruction27->dependent = locateLiteral(0)); + } + ssPushNativeRegister(pointerResult); + extA = 0; + return 0; case 97: - return genLowcodeLoadArgumentUInt16(); + /* begin genLowcodeLoadArgumentUInt16 */ + baseOffset7 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult14 = NoReg; + rResult14 = allocateRegNotConflictingWith(0); + assert(!((rResult14 == NoReg))); + value15 = rResult14; + + loadNativeArgumentAddressto(baseOffset7, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction28 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value15); + if (usesOutOfLineLiteral(anInstruction28)) { + (anInstruction28->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value15); + extA = 0; + return 0; case 98: - return genLowcodeLoadArgumentUInt32(); + /* begin genLowcodeLoadArgumentUInt32 */ + baseOffset8 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult15 = NoReg; + rResult15 = allocateRegNotConflictingWith(0); + assert(!((rResult15 == NoReg))); + value16 = rResult15; + + loadNativeArgumentAddressto(baseOffset8, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value16); + if (usesOutOfLineLiteral(anInstruction29)) { + (anInstruction29->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value16); + extA = 0; + return 0; case 99: - return genLowcodeLoadArgumentUInt64(); + /* begin genLowcodeLoadArgumentUInt64 */ + baseOffset21 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult30 = (rResult211 = NoReg); + rResult30 = allocateRegNotConflictingWith(0); + rResult211 = allocateRegNotConflictingWith(1U << rResult30); + assert(!(((rResult30 == NoReg) + || (rResult211 == NoReg)))); + valueLow5 = rResult30; + valueHigh5 = rResult211; + + loadNativeArgumentAddressto(baseOffset21, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction30 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow5); + if (usesOutOfLineLiteral(anInstruction30)) { + (anInstruction30->dependent = locateLiteral(0)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction111 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh5); + if (usesOutOfLineLiteral(anInstruction111)) { + (anInstruction111->dependent = locateLiteral(4)); + } + ssPushNativeRegistersecondRegister(valueLow5, valueHigh5); + + extA = 0; + return 0; case 100: - return genLowcodeLoadArgumentUInt8(); + /* begin genLowcodeLoadArgumentUInt8 */ + baseOffset9 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult16 = NoReg; + rResult16 = allocateRegNotConflictingWith(0); + assert(!((rResult16 == NoReg))); + value17 = rResult16; + + loadNativeArgumentAddressto(baseOffset9, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value17); + if (usesOutOfLineLiteral(anInstruction31)) { + (anInstruction31->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value17); + extA = 0; + return 0; case 101: - return genLowcodeLoadFloat32FromMemory(); + /* begin genLowcodeLoadFloat32FromMemory */ + rTop22 = NoReg; + frResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop22 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(0); + } + frResult6 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop22 == NoReg) + || (frResult6 == NoReg)))); + pointer1 = rTop22; + value18 = frResult6; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperandoperand(MoveM32rRs, 0, pointer1, value18); + if (usesOutOfLineLiteral(anInstruction32)) { + (anInstruction32->dependent = locateLiteral(0)); + } + ssPushNativeRegisterSingleFloat(value18); + return 0; case 102: - return genLowcodeLoadFloat64FromMemory(); + /* begin genLowcodeLoadFloat64FromMemory */ + rTop23 = NoReg; + frResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop23 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop23 == NoReg) { + rTop23 = allocateRegNotConflictingWith(0); + } + frResult7 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop23 == NoReg) + || (frResult7 == NoReg)))); + pointer2 = rTop23; + value19 = frResult7; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction33 = genoperandoperandoperand(MoveM64rRd, 0, pointer2, value19); + if (usesOutOfLineLiteral(anInstruction33)) { + (anInstruction33->dependent = locateLiteral(0)); + } + ssPushNativeRegisterDoubleFloat(value19); + return 0; case 103: - return genLowcodeLoadInt16FromMemory(); + /* begin genLowcodeLoadInt16FromMemory */ + rTop24 = NoReg; + rResult17 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop24 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(1U << rTop24); + assert(!(((rTop24 == NoReg) + || (rResult17 == NoReg)))); + pointer3 = rTop24; + value20 = rResult17; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction34 = genoperandoperandoperand(MoveM16rR, 0, pointer3, value20); + if (usesOutOfLineLiteral(anInstruction34)) { + (anInstruction34->dependent = locateLiteral(0)); + } + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value20, value20); + ssPushNativeRegister(value20); + return 0; case 104: - return genLowcodeLoadInt32FromMemory(); + /* begin genLowcodeLoadInt32FromMemory */ + rTop25 = NoReg; + rResult18 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop25 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + rResult18 = allocateRegNotConflictingWith(1U << rTop25); + assert(!(((rTop25 == NoReg) + || (rResult18 == NoReg)))); + pointer4 = rTop25; + value21 = rResult18; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction35 = genoperandoperandoperand(MoveM32rR, 0, pointer4, value21); + if (usesOutOfLineLiteral(anInstruction35)) { + (anInstruction35->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value21); + return 0; case 105: - return genLowcodeLoadInt64FromMemory(); + /* begin genLowcodeLoadInt64FromMemory */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop30 = NoReg; + rResult31 = (rResult31 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop30 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop30 == NoReg) { + rTop30 = allocateRegNotConflictingWith(0); + } + rResult31 = allocateRegNotConflictingWith(1U << rTop30); + rResult212 = allocateRegNotConflictingWith((1U << rTop30) | (1U << rResult31)); + assert(!(((rTop30 == NoReg) + || ((rResult31 == NoReg) + || (rResult212 == NoReg))))); + pointer8 = rTop30; + valueLow6 = rResult31; + valueHigh6 = rResult212; + + nativePopToReg(ssNativeTop(), pointer8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction36 = genoperandoperandoperand(MoveM32rR, 0, pointer8, valueLow6); + if (usesOutOfLineLiteral(anInstruction36)) { + (anInstruction36->dependent = locateLiteral(0)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction112 = genoperandoperandoperand(MoveM32rR, 4, pointer8, valueHigh6); + if (usesOutOfLineLiteral(anInstruction112)) { + (anInstruction112->dependent = locateLiteral(4)); + } + ssPushNativeRegistersecondRegister(valueLow6, valueHigh6); + + return 0; case 106: - return genLowcodeLoadInt8FromMemory(); + /* begin genLowcodeLoadInt8FromMemory */ + rTop26 = NoReg; + rResult19 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop26 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(0); + } + rResult19 = allocateRegNotConflictingWith(1U << rTop26); + assert(!(((rTop26 == NoReg) + || (rResult19 == NoReg)))); + pointer5 = rTop26; + value22 = rResult19; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction37 = genoperandoperandoperand(MoveM8rR, 0, pointer5, value22); + if (usesOutOfLineLiteral(anInstruction37)) { + (anInstruction37->dependent = locateLiteral(0)); + } + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value22, value22); + ssPushNativeRegister(value22); + return 0; case 107: - return genLowcodeLoadLocalAddress(); + /* begin genLowcodeLoadLocalAddress */ + baseOffset10 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult20 = NoReg; + rResult20 = allocateRegNotConflictingWith(0); + assert(!((rResult20 == NoReg))); + pointer6 = rResult20; + + loadNativeLocalAddressto(baseOffset10, pointer6); + ssPushNativeRegister(pointer6); + extA = 0; + return 0; case 108: - return genLowcodeLoadLocalFloat32(); + /* begin genLowcodeLoadLocalFloat32 */ + baseOffset11 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult8 = NoReg; + frResult8 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult8 == NoReg))); + floatValue6 = frResult8; + + loadNativeLocalAddressto(baseOffset11, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction38 = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue6); + if (usesOutOfLineLiteral(anInstruction38)) { + (anInstruction38->dependent = locateLiteral(0)); + } + ssPushNativeRegisterSingleFloat(floatValue6); + extA = 0; + return 0; case 109: - return genLowcodeLoadLocalFloat64(); + /* begin genLowcodeLoadLocalFloat64 */ + baseOffset12 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult9 = NoReg; + frResult9 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult9 == NoReg))); + doubleValue1 = frResult9; + + loadNativeLocalAddressto(baseOffset12, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction39 = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue1); + if (usesOutOfLineLiteral(anInstruction39)) { + (anInstruction39->dependent = locateLiteral(0)); + } + ssPushNativeRegisterDoubleFloat(doubleValue1); + extA = 0; + return 0; case 110: - return genLowcodeLoadLocalInt16(); + /* begin genLowcodeLoadLocalInt16 */ + baseOffset13 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult21 = NoReg; + rResult21 = allocateRegNotConflictingWith(0); + assert(!((rResult21 == NoReg))); + value23 = rResult21; + + loadNativeLocalAddressto(baseOffset13, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction40 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value23); + if (usesOutOfLineLiteral(anInstruction40)) { + (anInstruction40->dependent = locateLiteral(0)); + } + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value23, value23); + ssPushNativeRegister(value23); + extA = 0; + return 0; case 111: - return genLowcodeLoadLocalInt32(); + /* begin genLowcodeLoadLocalInt32 */ + baseOffset14 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult22 = NoReg; + rResult22 = allocateRegNotConflictingWith(0); + assert(!((rResult22 == NoReg))); + value24 = rResult22; + + loadNativeLocalAddressto(baseOffset14, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction41 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value24); + if (usesOutOfLineLiteral(anInstruction41)) { + (anInstruction41->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value24); + extA = 0; + return 0; case 112: - return genLowcodeLoadLocalInt64(); + /* begin genLowcodeLoadLocalInt64 */ + baseOffset22 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult32 = (rResult213 = NoReg); + rResult32 = allocateRegNotConflictingWith(0); + rResult213 = allocateRegNotConflictingWith(1U << rResult32); + assert(!(((rResult32 == NoReg) + || (rResult213 == NoReg)))); + valueLow7 = rResult32; + valueHigh7 = rResult213; + + loadNativeLocalAddressto(baseOffset22, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction42 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow7); + if (usesOutOfLineLiteral(anInstruction42)) { + (anInstruction42->dependent = locateLiteral(0)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction113 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh7); + if (usesOutOfLineLiteral(anInstruction113)) { + (anInstruction113->dependent = locateLiteral(4)); + } + ssPushNativeRegistersecondRegister(valueLow7, valueHigh7); + + extA = 0; + return 0; case 113: - return genLowcodeLoadLocalInt8(); + /* begin genLowcodeLoadLocalInt8 */ + baseOffset15 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult23 = NoReg; + rResult23 = allocateRegNotConflictingWith(0); + assert(!((rResult23 == NoReg))); + value25 = rResult23; + + loadNativeLocalAddressto(baseOffset15, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction43 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value25); + if (usesOutOfLineLiteral(anInstruction43)) { + (anInstruction43->dependent = locateLiteral(0)); + } + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value25, value25); + ssPushNativeRegister(value25); + extA = 0; + return 0; case 114: - return genLowcodeLoadLocalPointer(); + /* begin genLowcodeLoadLocalPointer */ + baseOffset16 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult24 = NoReg; + rResult24 = allocateRegNotConflictingWith(0); + assert(!((rResult24 == NoReg))); + pointerResult1 = rResult24; + + loadNativeLocalAddressto(baseOffset16, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction44 = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult1); + if (usesOutOfLineLiteral(anInstruction44)) { + (anInstruction44->dependent = locateLiteral(0)); + } + ssPushNativeRegister(pointerResult1); + extA = 0; + return 0; case 115: - return genLowcodeLoadLocalUInt16(); + /* begin genLowcodeLoadLocalUInt16 */ + baseOffset17 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult25 = NoReg; + rResult25 = allocateRegNotConflictingWith(0); + assert(!((rResult25 == NoReg))); + value26 = rResult25; + + loadNativeLocalAddressto(baseOffset17, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction45 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value26); + if (usesOutOfLineLiteral(anInstruction45)) { + (anInstruction45->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value26); + extA = 0; + return 0; case 116: - return genLowcodeLoadLocalUInt32(); + /* begin genLowcodeLoadLocalUInt32 */ + baseOffset18 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult26 = NoReg; + rResult26 = allocateRegNotConflictingWith(0); + assert(!((rResult26 == NoReg))); + value27 = rResult26; + + loadNativeLocalAddressto(baseOffset18, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction46 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value27); + if (usesOutOfLineLiteral(anInstruction46)) { + (anInstruction46->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value27); + extA = 0; + return 0; case 117: - return genLowcodeLoadLocalUInt64(); + /* begin genLowcodeLoadLocalUInt64 */ + baseOffset23 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult33 = (rResult214 = NoReg); + rResult33 = allocateRegNotConflictingWith(0); + rResult214 = allocateRegNotConflictingWith(1U << rResult33); + assert(!(((rResult33 == NoReg) + || (rResult214 == NoReg)))); + valueLow8 = rResult33; + valueHigh8 = rResult214; + + loadNativeLocalAddressto(baseOffset23, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction47 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow8); + if (usesOutOfLineLiteral(anInstruction47)) { + (anInstruction47->dependent = locateLiteral(0)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction114 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh8); + if (usesOutOfLineLiteral(anInstruction114)) { + (anInstruction114->dependent = locateLiteral(4)); + } + ssPushNativeRegistersecondRegister(valueLow8, valueHigh8); + + extA = 0; + return 0; case 118: - return genLowcodeLoadLocalUInt8(); + /* begin genLowcodeLoadLocalUInt8 */ + baseOffset19 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult27 = NoReg; + rResult27 = allocateRegNotConflictingWith(0); + assert(!((rResult27 == NoReg))); + value28 = rResult27; + + loadNativeLocalAddressto(baseOffset19, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction48 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value28); + if (usesOutOfLineLiteral(anInstruction48)) { + (anInstruction48->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value28); + extA = 0; + return 0; case 119: - return genLowcodeLoadObjectAt(); + /* begin genLowcodeLoadObjectAt */ + rTop27 = (rOopTop = NoReg); + topRegisterMask = 0; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask = 1U << rOopTop; + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(topRegisterMask); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(1U << rTop27); + } + assert(!(((rTop27 == NoReg) + || (rOopTop == NoReg)))); + fieldIndex = rTop27; + object = rOopTop; + + nativePopToReg(ssNativeTop(), fieldIndex); + ssNativePop(1); + popToReg(ssTop(), object); + ssPop(1); + genLcLoadObjectat(object, fieldIndex); + return 0; default: return genLowcodeUnaryInlinePrimitive3(prim); @@ -39361,187 +33880,1671 @@ genLowcodeUnaryInlinePrimitive2(sqInt prim) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive3(sqInt prim) { + AbstractInstruction *abstractInstruction; + AbstractInstruction *abstractInstruction1; + AbstractInstruction *abstractInstruction11; + AbstractInstruction *abstractInstruction2; + AbstractInstruction *abstractInstruction3; + AbstractInstruction *abstractInstruction4; + sqInt address; + sqInt address1; + sqInt alignedSize; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction41; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt base; + sqInt base1; + sqInt base2; + sqInt baseValue; + sqInt baseValue1; + sqInt baseValue2; + sqInt constant; + sqInt constant1; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + sqInt dest; + sqInt dest1; + sqInt dest2; + sqInt destValue; + sqInt destValue1; + sqInt destValue2; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + sqInt fieldIndex; + sqInt first; + sqInt first1; + sqInt first2; + sqInt first4; + sqInt first5; + sqInt firstHigh1; + sqInt firstHighValue; + sqInt firstLow1; + sqInt firstLowValue; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue2; + sqInt firstValue4; + sqInt firstValue5; + sqInt frTop; + sqInt frTop1; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt nativeValueIndex2; + sqInt nativeValueIndex3; + sqInt object; + sqInt objectValue; + sqInt offset; + sqInt offset1; + sqInt offset11; + sqInt offset21; + sqInt offset3; + sqInt offset4; + sqInt offsetHigh; + sqInt offsetHighValue; + sqInt offsetLow; + sqInt offsetLowValue; + sqInt offsetValue; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointer6; + sqInt pointer7; + sqInt pointer8; + sqInt pointerResult; + sqInt pointerResultValue; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValue8; + sqInt pointerValue9; + sqInt pointerValueValue; + sqInt quickConstant; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg11; + sqInt reg111; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg2; + sqInt reg3; + sqInt reg4; + sqInt reg6; + sqInt reg8; + sqInt reg9; + sqInt registerID; + sqInt registerID1; + sqInt registerID2; + sqInt registerID3; + sqInt registerID4; + sqInt registerMask; + sqInt registerMask1; + sqInt registerMask2; + sqInt registerMask3; + sqInt result; + sqInt result1; + sqInt resultHigh1; + sqInt resultHighValue; + sqInt resultLow1; + sqInt resultLowValue; + sqInt resultValue; + sqInt resultValue1; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext2; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNext2; + sqInt rNextNext3; + sqInt rNextNextNext; + sqInt rOopTop; + sqInt rResult; + sqInt rResult1; + sqInt rResult2; + sqInt rResult21; + sqInt rResult22; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop13; + sqInt rTop15; + sqInt rTop16; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop31; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt second; + sqInt second1; + sqInt second2; + sqInt second4; + sqInt second5; + sqInt secondHigh1; + sqInt secondHighValue; + sqInt secondLow1; + sqInt secondLowValue; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue2; + sqInt secondValue4; + sqInt secondValue5; + sqInt size; + sqInt size1; + sqInt size3; + sqInt size4; + sqInt size5; + sqInt sizeHigh; + sqInt sizeHighValue; + sqInt sizeLow; + sqInt sizeLow1; + sqInt sizeLowValue; + sqInt sizeValue; + sqInt sizeValue2; + sqInt sizeValue3; + sqInt source; + sqInt source1; + sqInt source2; + sqInt sourceValue; + sqInt sourceValue1; + sqInt sourceValue2; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask13; + sqInt topRegistersMask2; + sqInt topRegistersMask3; + sqInt topRegistersMask4; + sqInt topRegistersMask6; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value2; + sqInt value3; + sqInt value5; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueHigh; + sqInt valueHigh1; + sqInt valueHigh3; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueLow; + sqInt valueLow1; + sqInt valueLow3; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue2; + sqInt valueValue3; + sqInt valueValue5; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + + sizeLow1 = 0; switch (prim) { case 120: - return genLowcodeLoadObjectField(); + /* begin genLowcodeLoadObjectField */ + fieldIndex = extA; + /* begin allocateRegistersForLowcodeOop: */ + rOopTop = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop == NoReg))); + object = rOopTop; + + popToReg(ssTop(), object); + ssPop(1); + genLcLoadObjectfield(object, fieldIndex); + extA = 0; + return 0; case 121: - return genLowcodeLoadPointerFromMemory(); + /* begin genLowcodeLoadPointerFromMemory */ + rTop = NoReg; + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rTop); + assert(!(((rTop == NoReg) + || (rResult == NoReg)))); + pointer = rTop; + pointerResult = rResult; + + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperandoperand(MoveMwrR, 0, pointer, pointerResult); + if (usesOutOfLineLiteral(anInstruction)) { + (anInstruction->dependent = locateLiteral(0)); + } + ssPushNativeRegister(pointerResult); + return 0; case 122: - return genLowcodeLoadUInt16FromMemory(); + /* begin genLowcodeLoadUInt16FromMemory */ + rTop1 = NoReg; + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop1 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1U << rTop1); + assert(!(((rTop1 == NoReg) + || (rResult1 == NoReg)))); + pointer1 = rTop1; + value = rResult1; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperandoperand(MoveM16rR, 0, pointer1, value); + if (usesOutOfLineLiteral(anInstruction1)) { + (anInstruction1->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value); + return 0; case 123: - return genLowcodeLoadUInt32FromMemory(); + /* begin genLowcodeLoadUInt32FromMemory */ + rTop2 = NoReg; + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop2 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(1U << rTop2); + assert(!(((rTop2 == NoReg) + || (rResult2 == NoReg)))); + pointer2 = rTop2; + value1 = rResult2; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperandoperand(MoveM32rR, 0, pointer2, value1); + if (usesOutOfLineLiteral(anInstruction2)) { + (anInstruction2->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value1); + return 0; case 0x7C: - return genLowcodeLoadUInt64FromMemory(); + /* begin genLowcodeLoadUInt64FromMemory */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop26 = NoReg; + rResult7 = (rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop26 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(0); + } + rResult7 = allocateRegNotConflictingWith(1U << rTop26); + rResult22 = allocateRegNotConflictingWith((1U << rTop26) | (1U << rResult7)); + assert(!(((rTop26 == NoReg) + || ((rResult7 == NoReg) + || (rResult22 == NoReg))))); + pointer6 = rTop26; + valueLow3 = rResult7; + valueHigh3 = rResult22; + + nativePopToReg(ssNativeTop(), pointer6); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperandoperand(MoveM32rR, 0, pointer6, valueLow3); + if (usesOutOfLineLiteral(anInstruction3)) { + (anInstruction3->dependent = locateLiteral(0)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperandoperand(MoveM32rR, 4, pointer6, valueHigh3); + if (usesOutOfLineLiteral(anInstruction11)) { + (anInstruction11->dependent = locateLiteral(4)); + } + ssPushNativeRegistersecondRegister(valueLow3, valueHigh3); + + return 0; case 125: - return genLowcodeLoadUInt8FromMemory(); + /* begin genLowcodeLoadUInt8FromMemory */ + rTop3 = NoReg; + rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop3 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rTop3); + assert(!(((rTop3 == NoReg) + || (rResult3 == NoReg)))); + pointer3 = rTop3; + value2 = rResult3; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperandoperand(MoveM8rR, 0, pointer3, value2); + if (usesOutOfLineLiteral(anInstruction4)) { + (anInstruction4->dependent = locateLiteral(0)); + } + ssPushNativeRegister(value2); + return 0; case 0x7E: - return genLowcodeLocalFrameSize(); + /* begin genLowcodeLocalFrameSize */ + size = extA; + assert(needsFrame); + + /* Align the size to 16 bytes. */ + hasNativeFrame = 1; + + /* Mark the stack frame */ + alignedSize = (size + 15) & -16; + annotateobjRef(gMoveCwR(splObj(LowcodeContextMark), TempReg), splObj(LowcodeContextMark)); + /* begin MoveR:Mw:r: */ + offset4 = frameOffsetOfNativeFrameMark(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperandoperand(MoveRMwr, TempReg, offset4, FPReg); + if (usesOutOfLineLiteral(anInstruction7)) { + (anInstruction7->dependent = locateLiteral(offset4)); + } + /* begin MoveAw:R: */ + address = nativeStackPointerAddress(); + /* begin gen:literal:operand: */ + checkLiteralforInstruction(address, genoperandoperand(MoveAwR, address, TempReg)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperand(AddCqR, 1, TempReg); + if (usesOutOfLineLiteral(anInstruction12)) { + (anInstruction12->dependent = locateLiteral(1)); + } + /* begin MoveR:Mw:r: */ + offset11 = frameOffsetOfPreviousNativeStackPointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperandoperand(MoveRMwr, TempReg, offset11, FPReg); + if (usesOutOfLineLiteral(anInstruction22)) { + (anInstruction22->dependent = locateLiteral(offset11)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperand(SubCqR, alignedSize, TempReg); + if (usesOutOfLineLiteral(anInstruction31)) { + (anInstruction31->dependent = locateLiteral(alignedSize)); + } + /* begin MoveR:Mw:r: */ + offset21 = frameOffsetOfNativeFramePointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction41 = genoperandoperandoperand(MoveRMwr, TempReg, offset21, FPReg); + if (usesOutOfLineLiteral(anInstruction41)) { + (anInstruction41->dependent = locateLiteral(offset21)); + } + /* begin MoveR:Mw:r: */ + offset3 = frameOffsetOfNativeStackPointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperandoperand(MoveRMwr, TempReg, offset3, FPReg); + if (usesOutOfLineLiteral(anInstruction5)) { + (anInstruction5->dependent = locateLiteral(offset3)); + } + /* begin SubCq:R: */ + quickConstant = 1 + (defaultNativeStackFrameSize()); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperand(SubCqR, quickConstant, TempReg); + if (usesOutOfLineLiteral(anInstruction6)) { + (anInstruction6->dependent = locateLiteral(quickConstant)); + } + /* begin MoveR:Aw: */ + address1 = nativeStackPointerAddress(); + /* begin gen:operand:literal: */ + checkLiteralforInstruction(address1, genoperandoperand(MoveRAw, TempReg, address1)); + extA = 0; + return 0; case 0x7F: - return genLowcodeLockRegisters(); + /* begin genLowcodeLockRegisters */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + return 0; case 128: - return genLowcodeLockVM(); + /* begin genLowcodeLockVM */ + abort(); + return 0; case 129: - return genLowcodeMalloc32(); + /* begin genLowcodeMalloc32 */ + rTop27 = NoReg; + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop27 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(0); + } + rResult8 = allocateRegNotConflictingWith(1U << rTop27); + assert(!(((rTop27 == NoReg) + || (rResult8 == NoReg)))); + size1 = rTop27; + pointer7 = rResult8; + + nativePopToReg(ssNativeTop(), size1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (size1 != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, size1, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction3 = genoperand(Call, ceMallocTrampoline); + (abstractInstruction3->annotation = IsRelativeCall); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, pointer7); + ssPushNativeRegister(pointer7); + return 0; case 130: - return genLowcodeMalloc64(); + /* begin genLowcodeMalloc64 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger: */ + topRegistersMask12 = 0; + rTop28 = (rNext10 = NoReg); + rResult9 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop28 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1U << reg10; + } + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(topRegistersMask12); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop28); + } + assert(!(((rTop28 == NoReg) + || (rNext10 == NoReg)))); + rResult9 = allocateFloatRegNotConflictingWith((1U << rTop28) | (1U << rNext10)); + assert(!((rResult9 == NoReg))); + sizeLow = rTop28; + sizeHigh = rNext10; + pointer8 = rResult9; + + nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (sizeLow != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, sizeLow, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction4 = genoperand(Call, ceMallocTrampoline); + (abstractInstruction4->annotation = IsRelativeCall); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, pointer8); + ssPushNativeRegister(pointer8); + + return 0; case 131: - return genLowcodeMemcpy32(); + /* begin genLowcodeMemcpy32 */ + rTop29 = (rNext13 = (rNextNext2 = NoReg)); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext13 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + } + if (rTop29 == NoReg) { + registerMask2 = 0; + if (rNext13 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rNext13; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rTop29 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext13 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rTop29; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rNext13 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1U << rTop29) | (1U << rNext13); + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop29 == NoReg) + || ((rNext13 == NoReg) + || (rNextNext2 == NoReg))))); + size3 = rTop29; + source = rNext13; + dest = rNextNext2; + + nativePopToReg(ssNativeTop(), size3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), source); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytosize(backEnd, source, dest, size3); + return 0; case 132: - return genLowcodeMemcpy64(); + /* begin genLowcodeMemcpy64 */ + rTop30 = (rNext14 = (rNextNext3 = NoReg)); + nativeValueIndex3 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop30 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNext14 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + } + } + if (rTop30 == NoReg) { + registerMask3 = 0; + if (rNext14 != NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rNext14; + } + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + rTop30 = allocateRegNotConflictingWith(registerMask3); + } + if (rNext14 == NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rTop30; + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + rNext14 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNext3 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask3 = (1U << rTop30) | (1U << rNext14); + rNextNext3 = allocateRegNotConflictingWith(registerMask3); + } + assert(!(((rTop30 == NoReg) + || ((rNext14 == NoReg) + || (rNextNext3 == NoReg))))); + size4 = rTop30; + source1 = rNext14; + dest1 = rNextNext3; + + nativePopToReg(ssNativeTop(), size4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), source1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytosize(backEnd, source1, dest1, sizeLow1); + return 0; case 133: - return genLowcodeMemcpyFixed(); + /* begin genLowcodeMemcpyFixed */ + size5 = extA; + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask13 = 0; + rTop31 = (rNext15 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop31 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext15 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1U << reg15; + } + } + if (rTop31 == NoReg) { + rTop31 = allocateRegNotConflictingWith(topRegistersMask13); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1U << rTop31); + } + assert(!(((rTop31 == NoReg) + || (rNext15 == NoReg)))); + source2 = rTop31; + dest2 = rNext15; + + nativePopToReg(ssNativeTop(), source2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest2); + ssNativePop(1); + if (size5 == BytesPerWord) { + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperandoperand(MoveMwrR, 0, source2, TempReg); + if (usesOutOfLineLiteral(anInstruction8)) { + (anInstruction8->dependent = locateLiteral(0)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperandoperand(MoveRMwr, TempReg, 0, dest2); + if (usesOutOfLineLiteral(anInstruction13)) { + (anInstruction13->dependent = locateLiteral(0)); + } + } + else { + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytoconstantSize(backEnd, source2, dest2, size5); + } + extA = 0; + return 0; case 134: - return genLowcodeMoveFloat32ToPhysical(); + /* begin genLowcodeMoveFloat32ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 135: - return genLowcodeMoveFloat64ToPhysical(); + /* begin genLowcodeMoveFloat64ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += 8; + extA = 0; + return 0; case 136: - return genLowcodeMoveInt32ToPhysical(); + /* begin genLowcodeMoveInt32ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 137: - return genLowcodeMoveInt64ToPhysical(); + /* begin genLowcodeMoveInt64ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += 8; + extA = 0; + return 0; case 138: - return genLowcodeMovePointerToPhysical(); + /* begin genLowcodeMovePointerToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 139: - return genLowcodeMul32(); + /* begin genLowcodeMul32 */ + topRegistersMask = 0; + rTop4 = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext == NoReg)))); + second = rTop4; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, second, first); + ssPushNativeRegister(first); + return 0; case 140: - return genLowcodeMul64(); + /* begin genLowcodeMul64 */ + topRegistersMask1 = 0; + rTop5 = (rNext1 = NoReg); + rResult4 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop5 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext1 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg1; + } + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop5); + } + assert(!(((rTop5 == NoReg) + || (rNext1 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop5) | (1U << rNext1)); + assert(!((rResult4 == NoReg))); + second1 = rTop5; + first1 = rNext1; + result = rResult4; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + abort(); + return 0; case 141: - return genLowcodeNeg32(); + /* begin genLowcodeNeg32 */ + rTop6 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + assert(!((rTop6 == NoReg))); + value3 = rTop6; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin NegateR: */ + genoperand(NegateR, value3); + ssPushNativeRegister(value3); + return 0; case 142: - return genLowcodeNeg64(); + /* begin genLowcodeNeg64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask2 = 0; + rTop7 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop7 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop7); + } + assert(!(((rTop7 == NoReg) + || (rNext2 == NoReg)))); + valueLow = rTop7; + valueHigh = rNext2; + + nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, valueLow); + /* begin NotR: */ + genoperand(NotR, valueHigh); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperand(AddCqR, 1, valueLow); + if (usesOutOfLineLiteral(anInstruction9)) { + (anInstruction9->dependent = locateLiteral(1)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperand(AddcCqR, 0, valueHigh); + if (usesOutOfLineLiteral(anInstruction10)) { + (anInstruction10->dependent = locateLiteral(0)); + } + ssPushNativeRegistersecondRegister(valueLow, valueHigh); + + return 0; case 143: - return genLowcodeNot32(); + /* begin genLowcodeNot32 */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value5 = rTop8; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, value5); + ssPushNativeRegister(value5); + return 0; case 144: - return genLowcodeNot64(); + /* begin genLowcodeNot64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask3 = 0; + rTop9 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg3; + } + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop9); + } + assert(!(((rTop9 == NoReg) + || (rNext3 == NoReg)))); + valueLow1 = rTop9; + valueHigh1 = rNext3; + + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, valueLow1); + /* begin NotR: */ + genoperand(NotR, valueHigh1); + ssPushNativeRegistersecondRegister(valueLow1, valueHigh1); + + return 0; case 145: - return genLowcodeOr32(); + /* begin genLowcodeOr32 */ + topRegistersMask4 = 0; + rTop10 = (rNext4 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext4 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1U << reg4; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext4 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop10) | (1U << rNext4)); + assert(!((rResult5 == NoReg))); + second2 = rTop10; + first2 = rNext4; + result1 = rResult5; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 146: - return genLowcodeOr64(); + /* begin genLowcodeOr64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop13 = (rNext5 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop13 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext5 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop13 == NoReg) { + registerMask = 0; + if (rNext5 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext5; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop13 = allocateRegNotConflictingWith(registerMask); + } + if (rNext5 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop13; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext5 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop13) | (1U << rNext5); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop13) | (1U << rNext5)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop13 == NoReg) + || ((rNext5 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow1 = rTop13; + secondHigh1 = rNext5; + firstLow1 = rNextNext; + firstHigh1 = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow1, secondHigh1); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow1, firstHigh1); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, secondLow1, firstLow1); + /* begin OrR:R: */ + genoperandoperand(OrRR, secondHigh1, firstHigh1); + ssPushNativeRegistersecondRegister(firstLow1, firstHigh1); + + return 0; case 147: - return genLowcodePerformCallout(); + /* begin genLowcodePerformCallout */ + callSwitchToCStack(); + /* begin MoveCw:R: */ + checkLiteralforInstruction(extA, genoperandoperand(MoveCwR, extA, TempReg)); + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + /* begin annotateBytecode: */ + abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); + (abstractInstruction1->annotation = HasBytecodePC); + extA = 0; + return 0; case 148: - return genLowcodePerformCalloutIndirect(); + /* begin genLowcodePerformCalloutIndirect */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + callSwitchToCStack(); + /* begin CallRT: */ + abstractInstruction2 = genoperand(Call, ceFFICalloutTrampoline); + (abstractInstruction2->annotation = IsRelativeCall); + /* begin annotateBytecode: */ + abstractInstruction11 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); + (abstractInstruction11->annotation = HasBytecodePC); + return 0; case 149: - return genLowcodePushCalloutResultFloat32(); + /* begin genLowcodePushCalloutResultFloat32 */ + cFloatResultToRs(backEnd, DPFPReg0); + ssPushNativeRegisterSingleFloat(DPFPReg0); + return 0; case 150: - return genLowcodePushCalloutResultFloat64(); + /* begin genLowcodePushCalloutResultFloat64 */ + cFloatResultToRd(backEnd, DPFPReg0); + ssPushNativeRegisterDoubleFloat(DPFPReg0); + return 0; case 151: - return genLowcodePushCalloutResultInt32(); + /* begin genLowcodePushCalloutResultInt32 */ + reg11 = R0; + genoperandoperand(MoveRR, reg11, ReceiverResultReg); + ssPushNativeRegister(ReceiverResultReg); + return 0; case 152: - return genLowcodePushCalloutResultInt64(); + /* begin genLowcodePushCalloutResultInt64 */ + /* begin MoveR:R: */ + reg13 = cResultRegisterLow(backEnd); + genoperandoperand(MoveRR, reg13, ReceiverResultReg); + /* begin MoveR:R: */ + reg111 = cResultRegisterHigh(backEnd); + genoperandoperand(MoveRR, reg111, Arg0Reg); + ssPushNativeRegistersecondRegister(ReceiverResultReg, Arg0Reg); + + return 0; case 153: - return genLowcodePushCalloutResultPointer(); + /* begin genLowcodePushCalloutResultPointer */ + reg14 = R0; + genoperandoperand(MoveRR, reg14, ReceiverResultReg); + ssPushNativeRegister(ReceiverResultReg); + return 0; case 161: - return genLowcodePlaftormCode(); + /* begin genLowcodePlaftormCode */ + abort(); + return 0; case 162: - return genLowcodePointerAddConstantOffset(); + /* begin genLowcodePointerAddConstantOffset */ + offset = extB; + /* begin allocateRegistersForLowcodeInteger: */ + rTop15 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(0); + } + assert(!((rTop15 == NoReg))); + base = rTop15; + + nativePopToReg(ssNativeTop(), base); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperand(AddCqR, offset, base); + if (usesOutOfLineLiteral(anInstruction14)) { + (anInstruction14->dependent = locateLiteral(offset)); + } + ssPushNativeRegister(base); + extB = 0; + numExtB = 0; + return 0; case 163: - return genLowcodePointerAddOffset32(); + /* begin genLowcodePointerAddOffset32 */ + topRegistersMask6 = 0; + rTop16 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop16 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg6; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1U << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext6 == NoReg)))); + offset1 = rTop16; + base1 = rNext6; + + nativePopToReg(ssNativeTop(), offset1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base1); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, offset1, base1); + ssPushNativeRegister(base1); + return 0; case 164: - return genLowcodePointerAddOffset64(); + /* begin genLowcodePointerAddOffset64 */ + /* begin allocateRegistersForLowcodeInteger3: */ + rTop18 = (rNext7 = (rNextNext1 = NoReg)); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext7 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext7 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + } + if (rTop18 == NoReg) { + registerMask1 = 0; + if (rNext7 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext7; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rTop18 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext7 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop18; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rNext7 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop18) | (1U << rNext7); + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop18 == NoReg) + || ((rNext7 == NoReg) + || (rNextNext1 == NoReg))))); + offsetLow = rTop18; + offsetHigh = rNext7; + base2 = rNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), offsetLow, offsetHigh); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base2); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, offsetLow, base2); + ssPushNativeRegister(base2); + + return 0; case 165: - return genLowcodePointerEqual(); + /* begin genLowcodePointerEqual */ + topRegistersMask8 = 0; + rTop19 = (rNext8 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg8; + } + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1U << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext8 == NoReg)))); + second4 = rTop19; + first4 = rNext8; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second4, first4); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperand(MoveCqR, 1, first4); + if (usesOutOfLineLiteral(anInstruction15)) { + (anInstruction15->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCqR, 0, first4); + if (usesOutOfLineLiteral(anInstruction16)) { + (anInstruction16->dependent = locateLiteral(0)); + } + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first4); + return 0; case 166: - return genLowcodePointerNotEqual(); + /* begin genLowcodePointerNotEqual */ + topRegistersMask9 = 0; + rTop20 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1U << reg9; + } + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext9 == NoReg)))); + second5 = rTop20; + first5 = rNext9; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second5, first5); + /* begin JumpZero: */ + falseJump1 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(MoveCqR, 1, first5); + if (usesOutOfLineLiteral(anInstruction17)) { + (anInstruction17->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperand(MoveCqR, 0, first5); + if (usesOutOfLineLiteral(anInstruction18)) { + (anInstruction18->dependent = locateLiteral(0)); + } + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first5); + return 0; case 167: - return genLowcodePointerToInt32(); + /* begin genLowcodePointerToInt32 */ + rTop21 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(0); + } + assert(!((rTop21 == NoReg))); + pointer4 = rTop21; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + ssPushNativeRegister(pointer4); + return 0; case 168: - return genLowcodePointerToInt64(); + /* begin genLowcodePointerToInt64 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop22 = NoReg; + rResult6 = (rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop22 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(0); + } + rResult6 = allocateRegNotConflictingWith(1U << rTop22); + rResult21 = allocateRegNotConflictingWith((1U << rTop22) | (1U << rResult6)); + assert(!(((rTop22 == NoReg) + || ((rResult6 == NoReg) + || (rResult21 == NoReg))))); + pointer5 = rTop22; + resultLow1 = rResult6; + resultHigh1 = rResult21; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointer5, resultLow1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperand(MoveCqR, 0, resultHigh1); + if (usesOutOfLineLiteral(anInstruction19)) { + (anInstruction19->dependent = locateLiteral(0)); + } + ssPushNativeRegistersecondRegister(resultLow1, resultHigh1); + + return 0; case 169: - return genLowcodePopFloat32(); + /* begin genLowcodePopFloat32 */ + topRegistersMask10 = 0; + frTop = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + assert(!((frTop == NoReg))); + value7 = frTop; + + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + return 0; case 170: - return genLowcodePopFloat64(); + /* begin genLowcodePopFloat64 */ + topRegistersMask11 = 0; + frTop1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(topRegistersMask11); + } + assert(!((frTop1 == NoReg))); + value8 = frTop1; + + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + return 0; case 171: - return genLowcodePopInt32(); + /* begin genLowcodePopInt32 */ + rTop23 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop23 == NoReg) { + rTop23 = allocateRegNotConflictingWith(0); + } + assert(!((rTop23 == NoReg))); + value9 = rTop23; + + nativePopToReg(ssNativeTop(), value9); + ssNativePop(1); + return 0; case 172: - return genLowcodePopInt64(); + /* begin genLowcodePopInt64 */ + rTop24 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + assert(!((rTop24 == NoReg))); + value10 = rTop24; + + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + return 0; case 173: - return genLowcodePopMultipleNative(); + /* begin genLowcodePopMultipleNative */ + ssPopNativeSize(extA); + extA = 0; + return 0; case 174: - return genLowcodePopPointer(); + /* begin genLowcodePopPointer */ + rTop25 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + assert(!((rTop25 == NoReg))); + pointerValue6 = rTop25; + + nativePopToReg(ssNativeTop(), pointerValue6); + ssNativePop(1); + return 0; case 175: - return genLowcodePushConstantUInt32(); + /* begin genLowcodePushConstantUInt32 */ + constant = extA; + ssPushNativeConstantInt32(constant); + extA = 0; + return 0; case 176: - return genLowcodePushConstantUInt64(); + /* begin genLowcodePushConstantUInt64 */ + constant1 = extA; + ssPushNativeConstantInt64(constant1); + extA = 0; + return 0; case 177: - return genLowcodePushNullPointer(); + /* begin genLowcodePushNullPointer */ + ssPushNativeConstantPointer(0); + return 0; case 178: - return genLowcodePushOne32(); + /* begin genLowcodePushOne32 */ + ssPushNativeConstantInt32(1); + return 0; case 179: - return genLowcodePushOne64(); + /* begin genLowcodePushOne64 */ + ssPushNativeConstantInt64(1); + return 0; case 180: - return genLowcodePushOneFloat32(); + /* begin genLowcodePushOneFloat32 */ + ssPushNativeConstantFloat32(1.0); + return 0; case 181: - return genLowcodePushOneFloat64(); + /* begin genLowcodePushOneFloat64 */ + ssPushNativeConstantFloat64(1.0); + return 0; case 182: - return genLowcodePushPhysicalFloat32(); + /* begin genLowcodePushPhysicalFloat32 */ + registerID = extA; + abort(); + extA = 0; + return 0; case 183: - return genLowcodePushPhysicalFloat64(); + /* begin genLowcodePushPhysicalFloat64 */ + registerID1 = extA; + abort(); + extA = 0; + return 0; case 184: - return genLowcodePushPhysicalInt32(); + /* begin genLowcodePushPhysicalInt32 */ + registerID2 = extA; + abort(); + extA = 0; + return 0; case 185: - return genLowcodePushPhysicalInt64(); + /* begin genLowcodePushPhysicalInt64 */ + registerID3 = extA; + abort(); + extA = 0; + return 0; case 186: - return genLowcodePushPhysicalPointer(); + /* begin genLowcodePushPhysicalPointer */ + registerID4 = extA; + abort(); + extA = 0; + return 0; default: return genLowcodeUnaryInlinePrimitive4(prim); @@ -39557,187 +35560,2522 @@ genLowcodeUnaryInlinePrimitive3(sqInt prim) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive4(sqInt prim) { + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction25; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction33; + AbstractInstruction *anInstruction34; + AbstractInstruction *anInstruction35; + AbstractInstruction *anInstruction36; + AbstractInstruction *anInstruction37; + AbstractInstruction *anInstruction38; + AbstractInstruction *anInstruction39; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt baseOffset; + sqInt baseOffset1; + sqInt baseOffset2; + sqInt baseOffset3; + sqInt baseOffset4; + sqInt baseOffset5; + sqInt baseOffset6; + AbstractInstruction * cont; + AbstractInstruction * cont1; + AbstractInstruction * cont2; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + sqInt doubleValue; + sqInt doubleValueValue; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump3; + sqInt first; + sqInt first1; + sqInt first10; + sqInt first11; + sqInt first12; + sqInt first13; + sqInt first14; + sqInt first15; + sqInt first16; + sqInt first17; + sqInt first18; + sqInt first2; + sqInt first4; + sqInt first5; + sqInt first6; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstHigh1; + sqInt firstHigh9; + sqInt firstHighValue; + sqInt firstHighValue1; + sqInt firstLow1; + sqInt firstLow9; + sqInt firstLowValue; + sqInt firstLowValue1; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue10; + sqInt firstValue11; + sqInt firstValue12; + sqInt firstValue13; + sqInt firstValue14; + sqInt firstValue15; + sqInt firstValue16; + sqInt firstValue17; + sqInt firstValue18; + sqInt firstValue2; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue6; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt floatValue; + sqInt floatValueValue; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frTop; + sqInt frTop1; + sqInt frTop2; + sqInt frTop3; + AbstractInstruction * isNegative; + AbstractInstruction * isNegative1; + AbstractInstruction * isNegative2; + sqInt memoryPointer; + sqInt memoryPointerValue; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt nativeValueIndex2; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValueValue; + sqInt pointerValueValue1; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg16; + sqInt reg17; + sqInt reg18; + sqInt reg19; + sqInt reg2; + sqInt reg20; + sqInt reg21; + sqInt reg22; + sqInt reg23; + sqInt reg24; + sqInt reg25; + sqInt reg26; + sqInt reg28; + sqInt reg29; + sqInt reg3; + sqInt reg30; + sqInt reg31; + sqInt reg33; + sqInt reg4; + sqInt reg5; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerMask; + sqInt registerMask1; + sqInt registerMask2; + sqInt result; + sqInt result1; + sqInt result10; + sqInt result11; + sqInt result4; + sqInt result5; + sqInt result6; + sqInt result7; + sqInt result8; + sqInt result9; + sqInt resultHigh2; + sqInt resultHigh3; + sqInt resultHighValue; + sqInt resultHighValue1; + sqInt resultLow2; + sqInt resultLow3; + sqInt resultLowValue; + sqInt resultLowValue1; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue10; + sqInt resultValue11; + sqInt resultValue4; + sqInt resultValue5; + sqInt resultValue6; + sqInt resultValue7; + sqInt resultValue8; + sqInt resultValue9; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext11; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext17; + sqInt rNext18; + sqInt rNext19; + sqInt rNext2; + sqInt rNext20; + sqInt rNext21; + sqInt rNext22; + sqInt rNext23; + sqInt rNext24; + sqInt rNext25; + sqInt rNext26; + sqInt rNext27; + sqInt rNext28; + sqInt rNext29; + sqInt rNext3; + sqInt rNext30; + sqInt rNext31; + sqInt rNext32; + sqInt rNext33; + sqInt rNext34; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNext2; + sqInt rNextNextNext; + sqInt rNextNextNext1; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult14; + sqInt rResult15; + sqInt rResult2; + sqInt rResult21; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop14; + sqInt rTop15; + sqInt rTop16; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop31; + sqInt rTop32; + sqInt rTop33; + sqInt rTop34; + sqInt rTop35; + sqInt rTop36; + sqInt rTop37; + sqInt rTop38; + sqInt rTop39; + sqInt rTop4; + sqInt rTop40; + sqInt rTop41; + sqInt rTop42; + sqInt rTop43; + sqInt rTop44; + sqInt rTop45; + sqInt rTop46; + sqInt rTop47; + sqInt rTop48; + sqInt rTop49; + sqInt rTop5; + sqInt rTop50; + sqInt rTop51; + sqInt rTop52; + sqInt rTop53; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt second; + sqInt second1; + sqInt second10; + sqInt second11; + sqInt second12; + sqInt second13; + sqInt second14; + sqInt second15; + sqInt second16; + sqInt second17; + sqInt second18; + sqInt second2; + sqInt second4; + sqInt second5; + sqInt second6; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondHigh1; + sqInt secondHigh9; + sqInt secondHighValue; + sqInt secondHighValue1; + sqInt secondLow1; + sqInt secondLow9; + sqInt secondLowValue; + sqInt secondLowValue1; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue10; + sqInt secondValue11; + sqInt secondValue12; + sqInt secondValue13; + sqInt secondValue14; + sqInt secondValue15; + sqInt secondValue16; + sqInt secondValue17; + sqInt secondValue18; + sqInt secondValue2; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue6; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask16; + sqInt topRegistersMask17; + sqInt topRegistersMask18; + sqInt topRegistersMask19; + sqInt topRegistersMask2; + sqInt topRegistersMask20; + sqInt topRegistersMask21; + sqInt topRegistersMask22; + sqInt topRegistersMask23; + sqInt topRegistersMask24; + sqInt topRegistersMask25; + sqInt topRegistersMask26; + sqInt topRegistersMask27; + sqInt topRegistersMask28; + sqInt topRegistersMask3; + sqInt topRegistersMask30; + sqInt topRegistersMask31; + sqInt topRegistersMask32; + sqInt topRegistersMask33; + sqInt topRegistersMask35; + sqInt topRegistersMask4; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value27; + sqInt value3; + sqInt value30; + sqInt value31; + sqInt value5; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueHigh1; + sqInt valueHigh10; + sqInt valueHigh2; + sqInt valueHigh3; + sqInt valueHigh4; + sqInt valueHigh5; + sqInt valueHigh8; + sqInt valueHigh9; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueHighValue3; + sqInt valueHighValue4; + sqInt valueHighValue5; + sqInt valueHighValue6; + sqInt valueHighValue7; + sqInt valueLow1; + sqInt valueLow10; + sqInt valueLow2; + sqInt valueLow3; + sqInt valueLow4; + sqInt valueLow5; + sqInt valueLow8; + sqInt valueLow9; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueLowValue3; + sqInt valueLowValue4; + sqInt valueLowValue5; + sqInt valueLowValue6; + sqInt valueLowValue7; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue27; + sqInt valueValue3; + sqInt valueValue30; + sqInt valueValue31; + sqInt valueValue5; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + switch (prim) { case 187: - return genLowcodePushSessionIdentifier(); + /* begin genLowcodePushSessionIdentifier */ + ssPushNativeConstantInt32(getThisSessionID()); + return 0; case 188: - return genLowcodePushZero32(); + /* begin genLowcodePushZero32 */ + ssPushNativeConstantInt32(0); + return 0; case 189: - return genLowcodePushZero64(); + /* begin genLowcodePushZero64 */ + ssPushNativeConstantInt64(0); + return 0; case 190: - return genLowcodePushZeroFloat32(); + /* begin genLowcodePushZeroFloat32 */ + ssPushNativeConstantFloat32(0.0); + return 0; case 191: - return genLowcodePushZeroFloat64(); + /* begin genLowcodePushZeroFloat64 */ + ssPushNativeConstantFloat64(0.0); + return 0; case 192: - return genLowcodeRem32(); + /* begin genLowcodeRem32 */ + topRegistersMask = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + gDivRRQuoRem(second, first, second, first); + ssPushNativeRegister(first); + return 0; case 193: - return genLowcodeRem64(); + /* begin genLowcodeRem64 */ + topRegistersMask1 = 0; + rTop1 = (rNext1 = NoReg); + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop1 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext1 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg1; + } + } + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop1); + } + assert(!(((rTop1 == NoReg) + || (rNext1 == NoReg)))); + rResult = allocateFloatRegNotConflictingWith((1U << rTop1) | (1U << rNext1)); + assert(!((rResult == NoReg))); + second1 = rTop1; + first1 = rNext1; + result = rResult; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + abort(); + return 0; case 194: - return genLowcodeRightShift32(); + /* begin genLowcodeRightShift32 */ + topRegistersMask2 = 0; + rTop2 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext2 == NoReg)))); + shiftAmount = rTop2; + value = rNext2; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin LogicalShiftRightR:R: */ + genoperandoperand(LogicalShiftRightRR, shiftAmount, value); + ssPushNativeRegister(value); + return 0; case 195: - return genLowcodeRightShift64(); + /* begin genLowcodeRightShift64 */ + topRegistersMask3 = 0; + rTop3 = (rNext3 = NoReg); + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop3 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext3 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg3; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + rResult1 = allocateFloatRegNotConflictingWith((1U << rTop3) | (1U << rNext3)); + assert(!((rResult1 == NoReg))); + shiftAmount1 = rTop3; + value1 = rNext3; + result1 = rResult1; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + abort(); + return 0; case 196: - return genLowcodeSignExtend32From16(); + /* begin genLowcodeSignExtend32From16 */ + rTop4 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(0); + } + assert(!((rTop4 == NoReg))); + value2 = rTop4; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value2, value2); + ssPushNativeRegister(value2); + return 0; case 197: - return genLowcodeSignExtend32From8(); + /* begin genLowcodeSignExtend32From8 */ + rTop5 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(0); + } + assert(!((rTop5 == NoReg))); + value3 = rTop5; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value3, value3); + ssPushNativeRegister(value3); + return 0; case 198: - return genLowcodeSignExtend64From16(); + /* begin genLowcodeSignExtend64From16 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask4 = 0; + rTop6 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1U << reg4; + } + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop6); + } + assert(!(((rTop6 == NoReg) + || (rNext4 == NoReg)))); + valueLow1 = rTop6; + valueHigh1 = rNext4; + + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, valueLow1, valueLow1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(CmpCqR, 0, valueLow1); + if (usesOutOfLineLiteral(anInstruction)) { + (anInstruction->dependent = locateLiteral(0)); + } + /* begin JumpLess: */ + isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh1); + if (usesOutOfLineLiteral(anInstruction1)) { + (anInstruction1->dependent = locateLiteral(0)); + } + /* begin Jump: */ + cont = genoperand(Jump, ((sqInt)0)); + jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh1))); + jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegistersecondRegister(valueLow1, valueHigh1); + + return 0; case 199: - return genLowcodeSignExtend64From32(); + /* begin genLowcodeSignExtend64From32 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop7 = NoReg; + rResult3 = (rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop7 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rTop7); + rResult2 = allocateRegNotConflictingWith((1U << rTop7) | (1U << rResult3)); + assert(!(((rTop7 == NoReg) + || ((rResult3 == NoReg) + || (rResult2 == NoReg))))); + value5 = rTop7; + resultLow2 = rResult3; + resultHigh2 = rResult2; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value5, resultLow2); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(CmpCqR, 0, value5); + if (usesOutOfLineLiteral(anInstruction2)) { + (anInstruction2->dependent = locateLiteral(0)); + } + /* begin JumpLess: */ + isNegative1 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, resultHigh2); + if (usesOutOfLineLiteral(anInstruction3)) { + (anInstruction3->dependent = locateLiteral(0)); + } + /* begin Jump: */ + cont1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(isNegative1, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, resultHigh2))); + jmpTarget(cont1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegistersecondRegister(resultLow2, resultHigh2); + + return 0; case 200: - return genLowcodeSignExtend64From8(); + /* begin genLowcodeSignExtend64From8 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger2: */ + topRegistersMask5 = 0; + rTop8 = (rNext5 = NoReg); + rResult4 = (rResult21 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop8 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext5 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0)); + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext5 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1U << reg5; + } + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext5 == NoReg) { + rNext5 = allocateRegNotConflictingWith(1U << rTop8); + } + assert(!(((rTop8 == NoReg) + || (rNext5 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop8) | (1U << rNext5)); + rResult21 = allocateFloatRegNotConflictingWith(((1U << rTop8) | (1U << rNext5)) | (1U << rResult4)); + assert(!(((rResult4 == NoReg) + || (rResult21 == NoReg)))); + valueLow2 = rTop8; + valueHigh2 = rNext5; + resultLow3 = rResult4; + resultHigh3 = rResult21; + + nativePopToRegsecondReg(ssNativeTop(), valueLow2, valueHigh2); + ssNativePop(1); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, valueLow2, valueLow2); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(CmpCqR, 0, valueLow2); + if (usesOutOfLineLiteral(anInstruction4)) { + (anInstruction4->dependent = locateLiteral(0)); + } + /* begin JumpLess: */ + isNegative2 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperand(MoveCqR, 0, valueHigh2); + if (usesOutOfLineLiteral(anInstruction5)) { + (anInstruction5->dependent = locateLiteral(0)); + } + /* begin Jump: */ + cont2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(isNegative2, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh2))); + jmpTarget(cont2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegistersecondRegister(valueLow2, valueHigh2); + + return 0; + + case 201: + /* begin genLowcodeStoreFloat32ToMemory */ + + /* Integer registers */ + frTop = (rTop9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(0); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeValue(1)); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + assert(!(((frTop == NoReg) + || (rTop9 == NoReg)))); + floatValue = frTop; + pointer = rTop9; - case 201: - return genLowcodeStoreFloat32ToMemory(); + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperandoperand(MoveRsM32r, floatValue, 0, pointer); + if (usesOutOfLineLiteral(anInstruction6)) { + (anInstruction6->dependent = locateLiteral(0)); + } + return 0; case 202: - return genLowcodeStoreFloat64ToMemory(); + /* begin genLowcodeStoreFloat64ToMemory */ + + /* Integer registers */ + frTop1 = (rTop10 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop10 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(0); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeValue(1)); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + assert(!(((frTop1 == NoReg) + || (rTop10 == NoReg)))); + doubleValue = frTop1; + pointer1 = rTop10; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), doubleValue); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperandoperand(MoveRdM64r, doubleValue, 0, pointer1); + if (usesOutOfLineLiteral(anInstruction7)) { + (anInstruction7->dependent = locateLiteral(0)); + } + return 0; case 203: - return genLowcodeStoreInt16ToMemory(); + /* begin genLowcodeStoreInt16ToMemory */ + topRegistersMask6 = 0; + rTop14 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop14 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg6; + } + } + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1U << rTop14); + } + assert(!(((rTop14 == NoReg) + || (rNext6 == NoReg)))); + pointer2 = rTop14; + value7 = rNext6; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value7, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperandoperand(MoveRM16r, TempReg, 0, pointer2); + if (usesOutOfLineLiteral(anInstruction8)) { + (anInstruction8->dependent = locateLiteral(0)); + } + return 0; case 204: - return genLowcodeStoreInt32ToMemory(); + /* begin genLowcodeStoreInt32ToMemory */ + topRegistersMask7 = 0; + rTop15 = (rNext7 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext7 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1U << reg7; + } + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1U << rTop15); + } + assert(!(((rTop15 == NoReg) + || (rNext7 == NoReg)))); + pointer3 = rTop15; + value8 = rNext7; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperandoperand(MoveRM32r, value8, 0, pointer3); + if (usesOutOfLineLiteral(anInstruction9)) { + (anInstruction9->dependent = locateLiteral(0)); + } + return 0; case 205: - return genLowcodeStoreInt64ToMemory(); + /* begin genLowcodeStoreInt64ToMemory */ + /* begin allocateRegistersForLowcodeInteger3: */ + rTop45 = (rNext28 = (rNextNext1 = NoReg)); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop45 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext28 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext28 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext28 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + } + if (rTop45 == NoReg) { + registerMask1 = 0; + if (rNext28 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext28; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rTop45 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext28 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop45; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rNext28 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop45) | (1U << rNext28); + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop45 == NoReg) + || ((rNext28 == NoReg) + || (rNextNext1 == NoReg))))); + pointer5 = rTop45; + valueLow8 = rNext28; + valueHigh8 = rNextNext1; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), valueLow8, valueHigh8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperandoperand(MoveRM32r, valueLow8, 0, pointer5); + if (usesOutOfLineLiteral(anInstruction10)) { + (anInstruction10->dependent = locateLiteral(0)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperandoperand(MoveRM32r, valueHigh8, 4, pointer5); + if (usesOutOfLineLiteral(anInstruction11)) { + (anInstruction11->dependent = locateLiteral(4)); + } + + return 0; case 206: - return genLowcodeStoreInt8ToMemory(); + /* begin genLowcodeStoreInt8ToMemory */ + topRegistersMask8 = 0; + rTop16 = (rNext8 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop16 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg8; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1U << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext8 == NoReg)))); + pointer4 = rTop16; + value9 = rNext8; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value9); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value9, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperandoperand(MoveRM8r, TempReg, 0, pointer4); + if (usesOutOfLineLiteral(anInstruction12)) { + (anInstruction12->dependent = locateLiteral(0)); + } + return 0; case 207: - return genLowcodeStoreLocalFloat32(); + /* begin genLowcodeStoreLocalFloat32 */ + baseOffset = extA; + /* begin allocateRegistersForLowcodeFloat: */ + topRegistersMask9 = 0; + frTop2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(topRegistersMask9); + } + assert(!((frTop2 == NoReg))); + value10 = frTop2; + + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperandoperand(MoveRsM32r, value10, 0, TempReg); + if (usesOutOfLineLiteral(anInstruction13)) { + (anInstruction13->dependent = locateLiteral(0)); + } + extA = 0; + return 0; case 208: - return genLowcodeStoreLocalFloat64(); + /* begin genLowcodeStoreLocalFloat64 */ + baseOffset1 = extA; + /* begin allocateRegistersForLowcodeFloat: */ + topRegistersMask10 = 0; + frTop3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + assert(!((frTop3 == NoReg))); + value11 = frTop3; + + nativePopToReg(ssNativeTop(), value11); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperandoperand(MoveRdM64r, value11, 0, TempReg); + if (usesOutOfLineLiteral(anInstruction14)) { + (anInstruction14->dependent = locateLiteral(0)); + } + extA = 0; + return 0; case 209: - return genLowcodeStoreLocalInt16(); + /* begin genLowcodeStoreLocalInt16 */ + baseOffset2 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop17 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop17 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(0); + } + assert(!((rTop17 == NoReg))); + value12 = rTop17; + + nativePopToReg(ssNativeTop(), value12); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value12, TempReg); + loadNativeLocalAddressto(baseOffset2, value12); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperandoperand(MoveRM16r, TempReg, 0, value12); + if (usesOutOfLineLiteral(anInstruction15)) { + (anInstruction15->dependent = locateLiteral(0)); + } + extA = 0; + return 0; case 210: - return genLowcodeStoreLocalInt32(); + /* begin genLowcodeStoreLocalInt32 */ + baseOffset3 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop18 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop18 == NoReg) { + rTop18 = allocateRegNotConflictingWith(0); + } + assert(!((rTop18 == NoReg))); + value13 = rTop18; + + nativePopToReg(ssNativeTop(), value13); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset3, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperandoperand(MoveRM32r, value13, 0, TempReg); + if (usesOutOfLineLiteral(anInstruction16)) { + (anInstruction16->dependent = locateLiteral(0)); + } + extA = 0; + return 0; case 211: - return genLowcodeStoreLocalInt64(); + /* begin genLowcodeStoreLocalInt64 */ + baseOffset6 = extA; + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask30 = 0; + rTop46 = (rNext29 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop46 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext29 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext29 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg28 = (rNext29 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask30 = 1U << reg28; + } + } + if (rTop46 == NoReg) { + rTop46 = allocateRegNotConflictingWith(topRegistersMask30); + } + if (rNext29 == NoReg) { + rNext29 = allocateRegNotConflictingWith(1U << rTop46); + } + assert(!(((rTop46 == NoReg) + || (rNext29 == NoReg)))); + valueLow9 = rTop46; + valueHigh9 = rNext29; + + nativePopToRegsecondReg(ssNativeTop(), valueLow9, valueHigh9); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset6, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperandoperand(MoveRM32r, valueLow9, 0, TempReg); + if (usesOutOfLineLiteral(anInstruction17)) { + (anInstruction17->dependent = locateLiteral(0)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperandoperand(MoveRM32r, valueHigh9, 4, TempReg); + if (usesOutOfLineLiteral(anInstruction18)) { + (anInstruction18->dependent = locateLiteral(4)); + } + + extA = 0; + return 0; case 212: - return genLowcodeStoreLocalInt8(); + /* begin genLowcodeStoreLocalInt8 */ + baseOffset4 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop19 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(0); + } + assert(!((rTop19 == NoReg))); + value14 = rTop19; + + nativePopToReg(ssNativeTop(), value14); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value14, TempReg); + loadNativeLocalAddressto(baseOffset4, value14); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperandoperand(MoveRM8r, TempReg, 0, value14); + if (usesOutOfLineLiteral(anInstruction19)) { + (anInstruction19->dependent = locateLiteral(0)); + } + extA = 0; + return 0; case 213: - return genLowcodeStoreLocalPointer(); + /* begin genLowcodeStoreLocalPointer */ + baseOffset5 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop20 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(0); + } + assert(!((rTop20 == NoReg))); + pointerValue5 = rTop20; + + nativePopToReg(ssNativeTop(), pointerValue5); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset5, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperandoperand(MoveRMwr, pointerValue5, 0, TempReg); + if (usesOutOfLineLiteral(anInstruction20)) { + (anInstruction20->dependent = locateLiteral(0)); + } + extA = 0; + return 0; case 214: - return genLowcodeStorePointerToMemory(); + /* begin genLowcodeStorePointerToMemory */ + topRegistersMask11 = 0; + rTop21 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1U << reg9; + } + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(topRegistersMask11); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext9 == NoReg)))); + memoryPointer = rTop21; + pointerValue6 = rNext9; + + nativePopToReg(ssNativeTop(), memoryPointer); + ssNativePop(1); + nativePopToReg(ssNativeTop(), pointerValue6); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperandoperand(MoveRMwr, pointerValue6, 0, memoryPointer); + if (usesOutOfLineLiteral(anInstruction23)) { + (anInstruction23->dependent = locateLiteral(0)); + } + return 0; case 215: - return genLowcodeSub32(); + /* begin genLowcodeSub32 */ + topRegistersMask12 = 0; + rTop22 = (rNext10 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop22 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext10 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1U << reg10; + } + } + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(topRegistersMask12); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop22); + } + assert(!(((rTop22 == NoReg) + || (rNext10 == NoReg)))); + second2 = rTop22; + first2 = rNext10; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 216: - return genLowcodeSub64(); + /* begin genLowcodeSub64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop23 = (rNext11 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext11 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext11 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext11 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop23 == NoReg) { + registerMask = 0; + if (rNext11 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext11; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop23 = allocateRegNotConflictingWith(registerMask); + } + if (rNext11 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop23; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext11 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop23) | (1U << rNext11); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop23) | (1U << rNext11)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop23 == NoReg) + || ((rNext11 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow1 = rTop23; + secondHigh1 = rNext11; + firstLow1 = rNextNext; + firstHigh1 = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow1, secondHigh1); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow1, firstHigh1); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, secondLow1, firstLow1); + /* begin SubbR:R: */ + genoperandoperand(SubbRR, secondHigh1, firstHigh1); + ssPushNativeRegistersecondRegister(firstLow1, firstHigh1); + + return 0; case 217: - return genLowcodeTruncate32To16(); + /* begin genLowcodeTruncate32To16 */ + rTop24 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + assert(!((rTop24 == NoReg))); + value15 = rTop24; + + nativePopToReg(ssNativeTop(), value15); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(AndCqR, 0xFFFF, value15); + if (usesOutOfLineLiteral(anInstruction24)) { + (anInstruction24->dependent = locateLiteral(0xFFFF)); + } + ssPushNativeRegister(value15); + return 0; case 218: - return genLowcodeTruncate32To8(); + /* begin genLowcodeTruncate32To8 */ + rTop25 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + assert(!((rTop25 == NoReg))); + value16 = rTop25; + + nativePopToReg(ssNativeTop(), value16); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction25 = genoperandoperand(AndCqR, 0xFF, value16); + if (usesOutOfLineLiteral(anInstruction25)) { + (anInstruction25->dependent = locateLiteral(0xFF)); + } + ssPushNativeRegister(value16); + return 0; case 219: - return genLowcodeTruncate64To16(); + /* begin genLowcodeTruncate64To16 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask14 = 0; + rTop26 = (rNext13 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop26 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (rNext13 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1U << reg12; + } + } + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(topRegistersMask14); + } + if (rNext13 == NoReg) { + rNext13 = allocateRegNotConflictingWith(1U << rTop26); + } + assert(!(((rTop26 == NoReg) + || (rNext13 == NoReg)))); + valueLow3 = rTop26; + valueHigh3 = rNext13; + + nativePopToRegsecondReg(ssNativeTop(), valueLow3, valueHigh3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperand(AndCqR, 0xFFFF, valueLow3); + if (usesOutOfLineLiteral(anInstruction26)) { + (anInstruction26->dependent = locateLiteral(0xFFFF)); + } + ssPushNativeRegister(valueLow3); + + return 0; case 220: - return genLowcodeTruncate64To32(); + /* begin genLowcodeTruncate64To32 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask15 = 0; + rTop27 = (rNext14 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (rNext14 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1U << reg13; + } + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(topRegistersMask15); + } + if (rNext14 == NoReg) { + rNext14 = allocateRegNotConflictingWith(1U << rTop27); + } + assert(!(((rTop27 == NoReg) + || (rNext14 == NoReg)))); + valueLow4 = rTop27; + valueHigh4 = rNext14; + + nativePopToRegsecondReg(ssNativeTop(), valueLow4, valueHigh4); + ssNativePop(1); + ssPushNativeRegister(valueLow4); + + return 0; case 221: - return genLowcodeTruncate64To8(); + /* begin genLowcodeTruncate64To8 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger: */ + topRegistersMask16 = 0; + rTop28 = (rNext15 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop28 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext15 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask16 = 1U << reg14; + } + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(topRegistersMask16); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1U << rTop28); + } + assert(!(((rTop28 == NoReg) + || (rNext15 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop28) | (1U << rNext15)); + assert(!((rResult5 == NoReg))); + valueLow5 = rTop28; + valueHigh5 = rNext15; + result4 = rResult5; + + nativePopToRegsecondReg(ssNativeTop(), valueLow5, valueHigh5); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperand(AndCqR, 0xFF, valueLow5); + if (usesOutOfLineLiteral(anInstruction29)) { + (anInstruction29->dependent = locateLiteral(0xFF)); + } + ssPushNativeRegister(valueLow5); + + return 0; case 222: - return genLowcodeUdiv32(); + /* begin genLowcodeUdiv32 */ + topRegistersMask17 = 0; + rTop29 = (rNext16 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext16 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext16 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (rNext16 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask17 = 1U << reg15; + } + } + if (rTop29 == NoReg) { + rTop29 = allocateRegNotConflictingWith(topRegistersMask17); + } + if (rNext16 == NoReg) { + rNext16 = allocateRegNotConflictingWith(1U << rTop29); + } + assert(!(((rTop29 == NoReg) + || (rNext16 == NoReg)))); + second4 = rTop29; + first4 = rNext16; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + gDivRRQuoRem(second4, first4, first4, second4); + ssPushNativeRegister(first4); + return 0; case 223: - return genLowcodeUdiv64(); + /* begin genLowcodeUdiv64 */ + topRegistersMask18 = 0; + rTop30 = (rNext17 = NoReg); + rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop30 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext17 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext17 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg16 = (rNext17 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask18 = 1U << reg16; + } + } + if (rTop30 == NoReg) { + rTop30 = allocateRegNotConflictingWith(topRegistersMask18); + } + if (rNext17 == NoReg) { + rNext17 = allocateRegNotConflictingWith(1U << rTop30); + } + assert(!(((rTop30 == NoReg) + || (rNext17 == NoReg)))); + rResult6 = allocateFloatRegNotConflictingWith((1U << rTop30) | (1U << rNext17)); + assert(!((rResult6 == NoReg))); + second5 = rTop30; + first5 = rNext17; + result5 = rResult6; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + abort(); + return 0; case 224: - return genLowcodeUint32Great(); + /* begin genLowcodeUint32Great */ + topRegistersMask19 = 0; + rTop31 = (rNext18 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop31 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext18 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext18 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg17 = (rNext18 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask19 = 1U << reg17; + } + } + if (rTop31 == NoReg) { + rTop31 = allocateRegNotConflictingWith(topRegistersMask19); + } + if (rNext18 == NoReg) { + rNext18 = allocateRegNotConflictingWith(1U << rTop31); + } + assert(!(((rTop31 == NoReg) + || (rNext18 == NoReg)))); + second6 = rTop31; + first6 = rNext18; + + nativePopToReg(ssNativeTop(), second6); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first6); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second6, first6); + /* begin JumpBelowOrEqual: */ + falseJump = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperand(MoveCqR, 1, first6); + if (usesOutOfLineLiteral(anInstruction31)) { + (anInstruction31->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperand(MoveCqR, 0, first6); + if (usesOutOfLineLiteral(anInstruction32)) { + (anInstruction32->dependent = locateLiteral(0)); + } + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first6); + return 0; case 225: - return genLowcodeUint32GreatEqual(); + /* begin genLowcodeUint32GreatEqual */ + topRegistersMask20 = 0; + rTop32 = (rNext19 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop32 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext19 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext19 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg18 = (rNext19 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask20 = 1U << reg18; + } + } + if (rTop32 == NoReg) { + rTop32 = allocateRegNotConflictingWith(topRegistersMask20); + } + if (rNext19 == NoReg) { + rNext19 = allocateRegNotConflictingWith(1U << rTop32); + } + assert(!(((rTop32 == NoReg) + || (rNext19 == NoReg)))); + second7 = rTop32; + first7 = rNext19; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second7, first7); + /* begin JumpBelow: */ + falseJump1 = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction33 = genoperandoperand(MoveCqR, 1, first7); + if (usesOutOfLineLiteral(anInstruction33)) { + (anInstruction33->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction34 = genoperandoperand(MoveCqR, 0, first7); + if (usesOutOfLineLiteral(anInstruction34)) { + (anInstruction34->dependent = locateLiteral(0)); + } + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first7); + return 0; case 226: - return genLowcodeUint32Less(); + /* begin genLowcodeUint32Less */ + topRegistersMask21 = 0; + rTop33 = (rNext20 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop33 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext20 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext20 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg19 = (rNext20 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask21 = 1U << reg19; + } + } + if (rTop33 == NoReg) { + rTop33 = allocateRegNotConflictingWith(topRegistersMask21); + } + if (rNext20 == NoReg) { + rNext20 = allocateRegNotConflictingWith(1U << rTop33); + } + assert(!(((rTop33 == NoReg) + || (rNext20 == NoReg)))); + second8 = rTop33; + first8 = rNext20; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second8, first8); + /* begin JumpAboveOrEqual: */ + falseJump2 = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction35 = genoperandoperand(MoveCqR, 1, first8); + if (usesOutOfLineLiteral(anInstruction35)) { + (anInstruction35->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction36 = genoperandoperand(MoveCqR, 0, first8); + if (usesOutOfLineLiteral(anInstruction36)) { + (anInstruction36->dependent = locateLiteral(0)); + } + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first8); + return 0; case 227: - return genLowcodeUint32LessEqual(); + /* begin genLowcodeUint32LessEqual */ + topRegistersMask22 = 0; + rTop34 = (rNext21 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop34 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext21 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext21 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg20 = (rNext21 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask22 = 1U << reg20; + } + } + if (rTop34 == NoReg) { + rTop34 = allocateRegNotConflictingWith(topRegistersMask22); + } + if (rNext21 == NoReg) { + rNext21 = allocateRegNotConflictingWith(1U << rTop34); + } + assert(!(((rTop34 == NoReg) + || (rNext21 == NoReg)))); + second9 = rTop34; + first9 = rNext21; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second9, first9); + /* begin JumpAbove: */ + falseJump3 = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction37 = genoperandoperand(MoveCqR, 1, first9); + if (usesOutOfLineLiteral(anInstruction37)) { + (anInstruction37->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction38 = genoperandoperand(MoveCqR, 0, first9); + if (usesOutOfLineLiteral(anInstruction38)) { + (anInstruction38->dependent = locateLiteral(0)); + } + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first9); + return 0; case 228: - return genLowcodeUint32ToFloat32(); + /* begin genLowcodeUint32ToFloat32 */ + rTop35 = NoReg; + frResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop35 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop35 == NoReg) { + rTop35 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop35 == NoReg) + || (frResult == NoReg)))); + value20 = rTop35; + result6 = frResult; + + nativePopToReg(ssNativeTop(), value20); + ssNativePop(1); + /* begin ConvertR:Rs: */ + genoperandoperand(ConvertRRs, value20, result6); + ssPushNativeRegisterSingleFloat(result6); + return 0; case 229: - return genLowcodeUint32ToFloat64(); + /* begin genLowcodeUint32ToFloat64 */ + rTop36 = NoReg; + frResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop36 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop36 == NoReg) { + rTop36 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop36 == NoReg) + || (frResult1 == NoReg)))); + value21 = rTop36; + result7 = frResult1; + + nativePopToReg(ssNativeTop(), value21); + ssNativePop(1); + /* begin ConvertR:Rd: */ + genoperandoperand(ConvertRRd, value21, result7); + ssPushNativeRegisterDoubleFloat(result7); + return 0; case 230: - return genLowcodeUint64Great(); + /* begin genLowcodeUint64Great */ + topRegistersMask23 = 0; + rTop37 = (rNext22 = NoReg); + rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop37 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext22 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext22 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg21 = (rNext22 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask23 = 1U << reg21; + } + } + if (rTop37 == NoReg) { + rTop37 = allocateRegNotConflictingWith(topRegistersMask23); + } + if (rNext22 == NoReg) { + rNext22 = allocateRegNotConflictingWith(1U << rTop37); + } + assert(!(((rTop37 == NoReg) + || (rNext22 == NoReg)))); + rResult7 = allocateFloatRegNotConflictingWith((1U << rTop37) | (1U << rNext22)); + assert(!((rResult7 == NoReg))); + second10 = rTop37; + first10 = rNext22; + value22 = rResult7; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + abort(); + return 0; case 231: - return genLowcodeUint64GreatEqual(); + /* begin genLowcodeUint64GreatEqual */ + topRegistersMask24 = 0; + rTop38 = (rNext23 = NoReg); + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop38 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext23 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext23 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg22 = (rNext23 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask24 = 1U << reg22; + } + } + if (rTop38 == NoReg) { + rTop38 = allocateRegNotConflictingWith(topRegistersMask24); + } + if (rNext23 == NoReg) { + rNext23 = allocateRegNotConflictingWith(1U << rTop38); + } + assert(!(((rTop38 == NoReg) + || (rNext23 == NoReg)))); + rResult8 = allocateFloatRegNotConflictingWith((1U << rTop38) | (1U << rNext23)); + assert(!((rResult8 == NoReg))); + second11 = rTop38; + first11 = rNext23; + value23 = rResult8; + + nativePopToReg(ssNativeTop(), second11); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first11); + ssNativePop(1); + abort(); + return 0; case 232: - return genLowcodeUint64Less(); + /* begin genLowcodeUint64Less */ + topRegistersMask25 = 0; + rTop39 = (rNext24 = NoReg); + rResult9 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop39 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext24 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext24 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg23 = (rNext24 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask25 = 1U << reg23; + } + } + if (rTop39 == NoReg) { + rTop39 = allocateRegNotConflictingWith(topRegistersMask25); + } + if (rNext24 == NoReg) { + rNext24 = allocateRegNotConflictingWith(1U << rTop39); + } + assert(!(((rTop39 == NoReg) + || (rNext24 == NoReg)))); + rResult9 = allocateFloatRegNotConflictingWith((1U << rTop39) | (1U << rNext24)); + assert(!((rResult9 == NoReg))); + second12 = rTop39; + first12 = rNext24; + value24 = rResult9; + + nativePopToReg(ssNativeTop(), second12); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first12); + ssNativePop(1); + abort(); + return 0; case 233: - return genLowcodeUint64LessEqual(); + /* begin genLowcodeUint64LessEqual */ + topRegistersMask26 = 0; + rTop40 = (rNext25 = NoReg); + rResult10 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop40 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext25 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext25 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg24 = (rNext25 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask26 = 1U << reg24; + } + } + if (rTop40 == NoReg) { + rTop40 = allocateRegNotConflictingWith(topRegistersMask26); + } + if (rNext25 == NoReg) { + rNext25 = allocateRegNotConflictingWith(1U << rTop40); + } + assert(!(((rTop40 == NoReg) + || (rNext25 == NoReg)))); + rResult10 = allocateFloatRegNotConflictingWith((1U << rTop40) | (1U << rNext25)); + assert(!((rResult10 == NoReg))); + second13 = rTop40; + first13 = rNext25; + value25 = rResult10; + + nativePopToReg(ssNativeTop(), second13); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first13); + ssNativePop(1); + abort(); + return 0; case 234: - return genLowcodeUint64ToFloat32(); + /* begin genLowcodeUint64ToFloat32 */ + rTop41 = NoReg; + frResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop41 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop41 == NoReg) { + rTop41 = allocateRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop41 == NoReg) + || (frResult2 == NoReg)))); + value26 = rTop41; + result8 = frResult2; + + nativePopToReg(ssNativeTop(), value26); + ssNativePop(1); + abort(); + return 0; case 235: - return genLowcodeUint64ToFloat64(); + /* begin genLowcodeUint64ToFloat64 */ + rTop42 = NoReg; + frResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop42 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop42 == NoReg) { + rTop42 = allocateRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop42 == NoReg) + || (frResult3 == NoReg)))); + value27 = rTop42; + result9 = frResult3; + + nativePopToReg(ssNativeTop(), value27); + ssNativePop(1); + abort(); + return 0; case 236: - return genLowcodeUmul32(); + /* begin genLowcodeUmul32 */ + topRegistersMask27 = 0; + rTop43 = (rNext26 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop43 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext26 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext26 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg25 = (rNext26 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask27 = 1U << reg25; + } + } + if (rTop43 == NoReg) { + rTop43 = allocateRegNotConflictingWith(topRegistersMask27); + } + if (rNext26 == NoReg) { + rNext26 = allocateRegNotConflictingWith(1U << rTop43); + } + assert(!(((rTop43 == NoReg) + || (rNext26 == NoReg)))); + second14 = rTop43; + first14 = rNext26; + + nativePopToReg(ssNativeTop(), second14); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first14); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, second14, first14); + ssPushNativeRegister(first14); + return 0; case 237: - return genLowcodeUmul64(); + /* begin genLowcodeUmul64 */ + topRegistersMask28 = 0; + rTop44 = (rNext27 = NoReg); + rResult14 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop44 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext27 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext27 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg26 = (rNext27 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask28 = 1U << reg26; + } + } + if (rTop44 == NoReg) { + rTop44 = allocateRegNotConflictingWith(topRegistersMask28); + } + if (rNext27 == NoReg) { + rNext27 = allocateRegNotConflictingWith(1U << rTop44); + } + assert(!(((rTop44 == NoReg) + || (rNext27 == NoReg)))); + rResult14 = allocateFloatRegNotConflictingWith((1U << rTop44) | (1U << rNext27)); + assert(!((rResult14 == NoReg))); + second15 = rTop44; + first15 = rNext27; + result10 = rResult14; + + nativePopToReg(ssNativeTop(), second15); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first15); + ssNativePop(1); + abort(); + return 0; case 238: return 0; case 239: - return genLowcodeUnlockVM(); + /* begin genLowcodeUnlockVM */ + abort(); + return 0; case 240: - return genLowcodeUrem32(); + /* begin genLowcodeUrem32 */ + topRegistersMask31 = 0; + rTop47 = (rNext30 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop47 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext30 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext30 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg29 = (rNext30 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask31 = 1U << reg29; + } + } + if (rTop47 == NoReg) { + rTop47 = allocateRegNotConflictingWith(topRegistersMask31); + } + if (rNext30 == NoReg) { + rNext30 = allocateRegNotConflictingWith(1U << rTop47); + } + assert(!(((rTop47 == NoReg) + || (rNext30 == NoReg)))); + second16 = rTop47; + first16 = rNext30; + + nativePopToReg(ssNativeTop(), second16); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first16); + ssNativePop(1); + gDivRRQuoRem(second16, first16, second16, first16); + ssPushNativeRegister(first16); + return 0; case 241: - return genLowcodeUrem64(); + /* begin genLowcodeUrem64 */ + topRegistersMask32 = 0; + rTop48 = (rNext31 = NoReg); + rResult15 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop48 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext31 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext31 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg30 = (rNext31 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask32 = 1U << reg30; + } + } + if (rTop48 == NoReg) { + rTop48 = allocateRegNotConflictingWith(topRegistersMask32); + } + if (rNext31 == NoReg) { + rNext31 = allocateRegNotConflictingWith(1U << rTop48); + } + assert(!(((rTop48 == NoReg) + || (rNext31 == NoReg)))); + rResult15 = allocateFloatRegNotConflictingWith((1U << rTop48) | (1U << rNext31)); + assert(!((rResult15 == NoReg))); + second17 = rTop48; + first17 = rNext31; + result11 = rResult15; + + nativePopToReg(ssNativeTop(), second17); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first17); + ssNativePop(1); + abort(); + return 0; case 242: - return genLowcodeXor32(); + /* begin genLowcodeXor32 */ + topRegistersMask33 = 0; + rTop49 = (rNext32 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop49 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext32 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext32 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg31 = (rNext32 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask33 = 1U << reg31; + } + } + if (rTop49 == NoReg) { + rTop49 = allocateRegNotConflictingWith(topRegistersMask33); + } + if (rNext32 == NoReg) { + rNext32 = allocateRegNotConflictingWith(1U << rTop49); + } + assert(!(((rTop49 == NoReg) + || (rNext32 == NoReg)))); + second18 = rTop49; + first18 = rNext32; + + nativePopToReg(ssNativeTop(), second18); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first18); + ssNativePop(1); + /* begin XorR:R: */ + genoperandoperand(XorRR, second18, first18); + ssPushNativeRegister(first18); + return 0; case 243: - return genLowcodeXor64(); + /* begin genLowcodeXor64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop50 = (rNext33 = (rNextNext2 = (rNextNextNext1 = NoReg))); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop50 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext33 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext33 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext33 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + nativeValueIndex2 += 1; + } + } + if (rTop50 == NoReg) { + registerMask2 = 0; + if (rNext33 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rNext33; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + if (rNextNextNext1 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNextNext1); + } + rTop50 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext33 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rTop50; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + if (rNextNextNext1 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNextNext1); + } + rNext33 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1U << rTop50) | (1U << rNext33); + if (rNextNextNext1 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNextNext1); + } + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNextNext1 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask2 = ((1U << rTop50) | (1U << rNext33)) | (1U << rNextNext2); + rNextNextNext1 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop50 == NoReg) + || ((rNext33 == NoReg) + || ((rNextNext2 == NoReg) + || (rNextNextNext1 == NoReg)))))); + secondLow9 = rTop50; + secondHigh9 = rNext33; + firstLow9 = rNextNext2; + firstHigh9 = rNextNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), secondLow9, secondHigh9); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow9, firstHigh9); + ssNativePop(1); + /* begin XorR:R: */ + genoperandoperand(XorRR, secondLow9, firstLow9); + /* begin XorR:R: */ + genoperandoperand(XorRR, secondHigh9, firstHigh9); + ssPushNativeRegistersecondRegister(firstLow9, firstHigh9); + + return 0; case 244: - return genLowcodeZeroExtend32From16(); + /* begin genLowcodeZeroExtend32From16 */ + rTop51 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop51 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop51 == NoReg) { + rTop51 = allocateRegNotConflictingWith(0); + } + assert(!((rTop51 == NoReg))); + value30 = rTop51; + + nativePopToReg(ssNativeTop(), value30); + ssNativePop(1); + /* begin ZeroExtend16R:R: */ + genoperandoperand(ZeroExtend16RR, value30, value30); + ssPushNativeRegister(value30); + return 0; case 245: - return genLowcodeZeroExtend32From8(); + /* begin genLowcodeZeroExtend32From8 */ + rTop52 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop52 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop52 == NoReg) { + rTop52 = allocateRegNotConflictingWith(0); + } + assert(!((rTop52 == NoReg))); + value31 = rTop52; + + nativePopToReg(ssNativeTop(), value31); + ssNativePop(1); + /* begin ZeroExtend8R:R: */ + genoperandoperand(ZeroExtend8RR, value31, value31); + ssPushNativeRegister(value31); + return 0; case 246: - return genLowcodeZeroExtend64From16(); + /* begin genLowcodeZeroExtend64From16 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask35 = 0; + rTop53 = (rNext34 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop53 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext34 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext34 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg33 = (rNext34 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask35 = 1U << reg33; + } + } + if (rTop53 == NoReg) { + rTop53 = allocateRegNotConflictingWith(topRegistersMask35); + } + if (rNext34 == NoReg) { + rNext34 = allocateRegNotConflictingWith(1U << rTop53); + } + assert(!(((rTop53 == NoReg) + || (rNext34 == NoReg)))); + valueLow10 = rTop53; + valueHigh10 = rNext34; + + nativePopToRegsecondReg(ssNativeTop(), valueLow10, valueHigh10); + ssNativePop(1); + /* begin ZeroExtend16R:R: */ + genoperandoperand(ZeroExtend16RR, valueLow10, valueLow10); + /* begin checkQuickConstant:forInstruction: */ + anInstruction39 = genoperandoperand(MoveCqR, 0, valueHigh10); + if (usesOutOfLineLiteral(anInstruction39)) { + (anInstruction39->dependent = locateLiteral(0)); + } + ssPushNativeRegistersecondRegister(valueLow10, valueHigh10); + + return 0; default: return genLowcodeUnaryInlinePrimitive5(prim); @@ -39753,13 +38091,101 @@ genLowcodeUnaryInlinePrimitive4(sqInt prim) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive5(sqInt prim) { + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + sqInt reg; + sqInt resultHigh; + sqInt resultHighValue; + sqInt resultLow; + sqInt resultLowValue; + sqInt rNext; + sqInt rResult; + sqInt rResult2; + sqInt rTop; + sqInt rTop2; + sqInt topRegistersMask; + sqInt value; + sqInt valueHigh; + sqInt valueHighValue; + sqInt valueLow; + sqInt valueLowValue; + sqInt valueValue; + switch (prim) { case 247: - return genLowcodeZeroExtend64From32(); + /* begin genLowcodeZeroExtend64From32 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop = NoReg; + rResult = (rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rTop); + rResult2 = allocateRegNotConflictingWith((1U << rTop) | (1U << rResult)); + assert(!(((rTop == NoReg) + || ((rResult == NoReg) + || (rResult2 == NoReg))))); + value = rTop; + resultLow = rResult; + resultHigh = rResult2; + + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value, resultLow); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 0, resultHigh); + if (usesOutOfLineLiteral(anInstruction)) { + (anInstruction->dependent = locateLiteral(0)); + } + ssPushNativeRegistersecondRegister(resultLow, resultHigh); + + return 0; case 0xF8: - return genLowcodeZeroExtend64From8(); + /* begin genLowcodeZeroExtend64From8 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask = 0; + rTop2 = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext == NoReg)))); + valueLow = rTop2; + valueHigh = rNext; + + nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); + ssNativePop(1); + /* begin ZeroExtend8R:R: */ + genoperandoperand(ZeroExtend8RR, valueLow, valueLow); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh); + if (usesOutOfLineLiteral(anInstruction1)) { + (anInstruction1->dependent = locateLiteral(0)); + } + ssPushNativeRegistersecondRegister(valueLow, valueHigh); + + return 0; default: return EncounteredUnknownBytecode; @@ -39771,191 +38197,2617 @@ genLowcodeUnaryInlinePrimitive5(sqInt prim) /* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeUnaryInlinePrimitive(sqInt prim) -{ + /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeUnaryInlinePrimitive(sqInt prim) +{ + AbstractInstruction *abstractInstruction; + sqInt address; + sqInt address1; + sqInt alignment; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction25; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction27; + AbstractInstruction *anInstruction28; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction30; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt base; + sqInt base1; + sqInt baseValue; + sqInt baseValue1; + sqInt check; + sqInt checkValue; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump10; + AbstractInstruction * contJump11; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + AbstractInstruction * contJump4; + AbstractInstruction * contJump5; + AbstractInstruction * contJump6; + AbstractInstruction * contJump7; + AbstractInstruction * contJump8; + AbstractInstruction * contJump9; + sqInt dup2; + sqInt dup21; + sqInt dup22; + sqInt dup24; + sqInt dup2High; + sqInt dup2HighValue; + sqInt dup2Low; + sqInt dup2LowValue; + sqInt dup2Value; + sqInt dup2Value1; + sqInt dup2Value2; + sqInt dup2Value4; + sqInt expectedSession; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump10; + AbstractInstruction * falseJump11; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump3; + AbstractInstruction * falseJump4; + AbstractInstruction * falseJump5; + AbstractInstruction * falseJump6; + AbstractInstruction * falseJump7; + AbstractInstruction * falseJump8; + AbstractInstruction * falseJump9; + sqInt first; + sqInt first10; + sqInt first11; + sqInt first12; + sqInt first13; + sqInt first14; + sqInt first15; + sqInt first16; + sqInt first17; + sqInt first18; + sqInt first19; + sqInt first2; + sqInt first20; + sqInt first21; + sqInt first22; + sqInt first23; + sqInt first24; + sqInt first25; + sqInt first4; + sqInt first5; + sqInt first6; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstHigh; + sqInt firstHigh1; + sqInt firstHighValue; + sqInt firstHighValue1; + sqInt firstLow; + sqInt firstLow1; + sqInt firstLowValue; + sqInt firstLowValue1; + sqInt firstValue; + sqInt firstValue10; + sqInt firstValue11; + sqInt firstValue12; + sqInt firstValue13; + sqInt firstValue14; + sqInt firstValue15; + sqInt firstValue16; + sqInt firstValue17; + sqInt firstValue18; + sqInt firstValue19; + sqInt firstValue2; + sqInt firstValue20; + sqInt firstValue21; + sqInt firstValue22; + sqInt firstValue23; + sqInt firstValue24; + sqInt firstValue25; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue6; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt frNext; + sqInt frNext1; + sqInt frNext10; + sqInt frNext11; + sqInt frNext2; + sqInt frNext3; + sqInt frNext4; + sqInt frNext5; + sqInt frNext6; + sqInt frNext7; + sqInt frNext8; + sqInt frNext9; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frTop; + sqInt frTop1; + sqInt frTop10; + sqInt frTop11; + sqInt frTop12; + sqInt frTop13; + sqInt frTop14; + sqInt frTop15; + sqInt frTop16; + sqInt frTop17; + sqInt frTop18; + sqInt frTop19; + sqInt frTop2; + sqInt frTop20; + sqInt frTop21; + sqInt frTop22; + sqInt frTop3; + sqInt frTop4; + sqInt frTop5; + sqInt frTop6; + sqInt frTop7; + sqInt frTop8; + sqInt frTop9; + sqInt function; + sqInt index; + sqInt index1; + sqInt indexValue; + sqInt indexValue1; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt nativeValueIndex2; + sqInt nativeValueIndex3; + sqInt nativeValueIndex4; + sqInt newValue; + sqInt newValueValue; + sqInt offset; + sqInt offset1; + sqInt offsetValue; + sqInt offsetValue1; + sqInt oldValue; + sqInt oldValueValue; + sqInt pointerValue; + sqInt pointerValueValue; + sqInt reg; + sqInt reg10; + sqInt reg11; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg16; + sqInt reg17; + sqInt reg18; + sqInt reg19; + sqInt reg2; + sqInt reg20; + sqInt reg21; + sqInt reg22; + sqInt reg23; + sqInt reg24; + sqInt reg25; + sqInt reg26; + sqInt reg27; + sqInt reg28; + sqInt reg29; + sqInt reg3; + sqInt reg5; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerID; + sqInt registerMask; + sqInt registerMask1; + sqInt registerMask2; + sqInt registerMask3; + sqInt registerMask4; + sqInt result; + sqInt result1; + sqInt result2; + sqInt result3; + sqInt result4; + sqInt result5; + sqInt result6; + sqInt result7; + sqInt result8; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue2; + sqInt resultValue3; + sqInt resultValue4; + sqInt resultValue5; + sqInt resultValue6; + sqInt resultValue7; + sqInt resultValue8; + sqInt rNext; + sqInt rNext10; + sqInt rNext12; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext17; + sqInt rNext18; + sqInt rNext19; + sqInt rNext2; + sqInt rNext20; + sqInt rNext21; + sqInt rNext22; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNext2; + sqInt rNextNext3; + sqInt rNextNext4; + sqInt rNextNextNext; + sqInt rNextNextNext1; + sqInt rNextNextNext2; + sqInt rNextNextNext3; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult12; + sqInt rResult13; + sqInt rResult14; + sqInt rResult15; + sqInt rResult16; + sqInt rResult17; + sqInt rResult18; + sqInt rResult19; + sqInt rResult2; + sqInt rResult20; + sqInt rResult21; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop10; + sqInt rTop13; + sqInt rTop14; + sqInt rTop16; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop3; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt scale; + sqInt scale1; + sqInt scaleValue; + sqInt scaleValue1; + sqInt second; + sqInt second10; + sqInt second11; + sqInt second12; + sqInt second13; + sqInt second14; + sqInt second15; + sqInt second16; + sqInt second17; + sqInt second18; + sqInt second19; + sqInt second2; + sqInt second20; + sqInt second21; + sqInt second22; + sqInt second23; + sqInt second24; + sqInt second25; + sqInt second4; + sqInt second5; + sqInt second6; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondHigh; + sqInt secondHigh1; + sqInt secondHighValue; + sqInt secondHighValue1; + sqInt secondLow; + sqInt secondLow1; + sqInt secondLowValue; + sqInt secondLowValue1; + sqInt secondValue; + sqInt secondValue10; + sqInt secondValue11; + sqInt secondValue12; + sqInt secondValue13; + sqInt secondValue14; + sqInt secondValue15; + sqInt secondValue16; + sqInt secondValue17; + sqInt secondValue18; + sqInt secondValue19; + sqInt secondValue2; + sqInt secondValue20; + sqInt secondValue21; + sqInt secondValue22; + sqInt secondValue23; + sqInt secondValue24; + sqInt secondValue25; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue6; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt singleFloatValue; + sqInt singleFloatValueValue; + sqInt size; + sqInt sizeHigh; + sqInt sizeHighValue; + sqInt sizeLow; + sqInt sizeLowValue; + sqInt sizeValue; + sqInt topRegistersMask; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask13; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask16; + sqInt topRegistersMask17; + sqInt topRegistersMask18; + sqInt topRegistersMask19; + sqInt topRegistersMask2; + sqInt topRegistersMask20; + sqInt topRegistersMask21; + sqInt topRegistersMask22; + sqInt topRegistersMask23; + sqInt topRegistersMask24; + sqInt topRegistersMask25; + sqInt topRegistersMask26; + sqInt topRegistersMask27; + sqInt topRegistersMask28; + sqInt topRegistersMask29; + sqInt topRegistersMask3; + sqInt topRegistersMask30; + sqInt topRegistersMask31; + sqInt topRegistersMask32; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value17; + sqInt value18; + sqInt value19; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueHigh1; + sqInt valueHighValue; + sqInt valueLow1; + sqInt valueLowValue; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue17; + sqInt valueValue18; + sqInt valueValue19; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + switch (prim) { case 0: - return genLowcodeAdd32(); + /* begin genLowcodeAdd32 */ + topRegistersMask = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, second, first); + ssPushNativeRegister(first); + return 0; case 1: - return genLowcodeAdd64(); + /* begin genLowcodeAdd64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop2 = (rNext2 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop2 == NoReg) { + registerMask = 0; + if (rNext2 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext2; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop2 = allocateRegNotConflictingWith(registerMask); + } + if (rNext2 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop2; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext2 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop2) | (1U << rNext2); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop2) | (1U << rNext2)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop2 == NoReg) + || ((rNext2 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow = rTop2; + secondHigh = rNext2; + firstLow = rNextNext; + firstHigh = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, secondLow, firstLow); + /* begin AddcR:R: */ + genoperandoperand(AddcRR, secondHigh, firstHigh); + ssPushNativeRegistersecondRegister(firstLow, firstHigh); + + return 0; case 2: - return genLowcodeAlloca32(); + /* begin genLowcodeAlloca32 */ + rTop3 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(0); + } + assert(!((rTop3 == NoReg))); + size = rTop3; + + nativePopToReg(ssNativeTop(), size); + ssNativePop(1); + /* begin MoveAw:R: */ + address = nativeStackPointerAddress(); + /* begin gen:literal:operand: */ + checkLiteralforInstruction(address, genoperandoperand(MoveAwR, address, TempReg)); + /* begin SubR:R: */ + genoperandoperand(SubRR, size, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(AndCqR, -16, TempReg); + if (usesOutOfLineLiteral(anInstruction)) { + (anInstruction->dependent = locateLiteral(-16)); + } + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, size); + /* begin MoveR:Aw: */ + address1 = nativeStackPointerAddress(); + /* begin gen:operand:literal: */ + checkLiteralforInstruction(address1, genoperandoperand(MoveRAw, size, address1)); + ssPushNativeRegister(size); + return 0; case 3: - return genLowcodeAlloca64(); + /* begin genLowcodeAlloca64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask2 = 0; + rTop4 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext3 == NoReg)))); + sizeLow = rTop4; + sizeHigh = rNext3; + + nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, sizeLow, SPReg); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, SPReg, sizeLow); + ssPushNativeRegister(sizeLow); + + return 0; case 4: - return genLowcodeAnd32(); + /* begin genLowcodeAnd32 */ + topRegistersMask3 = 0; + rTop5 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg3; + } + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop5); + } + assert(!(((rTop5 == NoReg) + || (rNext4 == NoReg)))); + second2 = rTop5; + first2 = rNext4; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin AndR:R: */ + genoperandoperand(AndRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 5: - return genLowcodeAnd64(); + /* begin genLowcodeAnd64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop6 = (rNext5 = (rNextNext1 = (rNextNextNext1 = NoReg))); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext5 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + nativeValueIndex1 += 1; + } + } + if (rTop6 == NoReg) { + registerMask1 = 0; + if (rNext5 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext5; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rTop6 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext5 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop6; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNext5 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop6) | (1U << rNext5); + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNextNext1 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask1 = ((1U << rTop6) | (1U << rNext5)) | (1U << rNextNext1); + rNextNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop6 == NoReg) + || ((rNext5 == NoReg) + || ((rNextNext1 == NoReg) + || (rNextNextNext1 == NoReg)))))); + secondLow1 = rTop6; + secondHigh1 = rNext5; + firstLow1 = rNextNext1; + firstHigh1 = rNextNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), secondLow1, secondHigh1); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow1, firstHigh1); + ssNativePop(1); + /* begin AndR:R: */ + genoperandoperand(AndRR, secondLow1, firstLow1); + /* begin AndR:R: */ + genoperandoperand(AndRR, secondHigh1, firstHigh1); + ssPushNativeRegistersecondRegister(firstLow1, firstHigh1); + + return 0; case 6: - return genLowcodeArithmeticRightShift32(); + /* begin genLowcodeArithmeticRightShift32 */ + topRegistersMask5 = 0; + rTop7 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop7 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1U << reg5; + } + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1U << rTop7); + } + assert(!(((rTop7 == NoReg) + || (rNext6 == NoReg)))); + shiftAmount = rTop7; + value = rNext6; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin ArithmeticShiftRightR:R: */ + genoperandoperand(ArithmeticShiftRightRR, shiftAmount, value); + ssPushNativeRegister(value); + return 0; case 7: - return genLowcodeArithmeticRightShift64(); + /* begin genLowcodeArithmeticRightShift64 */ + topRegistersMask6 = 0; + rTop8 = (rNext7 = NoReg); + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop8 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext7 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg6; + } + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1U << rTop8); + } + assert(!(((rTop8 == NoReg) + || (rNext7 == NoReg)))); + rResult = allocateFloatRegNotConflictingWith((1U << rTop8) | (1U << rNext7)); + assert(!((rResult == NoReg))); + shiftAmount1 = rTop8; + value1 = rNext7; + result = rResult; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + abort(); + return 0; case 8: - return genLowcodeBeginCall(); + /* begin genLowcodeBeginCall */ + alignment = extA; + beginHighLevelCall(alignment); + extA = 0; + return 0; case 9: - return genLowcodeCallArgumentFloat32(); + /* begin genLowcodeCallArgumentFloat32 */ + nativeStackPopToReg(ssNativeTop(), DPFPReg0); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperandoperand(MoveRsM32r, DPFPReg0, -BytesPerWord, SPReg); + if (usesOutOfLineLiteral(anInstruction1)) { + (anInstruction1->dependent = locateLiteral(-BytesPerWord)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(SubCqR, BytesPerWord, SPReg); + if (usesOutOfLineLiteral(anInstruction2)) { + (anInstruction2->dependent = locateLiteral(BytesPerWord)); + } + currentCallCleanUpSize += BytesPerWord; + return 0; case 10: - return genLowcodeCallArgumentFloat64(); + /* begin genLowcodeCallArgumentFloat64 */ + nativeStackPopToReg(ssNativeTop(), DPFPReg0); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperandoperand(MoveRdM64r, DPFPReg0, -8, SPReg); + if (usesOutOfLineLiteral(anInstruction3)) { + (anInstruction3->dependent = locateLiteral(-8)); + } + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(SubCqR, 8, SPReg); + if (usesOutOfLineLiteral(anInstruction4)) { + (anInstruction4->dependent = locateLiteral(8)); + } + currentCallCleanUpSize += 8; + return 0; case 11: - return genLowcodeCallArgumentInt32(); + /* begin genLowcodeCallArgumentInt32 */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 12: - return genLowcodeCallArgumentInt64(); + /* begin genLowcodeCallArgumentInt64 */ + nativeStackPopToRegsecondReg(ssNativeTop(), TempReg, ReceiverResultReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + /* begin PushR: */ + genoperand(PushR, ReceiverResultReg); + currentCallCleanUpSize += 8; + + return 0; case 13: - return genLowcodeCallArgumentPointer(); + /* begin genLowcodeCallArgumentPointer */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 14: - return genLowcodeCallArgumentSpace(); + /* begin genLowcodeCallArgumentSpace */ + anInstruction5 = genoperandoperand(SubCqR, extA, SPReg); + if (usesOutOfLineLiteral(anInstruction5)) { + (anInstruction5->dependent = locateLiteral(extA)); + } + currentCallCleanUpSize += extA; + extA = 0; + return 0; case 15: - return genLowcodeCallArgumentStructure(); + /* begin genLowcodeCallArgumentStructure */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperand(SubCqR, extA, SPReg); + if (usesOutOfLineLiteral(anInstruction6)) { + (anInstruction6->dependent = locateLiteral(extA)); + } + + /* Copy the structure */ + currentCallCleanUpSize += extA; + genMemCopytoconstantSize(backEnd, TempReg, SPReg, extA); + extA = 0; + return 0; case 16: - return genLowcodeCallInstruction(); + /* begin genLowcodeCallInstruction */ + function = extA; + /* begin CallRT: */ + abstractInstruction = genoperand(Call, function); + (abstractInstruction->annotation = IsRelativeCall); + extA = 0; + return 0; case 17: - return genLowcodeCallPhysical(); + /* begin genLowcodeCallPhysical */ + registerID = extA; + /* begin CallR: */ + genoperand(CallR, registerID); + extA = 0; + return 0; case 18: - return genLowcodeCheckSessionIdentifier(); + /* begin genLowcodeCheckSessionIdentifier */ + expectedSession = extA; + ssPushNativeConstantInt32((expectedSession == (getThisSessionID()) + ? 1 + : 0)); + extA = 0; + return 0; case 19: - return genLowcodeCompareAndSwap32(); + /* begin genLowcodeCompareAndSwap32 */ + rTop9 = (rNext8 = (rNextNext2 = NoReg)); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext8 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + } + if (rTop9 == NoReg) { + registerMask2 = 0; + if (rNext8 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rNext8; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rTop9 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext8 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rTop9; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rNext8 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1U << rTop9) | (1U << rNext8); + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop9 == NoReg) + || ((rNext8 == NoReg) + || (rNextNext2 == NoReg))))); + rResult1 = allocateRegNotConflictingWith(((1U << rTop9) | (1U << rNext8)) | (1U << rNextNext2)); + assert(!((rResult1 == NoReg))); + newValue = rTop9; + oldValue = rNext8; + check = rNextNext2; + value2 = rResult1; + + nativePopToReg(ssNativeTop(), newValue); + ssNativePop(1); + nativePopToReg(ssNativeTop(), oldValue); + ssNativePop(1); + nativePopToReg(ssNativeTop(), check); + ssNativePop(1); + abort(); + return 0; case 20: - return genLowcodeDiv32(); + /* begin genLowcodeDiv32 */ + topRegistersMask7 = 0; + rTop10 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop10 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1U << reg7; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext9 == NoReg)))); + second4 = rTop10; + first4 = rNext9; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + gDivRRQuoRem(second4, first4, first4, second4); + ssPushNativeRegister(first4); + return 0; case 21: - return genLowcodeDiv64(); + /* begin genLowcodeDiv64 */ + topRegistersMask8 = 0; + rTop13 = (rNext10 = NoReg); + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop13 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg8; + } + } + if (rTop13 == NoReg) { + rTop13 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop13); + } + assert(!(((rTop13 == NoReg) + || (rNext10 == NoReg)))); + rResult2 = allocateFloatRegNotConflictingWith((1U << rTop13) | (1U << rNext10)); + assert(!((rResult2 == NoReg))); + second5 = rTop13; + first5 = rNext10; + result1 = rResult2; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + abort(); + return 0; case 22: - return genLowcodeDuplicateFloat32(); + /* begin genLowcodeDuplicateFloat32 */ + frTop = NoReg; + + /* Float argument */ + frResult = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(1U << frTop); + assert(!(((frTop == NoReg) + || (frResult == NoReg)))); + value3 = frTop; + dup2 = frResult; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin MoveRs:Rs: */ + genoperandoperand(MoveRsRs, value3, dup2); + ssPushNativeRegisterSingleFloat(value3); + ssPushNativeRegisterSingleFloat(dup2); + return 0; case 23: - return genLowcodeDuplicateFloat64(); + /* begin genLowcodeDuplicateFloat64 */ + frTop1 = NoReg; + + /* Float argument */ + frResult1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(1U << frTop1); + assert(!(((frTop1 == NoReg) + || (frResult1 == NoReg)))); + value4 = frTop1; + dup21 = frResult1; + + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + /* begin MoveRd:Rd: */ + genoperandoperand(MoveRdRd, value4, dup21); + ssPushNativeRegisterDoubleFloat(value4); + ssPushNativeRegisterDoubleFloat(dup21); + return 0; case 24: - return genLowcodeDuplicateInt32(); + /* begin genLowcodeDuplicateInt32 */ + rTop14 = NoReg; + rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop14 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rTop14); + assert(!(((rTop14 == NoReg) + || (rResult3 == NoReg)))); + value5 = rTop14; + dup22 = rResult3; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value5, dup22); + ssPushNativeRegister(value5); + ssPushNativeRegister(dup22); + return 0; case 25: - return genLowcodeDuplicateInt64(); + /* begin genLowcodeDuplicateInt64 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger2: */ + topRegistersMask9 = 0; + rTop16 = (rNext12 = NoReg); + rResult4 = (rResult21 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop16 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext12 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0)); + if (rNext12 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext12 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1U << reg9; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext12 == NoReg) { + rNext12 = allocateRegNotConflictingWith(1U << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext12 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop16) | (1U << rNext12)); + rResult21 = allocateFloatRegNotConflictingWith(((1U << rTop16) | (1U << rNext12)) | (1U << rResult4)); + assert(!(((rResult4 == NoReg) + || (rResult21 == NoReg)))); + valueLow1 = rTop16; + valueHigh1 = rNext12; + dup2Low = rResult4; + dup2High = rResult21; + + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, valueLow1, dup2Low); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, valueHigh1, dup2High); + ssPushNativeRegistersecondRegister(valueLow1, valueHigh1); + ssPushNativeRegistersecondRegister(dup2Low, dup2High); + + return 0; case 26: - return genLowcodeDuplicatePointer(); + /* begin genLowcodeDuplicatePointer */ + rTop17 = NoReg; + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop17 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(0); + } + rResult5 = allocateRegNotConflictingWith(1U << rTop17); + assert(!(((rTop17 == NoReg) + || (rResult5 == NoReg)))); + pointerValue = rTop17; + dup24 = rResult5; + + nativePopToReg(ssNativeTop(), pointerValue); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointerValue, dup24); + ssPushNativeRegister(pointerValue); + ssPushNativeRegister(dup24); + return 0; case 27: - return genLowcodeEffectiveAddress32(); + /* begin genLowcodeEffectiveAddress32 */ + rTop18 = (rNext13 = (rNextNext3 = (rNextNextNext2 = NoReg))); + nativeValueIndex3 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNext13 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + nativeValueIndex3 += 1; + } + } + if (rTop18 == NoReg) { + registerMask3 = 0; + if (rNext13 != NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rNext13; + } + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNextNext2); + } + rTop18 = allocateRegNotConflictingWith(registerMask3); + } + if (rNext13 == NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rTop18; + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNextNext2); + } + rNext13 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNext3 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask3 = (1U << rTop18) | (1U << rNext13); + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNextNext2); + } + rNextNext3 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNextNext2 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask3 = ((1U << rTop18) | (1U << rNext13)) | (1U << rNextNext3); + rNextNextNext2 = allocateRegNotConflictingWith(registerMask3); + } + assert(!(((rTop18 == NoReg) + || ((rNext13 == NoReg) + || ((rNextNext3 == NoReg) + || (rNextNextNext2 == NoReg)))))); + offset = rTop18; + scale = rNext13; + index = rNextNext3; + base = rNextNextNext2; + + nativePopToReg(ssNativeTop(), offset); + ssNativePop(1); + nativePopToReg(ssNativeTop(), scale); + ssNativePop(1); + nativePopToReg(ssNativeTop(), index); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, scale, index); + /* begin AddR:R: */ + genoperandoperand(AddRR, index, base); + /* begin AddR:R: */ + genoperandoperand(AddRR, offset, base); + ssPushNativeRegister(base); + return 0; case 28: - return genLowcodeEffectiveAddress64(); + /* begin genLowcodeEffectiveAddress64 */ + rTop19 = (rNext14 = (rNextNext4 = (rNextNextNext3 = NoReg))); + rResult6 = NoReg; + nativeValueIndex4 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNext14 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNext4 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + } + nativeValueIndex4 += 1; + } + } + if (rNextNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNext4 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNextNext3 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4)); + } + nativeValueIndex4 += 1; + } + } + if (rNextNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + nativeValueIndex4 += 1; + } + } + if (rTop19 == NoReg) { + registerMask4 = 0; + if (rNext14 != NoReg) { + /* begin registerMaskFor: */ + registerMask4 = 1U << rNext14; + } + if (rNextNext4 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNext4); + } + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNextNext3); + } + rTop19 = allocateRegNotConflictingWith(registerMask4); + } + if (rNext14 == NoReg) { + /* begin registerMaskFor: */ + registerMask4 = 1U << rTop19; + if (rNextNext4 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNext4); + } + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNextNext3); + } + rNext14 = allocateRegNotConflictingWith(registerMask4); + } + if (rNextNext4 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask4 = (1U << rTop19) | (1U << rNext14); + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNextNext3); + } + rNextNext4 = allocateRegNotConflictingWith(registerMask4); + } + if (rNextNextNext3 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask4 = ((1U << rTop19) | (1U << rNext14)) | (1U << rNextNext4); + rNextNextNext3 = allocateRegNotConflictingWith(registerMask4); + } + assert(!(((rTop19 == NoReg) + || ((rNext14 == NoReg) + || ((rNextNext4 == NoReg) + || (rNextNextNext3 == NoReg)))))); + rResult6 = allocateRegNotConflictingWith((((1U << rTop19) | (1U << rNext14)) | (1U << rNextNext4)) | (1U << rNextNextNext3)); + offset1 = rTop19; + scale1 = rNext14; + index1 = rNextNext4; + base1 = rNextNextNext3; + result2 = rResult6; + + nativePopToReg(ssNativeTop(), offset1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), scale1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), index1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base1); + ssNativePop(1); + abort(); + return 0; case 29: - return genLowcodeEndCall(); + /* begin genLowcodeEndCall */ + endHighLevelCallWithCleanup(); + return 0; case 30: - return genLowcodeEndCallNoCleanup(); + /* begin genLowcodeEndCallNoCleanup */ + endHighLevelCallWithoutCleanup(); + return 0; case 0x1F: - return genLowcodeFloat32Add(); + /* begin genLowcodeFloat32Add */ + topRegistersMask10 = 0; + rTop20 = (rNext15 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext15 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask10 = 1U << reg10; + } + if (rTop20 == NoReg) { + rTop20 = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + if (rNext15 == NoReg) { + rNext15 = allocateFloatRegNotConflictingWith(1U << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext15 == NoReg)))); + second6 = rTop20; + first6 = rNext15; + + nativePopToReg(ssNativeTop(), second6); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first6); + ssNativePop(1); + /* begin AddRs:Rs: */ + genoperandoperand(AddRsRs, second6, first6); + ssPushNativeRegisterSingleFloat(first6); + return 0; case 32: - return genLowcodeFloat32Div(); + /* begin genLowcodeFloat32Div */ + topRegistersMask11 = 0; + rTop21 = (rNext16 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg11 = (rNext16 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1U << reg11; + } + if (rTop21 == NoReg) { + rTop21 = allocateFloatRegNotConflictingWith(topRegistersMask11); + } + if (rNext16 == NoReg) { + rNext16 = allocateFloatRegNotConflictingWith(1U << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext16 == NoReg)))); + second7 = rTop21; + first7 = rNext16; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + /* begin DivRs:Rs: */ + genoperandoperand(DivRsRs, second7, first7); + ssPushNativeRegisterSingleFloat(first7); + return 0; case 33: - return genLowcodeFloat32Equal(); + /* begin genLowcodeFloat32Equal */ + topRegistersMask12 = 0; + frTop2 = (frNext = NoReg); + rResult7 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (frNext = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1U << reg12; + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(topRegistersMask12); + } + if (frNext == NoReg) { + frNext = allocateFloatRegNotConflictingWith(1U << frTop2); + } + rResult7 = allocateRegNotConflictingWith(0); + assert(!(((frTop2 == NoReg) + || ((frNext == NoReg) + || (rResult7))))); + second8 = frTop2; + first8 = frNext; + value7 = rResult7; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second8, first8); + + /* True result */ + falseJump = gJumpFPNotEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperand(MoveCqR, 1, value7); + if (usesOutOfLineLiteral(anInstruction7)) { + (anInstruction7->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperand(MoveCqR, 0, value7); + if (usesOutOfLineLiteral(anInstruction8)) { + (anInstruction8->dependent = locateLiteral(0)); + } + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value7); + return 0; case 34: - return genLowcodeFloat32Great(); + /* begin genLowcodeFloat32Great */ + topRegistersMask13 = 0; + frTop3 = (frNext1 = NoReg); + rResult8 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (frNext1 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1U << reg13; + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(topRegistersMask13); + } + if (frNext1 == NoReg) { + frNext1 = allocateFloatRegNotConflictingWith(1U << frTop3); + } + rResult8 = allocateRegNotConflictingWith(0); + assert(!(((frTop3 == NoReg) + || ((frNext1 == NoReg) + || (rResult8))))); + second9 = frTop3; + first9 = frNext1; + value8 = rResult8; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second9, first9); + + /* True result */ + falseJump1 = gJumpFPLessOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperand(MoveCqR, 1, value8); + if (usesOutOfLineLiteral(anInstruction9)) { + (anInstruction9->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperand(MoveCqR, 0, value8); + if (usesOutOfLineLiteral(anInstruction10)) { + (anInstruction10->dependent = locateLiteral(0)); + } + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value8); + return 0; case 35: - return genLowcodeFloat32GreatEqual(); + /* begin genLowcodeFloat32GreatEqual */ + topRegistersMask14 = 0; + frTop4 = (frNext2 = NoReg); + rResult9 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop4 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (frNext2 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1U << reg14; + } + if (frTop4 == NoReg) { + frTop4 = allocateFloatRegNotConflictingWith(topRegistersMask14); + } + if (frNext2 == NoReg) { + frNext2 = allocateFloatRegNotConflictingWith(1U << frTop4); + } + rResult9 = allocateRegNotConflictingWith(0); + assert(!(((frTop4 == NoReg) + || ((frNext2 == NoReg) + || (rResult9))))); + second10 = frTop4; + first10 = frNext2; + value9 = rResult9; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second10, first10); + + /* True result */ + falseJump2 = gJumpFPLess(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperand(MoveCqR, 1, value9); + if (usesOutOfLineLiteral(anInstruction11)) { + (anInstruction11->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperand(MoveCqR, 0, value9); + if (usesOutOfLineLiteral(anInstruction12)) { + (anInstruction12->dependent = locateLiteral(0)); + } + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value9); + return 0; case 36: - return genLowcodeFloat32Less(); + /* begin genLowcodeFloat32Less */ + topRegistersMask15 = 0; + frTop5 = (frNext3 = NoReg); + rResult10 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop5 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (frNext3 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1U << reg15; + } + if (frTop5 == NoReg) { + frTop5 = allocateFloatRegNotConflictingWith(topRegistersMask15); + } + if (frNext3 == NoReg) { + frNext3 = allocateFloatRegNotConflictingWith(1U << frTop5); + } + rResult10 = allocateRegNotConflictingWith(0); + assert(!(((frTop5 == NoReg) + || ((frNext3 == NoReg) + || (rResult10))))); + second11 = frTop5; + first11 = frNext3; + value10 = rResult10; + + nativePopToReg(ssNativeTop(), second11); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first11); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second11, first11); + + /* True result */ + falseJump3 = gJumpFPGreaterOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperand(MoveCqR, 1, value10); + if (usesOutOfLineLiteral(anInstruction13)) { + (anInstruction13->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperand(MoveCqR, 0, value10); + if (usesOutOfLineLiteral(anInstruction14)) { + (anInstruction14->dependent = locateLiteral(0)); + } + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value10); + return 0; case 37: - return genLowcodeFloat32LessEqual(); + /* begin genLowcodeFloat32LessEqual */ + topRegistersMask16 = 0; + frTop6 = (frNext4 = NoReg); + rResult12 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop6 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg16 = (frNext4 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask16 = 1U << reg16; + } + if (frTop6 == NoReg) { + frTop6 = allocateFloatRegNotConflictingWith(topRegistersMask16); + } + if (frNext4 == NoReg) { + frNext4 = allocateFloatRegNotConflictingWith(1U << frTop6); + } + rResult12 = allocateRegNotConflictingWith(0); + assert(!(((frTop6 == NoReg) + || ((frNext4 == NoReg) + || (rResult12))))); + second12 = frTop6; + first12 = frNext4; + value11 = rResult12; + + nativePopToReg(ssNativeTop(), second12); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first12); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second12, first12); + + /* True result */ + falseJump4 = gJumpFPGreater(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperand(MoveCqR, 1, value11); + if (usesOutOfLineLiteral(anInstruction15)) { + (anInstruction15->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump4 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCqR, 0, value11); + if (usesOutOfLineLiteral(anInstruction16)) { + (anInstruction16->dependent = locateLiteral(0)); + } + jmpTarget(contJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value11); + return 0; case 38: - return genLowcodeFloat32Mul(); + /* begin genLowcodeFloat32Mul */ + topRegistersMask17 = 0; + rTop22 = (rNext17 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop22 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg17 = (rNext17 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask17 = 1U << reg17; + } + if (rTop22 == NoReg) { + rTop22 = allocateFloatRegNotConflictingWith(topRegistersMask17); + } + if (rNext17 == NoReg) { + rNext17 = allocateFloatRegNotConflictingWith(1U << rTop22); + } + assert(!(((rTop22 == NoReg) + || (rNext17 == NoReg)))); + second13 = rTop22; + first13 = rNext17; + + nativePopToReg(ssNativeTop(), second13); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first13); + ssNativePop(1); + /* begin MulRs:Rs: */ + genoperandoperand(MulRsRs, second13, first13); + ssPushNativeRegisterSingleFloat(first13); + return 0; case 39: - return genLowcodeFloat32Neg(); + /* begin genLowcodeFloat32Neg */ + frTop7 = NoReg; + + /* Float argument */ + frResult2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop7 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop7 == NoReg) { + frTop7 = allocateFloatRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(1U << frTop7); + assert(!(((frTop7 == NoReg) + || (frResult2 == NoReg)))); + value12 = frTop7; + result3 = frResult2; + + nativePopToReg(ssNativeTop(), value12); + ssNativePop(1); + /* begin XorRs:Rs: */ + genoperandoperand(XorRsRs, result3, result3); + /* begin SubRs:Rs: */ + genoperandoperand(SubRsRs, value12, result3); + ssPushNativeRegisterSingleFloat(result3); + return 0; case 40: - return genLowcodeFloat32NotEqual(); + /* begin genLowcodeFloat32NotEqual */ + topRegistersMask18 = 0; + frTop8 = (frNext5 = NoReg); + rResult13 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop8 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg18 = (frNext5 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask18 = 1U << reg18; + } + if (frTop8 == NoReg) { + frTop8 = allocateFloatRegNotConflictingWith(topRegistersMask18); + } + if (frNext5 == NoReg) { + frNext5 = allocateFloatRegNotConflictingWith(1U << frTop8); + } + rResult13 = allocateRegNotConflictingWith(0); + assert(!(((frTop8 == NoReg) + || ((frNext5 == NoReg) + || (rResult13))))); + second14 = frTop8; + first14 = frNext5; + value13 = rResult13; + + nativePopToReg(ssNativeTop(), second14); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first14); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second14, first14); + + /* True result */ + falseJump5 = gJumpFPEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(MoveCqR, 1, value13); + if (usesOutOfLineLiteral(anInstruction17)) { + (anInstruction17->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump5 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperand(MoveCqR, 0, value13); + if (usesOutOfLineLiteral(anInstruction18)) { + (anInstruction18->dependent = locateLiteral(0)); + } + jmpTarget(contJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value13); + return 0; case 41: - return genLowcodeFloat32Sqrt(); + /* begin genLowcodeFloat32Sqrt */ + topRegistersMask19 = 0; + frTop9 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop9 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop9 == NoReg) { + frTop9 = allocateFloatRegNotConflictingWith(topRegistersMask19); + } + assert(!((frTop9 == NoReg))); + value14 = frTop9; + + nativePopToReg(ssNativeTop(), value14); + ssNativePop(1); + /* begin SqrtRs: */ + genoperand(SqrtRs, value14); + ssPushNativeRegisterSingleFloat(value14); + return 0; case 42: - return genLowcodeFloat32Sub(); + /* begin genLowcodeFloat32Sub */ + topRegistersMask20 = 0; + rTop23 = (rNext18 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg19 = (rNext18 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask20 = 1U << reg19; + } + if (rTop23 == NoReg) { + rTop23 = allocateFloatRegNotConflictingWith(topRegistersMask20); + } + if (rNext18 == NoReg) { + rNext18 = allocateFloatRegNotConflictingWith(1U << rTop23); + } + assert(!(((rTop23 == NoReg) + || (rNext18 == NoReg)))); + second15 = rTop23; + first15 = rNext18; + + nativePopToReg(ssNativeTop(), second15); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first15); + ssNativePop(1); + /* begin SubRs:Rs: */ + genoperandoperand(SubRsRs, second15, first15); + ssPushNativeRegisterSingleFloat(first15); + return 0; case 43: - return genLowcodeFloat32ToFloat64(); + /* begin genLowcodeFloat32ToFloat64 */ + topRegistersMask21 = 0; + frTop10 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop10 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop10 == NoReg) { + frTop10 = allocateFloatRegNotConflictingWith(topRegistersMask21); + } + assert(!((frTop10 == NoReg))); + singleFloatValue = frTop10; + + nativePopToReg(ssNativeTop(), singleFloatValue); + ssNativePop(1); + /* begin ConvertRs:Rd: */ + genoperandoperand(ConvertRsRd, singleFloatValue, singleFloatValue); + ssPushNativeRegisterDoubleFloat(singleFloatValue); + return 0; case 44: - return genLowcodeFloat32ToInt32(); + /* begin genLowcodeFloat32ToInt32 */ + frTop11 = NoReg; + + /* Float argument */ + rResult14 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop11 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop11 == NoReg) { + frTop11 = allocateFloatRegNotConflictingWith(0); + } + rResult14 = allocateRegNotConflictingWith(0); + assert(!(((frTop11 == NoReg) + || (rResult14 == NoReg)))); + value15 = frTop11; + result4 = rResult14; + + nativePopToReg(ssNativeTop(), value15); + ssNativePop(1); + /* begin ConvertRs:R: */ + genoperandoperand(ConvertRsR, value15, result4); + ssPushNativeRegister(result4); + return 0; case 45: - return genLowcodeFloat32ToInt64(); + /* begin genLowcodeFloat32ToInt64 */ + frTop12 = NoReg; + + /* Float argument */ + rResult15 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop12 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop12 == NoReg) { + frTop12 = allocateFloatRegNotConflictingWith(0); + } + rResult15 = allocateRegNotConflictingWith(0); + assert(!(((frTop12 == NoReg) + || (rResult15 == NoReg)))); + value16 = frTop12; + result5 = rResult15; + + nativePopToReg(ssNativeTop(), value16); + ssNativePop(1); + abort(); + return 0; case 46: - return genLowcodeFloat32ToUInt32(); + /* begin genLowcodeFloat32ToUInt32 */ + frTop13 = NoReg; + + /* Float argument */ + rResult16 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop13 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop13 == NoReg) { + frTop13 = allocateFloatRegNotConflictingWith(0); + } + rResult16 = allocateRegNotConflictingWith(0); + assert(!(((frTop13 == NoReg) + || (rResult16 == NoReg)))); + value17 = frTop13; + result6 = rResult16; + + nativePopToReg(ssNativeTop(), value17); + ssNativePop(1); + /* begin ConvertRs:R: */ + genoperandoperand(ConvertRsR, value17, result6); + ssPushNativeRegister(result6); + return 0; case 47: - return genLowcodeFloat32ToUInt64(); + /* begin genLowcodeFloat32ToUInt64 */ + frTop14 = NoReg; + + /* Float argument */ + rResult17 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop14 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop14 == NoReg) { + frTop14 = allocateFloatRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(0); + assert(!(((frTop14 == NoReg) + || (rResult17 == NoReg)))); + value18 = frTop14; + result7 = rResult17; + + nativePopToReg(ssNativeTop(), value18); + ssNativePop(1); + abort(); + return 0; case 48: - return genLowcodeFloat64Add(); + /* begin genLowcodeFloat64Add */ + topRegistersMask22 = 0; + rTop24 = (rNext19 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg20 = (rNext19 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask22 = 1U << reg20; + } + if (rTop24 == NoReg) { + rTop24 = allocateFloatRegNotConflictingWith(topRegistersMask22); + } + if (rNext19 == NoReg) { + rNext19 = allocateFloatRegNotConflictingWith(1U << rTop24); + } + assert(!(((rTop24 == NoReg) + || (rNext19 == NoReg)))); + second16 = rTop24; + first16 = rNext19; + + nativePopToReg(ssNativeTop(), second16); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first16); + ssNativePop(1); + /* begin AddRd:Rd: */ + genoperandoperand(AddRdRd, second16, first16); + ssPushNativeRegisterDoubleFloat(first16); + return 0; case 49: - return genLowcodeFloat64Div(); + /* begin genLowcodeFloat64Div */ + topRegistersMask23 = 0; + rTop25 = (rNext20 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg21 = (rNext20 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask23 = 1U << reg21; + } + if (rTop25 == NoReg) { + rTop25 = allocateFloatRegNotConflictingWith(topRegistersMask23); + } + if (rNext20 == NoReg) { + rNext20 = allocateFloatRegNotConflictingWith(1U << rTop25); + } + assert(!(((rTop25 == NoReg) + || (rNext20 == NoReg)))); + second17 = rTop25; + first17 = rNext20; + + nativePopToReg(ssNativeTop(), second17); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first17); + ssNativePop(1); + /* begin DivRd:Rd: */ + genoperandoperand(DivRdRd, second17, first17); + ssPushNativeRegisterDoubleFloat(first17); + return 0; case 50: - return genLowcodeFloat64Equal(); + /* begin genLowcodeFloat64Equal */ + topRegistersMask24 = 0; + frTop15 = (frNext6 = NoReg); + rResult18 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop15 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg22 = (frNext6 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask24 = 1U << reg22; + } + if (frTop15 == NoReg) { + frTop15 = allocateFloatRegNotConflictingWith(topRegistersMask24); + } + if (frNext6 == NoReg) { + frNext6 = allocateFloatRegNotConflictingWith(1U << frTop15); + } + rResult18 = allocateRegNotConflictingWith(0); + assert(!(((frTop15 == NoReg) + || ((frNext6 == NoReg) + || (rResult18))))); + second18 = frTop15; + first18 = frNext6; + value19 = rResult18; + + nativePopToReg(ssNativeTop(), second18); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first18); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second18, first18); + + /* True result */ + falseJump6 = gJumpFPNotEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperand(MoveCqR, 1, value19); + if (usesOutOfLineLiteral(anInstruction19)) { + (anInstruction19->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump6 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperand(MoveCqR, 0, value19); + if (usesOutOfLineLiteral(anInstruction20)) { + (anInstruction20->dependent = locateLiteral(0)); + } + jmpTarget(contJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value19); + return 0; case 51: - return genLowcodeFloat64Great(); + /* begin genLowcodeFloat64Great */ + topRegistersMask25 = 0; + frTop16 = (frNext7 = NoReg); + rResult19 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop16 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg23 = (frNext7 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask25 = 1U << reg23; + } + if (frTop16 == NoReg) { + frTop16 = allocateFloatRegNotConflictingWith(topRegistersMask25); + } + if (frNext7 == NoReg) { + frNext7 = allocateFloatRegNotConflictingWith(1U << frTop16); + } + rResult19 = allocateRegNotConflictingWith(0); + assert(!(((frTop16 == NoReg) + || ((frNext7 == NoReg) + || (rResult19))))); + second19 = frTop16; + first19 = frNext7; + value20 = rResult19; + + nativePopToReg(ssNativeTop(), second19); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first19); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second19, first19); + + /* True result */ + falseJump7 = gJumpFPLessOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction21 = genoperandoperand(MoveCqR, 1, value20); + if (usesOutOfLineLiteral(anInstruction21)) { + (anInstruction21->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump7 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperand(MoveCqR, 0, value20); + if (usesOutOfLineLiteral(anInstruction22)) { + (anInstruction22->dependent = locateLiteral(0)); + } + jmpTarget(contJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value20); + return 0; case 52: - return genLowcodeFloat64GreatEqual(); + /* begin genLowcodeFloat64GreatEqual */ + topRegistersMask26 = 0; + frTop17 = (frNext8 = NoReg); + rResult20 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop17 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg24 = (frNext8 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask26 = 1U << reg24; + } + if (frTop17 == NoReg) { + frTop17 = allocateFloatRegNotConflictingWith(topRegistersMask26); + } + if (frNext8 == NoReg) { + frNext8 = allocateFloatRegNotConflictingWith(1U << frTop17); + } + rResult20 = allocateRegNotConflictingWith(0); + assert(!(((frTop17 == NoReg) + || ((frNext8 == NoReg) + || (rResult20))))); + second20 = frTop17; + first20 = frNext8; + value21 = rResult20; + + nativePopToReg(ssNativeTop(), second20); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first20); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second20, first20); + + /* True result */ + falseJump8 = gJumpFPLess(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperand(MoveCqR, 1, value21); + if (usesOutOfLineLiteral(anInstruction23)) { + (anInstruction23->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump8 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump8, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(MoveCqR, 0, value21); + if (usesOutOfLineLiteral(anInstruction24)) { + (anInstruction24->dependent = locateLiteral(0)); + } + jmpTarget(contJump8, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value21); + return 0; case 53: - return genLowcodeFloat64Less(); + /* begin genLowcodeFloat64Less */ + topRegistersMask27 = 0; + frTop18 = (frNext9 = NoReg); + rResult22 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop18 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg25 = (frNext9 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask27 = 1U << reg25; + } + if (frTop18 == NoReg) { + frTop18 = allocateFloatRegNotConflictingWith(topRegistersMask27); + } + if (frNext9 == NoReg) { + frNext9 = allocateFloatRegNotConflictingWith(1U << frTop18); + } + rResult22 = allocateRegNotConflictingWith(0); + assert(!(((frTop18 == NoReg) + || ((frNext9 == NoReg) + || (rResult22))))); + second21 = frTop18; + first21 = frNext9; + value22 = rResult22; + + nativePopToReg(ssNativeTop(), second21); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first21); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second21, first21); + + /* True result */ + falseJump9 = gJumpFPGreaterOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction25 = genoperandoperand(MoveCqR, 1, value22); + if (usesOutOfLineLiteral(anInstruction25)) { + (anInstruction25->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump9 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump9, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperand(MoveCqR, 0, value22); + if (usesOutOfLineLiteral(anInstruction26)) { + (anInstruction26->dependent = locateLiteral(0)); + } + jmpTarget(contJump9, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value22); + return 0; case 54: - return genLowcodeFloat64LessEqual(); + /* begin genLowcodeFloat64LessEqual */ + topRegistersMask28 = 0; + frTop19 = (frNext10 = NoReg); + rResult23 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop19 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg26 = (frNext10 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask28 = 1U << reg26; + } + if (frTop19 == NoReg) { + frTop19 = allocateFloatRegNotConflictingWith(topRegistersMask28); + } + if (frNext10 == NoReg) { + frNext10 = allocateFloatRegNotConflictingWith(1U << frTop19); + } + rResult23 = allocateRegNotConflictingWith(0); + assert(!(((frTop19 == NoReg) + || ((frNext10 == NoReg) + || (rResult23))))); + second22 = frTop19; + first22 = frNext10; + value23 = rResult23; + + nativePopToReg(ssNativeTop(), second22); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first22); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second22, first22); + + /* True result */ + falseJump10 = gJumpFPGreater(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction27 = genoperandoperand(MoveCqR, 1, value23); + if (usesOutOfLineLiteral(anInstruction27)) { + (anInstruction27->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump10 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump10, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction28 = genoperandoperand(MoveCqR, 0, value23); + if (usesOutOfLineLiteral(anInstruction28)) { + (anInstruction28->dependent = locateLiteral(0)); + } + jmpTarget(contJump10, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value23); + return 0; case 55: - return genLowcodeFloat64Mul(); + /* begin genLowcodeFloat64Mul */ + topRegistersMask29 = 0; + rTop26 = (rNext21 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop26 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg27 = (rNext21 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask29 = 1U << reg27; + } + if (rTop26 == NoReg) { + rTop26 = allocateFloatRegNotConflictingWith(topRegistersMask29); + } + if (rNext21 == NoReg) { + rNext21 = allocateFloatRegNotConflictingWith(1U << rTop26); + } + assert(!(((rTop26 == NoReg) + || (rNext21 == NoReg)))); + second23 = rTop26; + first23 = rNext21; + + nativePopToReg(ssNativeTop(), second23); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first23); + ssNativePop(1); + /* begin MulRd:Rd: */ + genoperandoperand(MulRdRd, second23, first23); + ssPushNativeRegisterDoubleFloat(first23); + return 0; case 56: - return genLowcodeFloat64Neg(); + /* begin genLowcodeFloat64Neg */ + frTop20 = NoReg; + + /* Float argument */ + frResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop20 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop20 == NoReg) { + frTop20 = allocateFloatRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(1U << frTop20); + assert(!(((frTop20 == NoReg) + || (frResult3 == NoReg)))); + value24 = frTop20; + result8 = frResult3; + + nativePopToReg(ssNativeTop(), value24); + ssNativePop(1); + /* begin XorRd:Rd: */ + genoperandoperand(XorRdRd, result8, result8); + /* begin SubRd:Rd: */ + genoperandoperand(SubRdRd, value24, result8); + ssPushNativeRegisterDoubleFloat(result8); + return 0; case 57: - return genLowcodeFloat64NotEqual(); + /* begin genLowcodeFloat64NotEqual */ + topRegistersMask30 = 0; + frTop21 = (frNext11 = NoReg); + rResult24 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop21 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg28 = (frNext11 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask30 = 1U << reg28; + } + if (frTop21 == NoReg) { + frTop21 = allocateFloatRegNotConflictingWith(topRegistersMask30); + } + if (frNext11 == NoReg) { + frNext11 = allocateFloatRegNotConflictingWith(1U << frTop21); + } + rResult24 = allocateRegNotConflictingWith(0); + assert(!(((frTop21 == NoReg) + || ((frNext11 == NoReg) + || (rResult24))))); + second24 = frTop21; + first24 = frNext11; + value25 = rResult24; + + nativePopToReg(ssNativeTop(), second24); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first24); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second24, first24); + + /* True result */ + falseJump11 = gJumpFPEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperand(MoveCqR, 1, value25); + if (usesOutOfLineLiteral(anInstruction29)) { + (anInstruction29->dependent = locateLiteral(1)); + } + /* begin Jump: */ + contJump11 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump11, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction30 = genoperandoperand(MoveCqR, 0, value25); + if (usesOutOfLineLiteral(anInstruction30)) { + (anInstruction30->dependent = locateLiteral(0)); + } + jmpTarget(contJump11, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value25); + return 0; case 58: - return genLowcodeFloat64Sqrt(); + /* begin genLowcodeFloat64Sqrt */ + topRegistersMask31 = 0; + frTop22 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop22 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop22 == NoReg) { + frTop22 = allocateFloatRegNotConflictingWith(topRegistersMask31); + } + assert(!((frTop22 == NoReg))); + value26 = frTop22; + + nativePopToReg(ssNativeTop(), value26); + ssNativePop(1); + /* begin SqrtRd: */ + genoperand(SqrtRd, value26); + ssPushNativeRegisterDoubleFloat(value26); + return 0; case 59: - return genLowcodeFloat64Sub(); + /* begin genLowcodeFloat64Sub */ + topRegistersMask32 = 0; + rTop27 = (rNext22 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg29 = (rNext22 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask32 = 1U << reg29; + } + if (rTop27 == NoReg) { + rTop27 = allocateFloatRegNotConflictingWith(topRegistersMask32); + } + if (rNext22 == NoReg) { + rNext22 = allocateFloatRegNotConflictingWith(1U << rTop27); + } + assert(!(((rTop27 == NoReg) + || (rNext22 == NoReg)))); + second25 = rTop27; + first25 = rNext22; + + nativePopToReg(ssNativeTop(), second25); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first25); + ssNativePop(1); + /* begin SubRd:Rd: */ + genoperandoperand(SubRdRd, second25, first25); + ssPushNativeRegisterDoubleFloat(first25); + return 0; default: return genLowcodeUnaryInlinePrimitive2(prim); @@ -39964,349 +40816,6 @@ genLowcodeUnaryInlinePrimitive(sqInt prim) return 0; } - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnlockVM */ -static sqInt -genLowcodeUnlockVM(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnpin */ -static sqInt -genLowcodeUnpin(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUrem32 */ -static sqInt -genLowcodeUrem32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUrem64 */ -static sqInt -genLowcodeUrem64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeXor32 */ -static sqInt -genLowcodeXor32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin XorR:R: */ - genoperandoperand(XorRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeXor64 */ -static sqInt -genLowcodeXor64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin XorR:R: */ - genoperandoperand(XorRR, secondLow, firstLow); - /* begin XorR:R: */ - genoperandoperand(XorRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend32From16 */ -static sqInt -genLowcodeZeroExtend32From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend16R:R: */ - genoperandoperand(ZeroExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend32From8 */ -static sqInt -genLowcodeZeroExtend32From8(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend8R:R: */ - genoperandoperand(ZeroExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From16 */ -static sqInt -genLowcodeZeroExtend64From16(void) -{ - AbstractInstruction *anInstruction; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin ZeroExtend16R:R: */ - genoperandoperand(ZeroExtend16RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From32 */ -static sqInt -genLowcodeZeroExtend64From32(void) -{ - AbstractInstruction *anInstruction; - sqInt resultHigh; - sqInt resultLow; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((resultLow = Arg1Reg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << value)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, resultLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, resultHigh); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegistersecondRegister(resultLow, resultHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From8 */ -static sqInt -genLowcodeZeroExtend64From8(void) -{ - AbstractInstruction *anInstruction; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin ZeroExtend8R:R: */ - genoperandoperand(ZeroExtend8RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - if (usesOutOfLineLiteral(anInstruction)) { - (anInstruction->dependent = locateLiteral(0)); - } - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - /* StackToRegisterMappingCogit>>#genMarshalledSend:numArgs:sendTable: */ static sqInt NoDbgRegParms genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable) @@ -40898,7 +41407,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -41183,7 +41693,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -41392,7 +41903,8 @@ genSpecialSelectorComparison(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -41595,7 +42107,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -41669,7 +42182,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); if (usesOutOfLineLiteral(anInstruction1)) { @@ -41748,7 +42262,8 @@ genStorePopMaybeContextRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCh ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); if (usesOutOfLineLiteral(anInstruction1)) { @@ -41788,7 +42303,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -41813,7 +42329,8 @@ genStorePopRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCheck(sqInt po if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -41965,21 +42482,20 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; (fixup->simNativeStackPtr) = UnknownSimStackPtrFlag; (fixup->simNativeStackSize) = 0; - return fixup; } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ @@ -42213,7 +42729,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -42223,7 +42740,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -42231,7 +42749,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -42270,7 +42789,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -42338,7 +42857,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -42482,9 +43002,8 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; - (self_in_reinitialize->simNativeStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); + (self_in_reinitialize->simNativeStackPtr) = ((self_in_reinitialize->simNativeStackSize) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); @@ -42888,20 +43407,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1U << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushAll */ -static void -ssFlushAll(void) -{ - ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); -} - - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -42947,7 +43452,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -42973,7 +43479,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -43066,6 +43573,13 @@ ssNativeTop(void) return simNativeStackAt(simNativeStackPtr); } + /* StackToRegisterMappingCogit>>#ssNativeValue: */ +static CogSimStackNativeEntry * NoDbgRegParms +ssNativeValue(sqInt n) +{ + return simNativeStackAt(simStackPtr - n); +} + /* StackToRegisterMappingCogit>>#ssPopNativeSize: */ static void NoDbgRegParms ssPopNativeSize(sqInt popSize) @@ -43555,6 +44069,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/spurlowcodesrc/vm/cogitIA32.c b/spurlowcodesrc/vm/cogitIA32.c index 040e2b7d2..0f9fcd0df 100644 --- a/spurlowcodesrc/vm/cogitIA32.c +++ b/spurlowcodesrc/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -269,7 +269,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 83 : 78) +#define NumTrampolines (IMMUTABILITY ? 84 : 79) #define OrCqR 108 #define OrCwR 116 #define OrRR 102 @@ -281,6 +281,7 @@ char *__cogitBuildInfo = __buildInfo; #define PrimCallMayCallBack 4 #define PrimCallNeedsNewMethod 1 #define PrimCallNeedsPrimitiveFunction 2 +#define PrimErrBadArgument 3 #define PrimErrNoMemory 9 #define PrimErrWritePastObject 17 #define PushCq 83 @@ -358,8 +359,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; unsigned char machineCode [10]; } AbstractInstruction; @@ -428,10 +429,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -567,7 +570,7 @@ static sqInt NoDbgRegParms registerToSaveIP(AbstractInstruction * self_in_regist static AbstractInstruction * NoDbgRegParms relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeReturnPCby, sqInt retpc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta); static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); -static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress); +static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr); static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms rewriteJumpLongAttarget(AbstractInstruction * self_in_rewriteJumpLongAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -673,7 +676,7 @@ static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -693,7 +696,7 @@ static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointe static void generateClosedPICPrototype(void); static CogMethod * generateCogFullBlock(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateOpenPICPrototype(void); static void generateRunTimeTrampolines(void); static void generateStackPointerCapture(void); @@ -751,7 +754,7 @@ static BytecodeDescriptor * loadBytesAndGetDescriptor(void); static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc); static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); -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); @@ -834,7 +837,7 @@ static sqInt NoDbgRegParms counters(CogMethod * self_in_counters); extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void NoDbgRegParms clearSavedPICUsageCount(CogMethod *cogMethod); static void compactCompiledCode(void); @@ -843,7 +846,6 @@ static void followForwardedLiteralsInOpenPICList(void); extern void freeMethod(CogMethod *cogMethod); static void freeOlderMethodsForCompaction(void); static sqInt kosherYoungReferrers(void); -static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); extern CogMethod * methodFor(void *address); extern sqInt methodsCompiledToMachineCodeInto(sqInt arrayObj); extern sqInt numMethods(void); @@ -1063,9 +1065,12 @@ static SimStackEntry * NoDbgRegParms storeToReg(SimStackEntry * self_in_storeToR static CogSimStackNativeEntry * NoDbgRegParms ensureIsMarkedAsSpilled(CogSimStackNativeEntry * self_in_ensureIsMarkedAsSpilled); static CogSimStackNativeEntry * NoDbgRegParms ensureSpilledSPscratchRegister(CogSimStackNativeEntry * self_in_ensureSpilledSPscratchRegister, sqInt spRegister, sqInt scratchRegister); static sqInt NoDbgRegParms nativeFloatRegisterMask(CogSimStackNativeEntry * self_in_nativeFloatRegisterMask); +static sqInt NoDbgRegParms nativeFloatRegisterOrNone(CogSimStackNativeEntry * self_in_nativeFloatRegisterOrNone); static CogSimStackNativeEntry * NoDbgRegParms nativePopToReg(CogSimStackNativeEntry * self_in_nativePopToReg, sqInt reg); static CogSimStackNativeEntry * NoDbgRegParms nativePopToRegsecondReg(CogSimStackNativeEntry * self_in_nativePopToRegsecondReg, sqInt reg, sqInt secondReg); static sqInt NoDbgRegParms nativeRegisterMask(CogSimStackNativeEntry * self_in_nativeRegisterMask); +static sqInt NoDbgRegParms nativeRegisterOrNone(CogSimStackNativeEntry * self_in_nativeRegisterOrNone); +static sqInt NoDbgRegParms nativeRegisterSecondOrNone(CogSimStackNativeEntry * self_in_nativeRegisterSecondOrNone); static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToReg(CogSimStackNativeEntry * self_in_nativeStackPopToReg, sqInt reg); static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToRegsecondReg(CogSimStackNativeEntry * self_in_nativeStackPopToRegsecondReg, sqInt reg, sqInt secondReg); static sqInt NoDbgRegParms spillingNeedsScratchRegister(CogSimStackNativeEntry * self_in_spillingNeedsScratchRegister); @@ -1179,8 +1184,12 @@ static sqInt NoDbgRegParms v4LongForwardBranchDistance(BytecodeDescriptor *descr static sqInt NoDbgRegParms v4LongBranchIfNotInstanceOfDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj); static sqInt NoDbgRegParms v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj); extern void voidCogCompiledCode(void); +extern double getCogCodeZoneThreshold(void); +static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); +extern sqInt setCogCodeZoneThreshold(double ratio); static BlockStart * NoDbgRegParms addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span); static void NoDbgRegParms adjustArgumentsForPerform(sqInt numArgs); +static sqInt NoDbgRegParms allocateFloatRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask); static sqInt NoDbgRegParms allocateRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms anyReferencesToRegisterinTopNItems(sqInt reg, sqInt n); @@ -1213,6 +1222,7 @@ static BytecodeFixup * NoDbgRegParms ensureNonMergeFixupAt(sqInt targetPC); static void ensureReceiverResultRegContainsSelf(void); static void NoDbgRegParms evaluateat(BytecodeDescriptor *descriptor, sqInt pc); static sqInt NoDbgRegParms eventualTargetOf(sqInt targetBytecodePC); +static sqInt NoDbgRegParms freeAnyFloatRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms freeAnyRegNotConflictingWith(sqInt regMask); static sqInt genBlockReturn(void); static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void) ; @@ -1234,294 +1244,14 @@ static sqInt NoDbgRegParms genJumpBackTo(sqInt targetBytecodePC); static sqInt NoDbgRegParms genJumpIfto(sqInt boolean, sqInt targetBytecodePC); static sqInt NoDbgRegParms genJumpTo(sqInt targetBytecodePC); static void NoDbgRegParms genLoadTempin(sqInt objectIndex, sqInt destReg); -static sqInt genLowcodeAdd32(void); -static sqInt genLowcodeAdd64(void); -static sqInt genLowcodeAlloca32(void); -static sqInt genLowcodeAlloca64(void); -static sqInt genLowcodeAnd32(void); -static sqInt genLowcodeAnd64(void); -static sqInt genLowcodeArithmeticRightShift32(void); -static sqInt genLowcodeArithmeticRightShift64(void); -static sqInt genLowcodeBeginCall(void); static sqInt NoDbgRegParms genLowcodeBinaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeBoolean32ToOop(void); -static sqInt genLowcodeBoolean64ToOop(void); -static sqInt genLowcodeByteSizeOf(void); -static sqInt genLowcodeCallArgumentFloat32(void); -static sqInt genLowcodeCallArgumentFloat64(void); -static sqInt genLowcodeCallArgumentInt32(void); -static sqInt genLowcodeCallArgumentInt64(void); -static sqInt genLowcodeCallArgumentPointer(void); -static sqInt genLowcodeCallArgumentSpace(void); -static sqInt genLowcodeCallArgumentStructure(void); -static sqInt genLowcodeCallInstruction(void); -static sqInt genLowcodeCallPhysical(void); -static sqInt genLowcodeCheckSessionIdentifier(void); -static sqInt genLowcodeCompareAndSwap32(void); -static sqInt genLowcodeDiv32(void); -static sqInt genLowcodeDiv64(void); -static sqInt genLowcodeDuplicateFloat32(void); -static sqInt genLowcodeDuplicateFloat64(void); -static sqInt genLowcodeDuplicateInt32(void); -static sqInt genLowcodeDuplicateInt64(void); -static sqInt genLowcodeDuplicatePointer(void); -static sqInt genLowcodeEffectiveAddress32(void); -static sqInt genLowcodeEffectiveAddress64(void); -static sqInt genLowcodeEndCall(void); -static sqInt genLowcodeEndCallNoCleanup(void); -static sqInt genLowcodeFirstFieldPointer(void); -static sqInt genLowcodeFirstIndexableFieldPointer(void); -static sqInt genLowcodeFloat32Add(void); -static sqInt genLowcodeFloat32Div(void); -static sqInt genLowcodeFloat32Equal(void); -static sqInt genLowcodeFloat32Great(void); -static sqInt genLowcodeFloat32GreatEqual(void); -static sqInt genLowcodeFloat32Less(void); -static sqInt genLowcodeFloat32LessEqual(void); -static sqInt genLowcodeFloat32Mul(void); -static sqInt genLowcodeFloat32Neg(void); -static sqInt genLowcodeFloat32NotEqual(void); -static sqInt genLowcodeFloat32Sqrt(void); -static sqInt genLowcodeFloat32Sub(void); -static sqInt genLowcodeFloat32ToFloat64(void); -static sqInt genLowcodeFloat32ToInt32(void); -static sqInt genLowcodeFloat32ToInt64(void); -static sqInt genLowcodeFloat32ToOop(void); -static sqInt genLowcodeFloat32ToUInt32(void); -static sqInt genLowcodeFloat32ToUInt64(void); -static sqInt genLowcodeFloat64Add(void); -static sqInt genLowcodeFloat64Div(void); -static sqInt genLowcodeFloat64Equal(void); -static sqInt genLowcodeFloat64Great(void); -static sqInt genLowcodeFloat64GreatEqual(void); -static sqInt genLowcodeFloat64Less(void); -static sqInt genLowcodeFloat64LessEqual(void); -static sqInt genLowcodeFloat64Mul(void); -static sqInt genLowcodeFloat64Neg(void); -static sqInt genLowcodeFloat64NotEqual(void); -static sqInt genLowcodeFloat64Sqrt(void); -static sqInt genLowcodeFloat64Sub(void); -static sqInt genLowcodeFloat64ToFloat32(void); -static sqInt genLowcodeFloat64ToInt32(void); -static sqInt genLowcodeFloat64ToInt64(void); -static sqInt genLowcodeFloat64ToOop(void); -static sqInt genLowcodeFloat64ToUInt32(void); -static sqInt genLowcodeFloat64ToUInt64(void); -static sqInt genLowcodeFree(void); -static sqInt genLowcodeInstantiateIndexable32Oop(void); -static sqInt genLowcodeInstantiateIndexableOop(void); -static sqInt genLowcodeInstantiateOop(void); -static sqInt genLowcodeInt32Equal(void); -static sqInt genLowcodeInt32Great(void); -static sqInt genLowcodeInt32GreatEqual(void); -static sqInt genLowcodeInt32Less(void); -static sqInt genLowcodeInt32LessEqual(void); -static sqInt genLowcodeInt32NotEqual(void); -static sqInt genLowcodeInt32ToFloat32(void); -static sqInt genLowcodeInt32ToFloat64(void); -static sqInt genLowcodeInt32ToOop(void); -static sqInt genLowcodeInt32ToPointer(void); -static sqInt genLowcodeInt64Equal(void); -static sqInt genLowcodeInt64Great(void); -static sqInt genLowcodeInt64GreatEqual(void); -static sqInt genLowcodeInt64Less(void); -static sqInt genLowcodeInt64LessEqual(void); -static sqInt genLowcodeInt64NotEqual(void); -static sqInt genLowcodeInt64ToFloat32(void); -static sqInt genLowcodeInt64ToFloat64(void); -static sqInt genLowcodeInt64ToOop(void); -static sqInt genLowcodeInt64ToPointer(void); -static sqInt genLowcodeIsBytes(void); -static sqInt genLowcodeIsFloatObject(void); -static sqInt genLowcodeIsIndexable(void); -static sqInt genLowcodeIsIntegerObject(void); -static sqInt genLowcodeIsPointers(void); -static sqInt genLowcodeIsWords(void); -static sqInt genLowcodeIsWordsOrBytes(void); -static sqInt genLowcodeLeftShift32(void); -static sqInt genLowcodeLeftShift64(void); -static sqInt genLowcodeLoadArgumentAddress(void); -static sqInt genLowcodeLoadArgumentFloat32(void); -static sqInt genLowcodeLoadArgumentFloat64(void); -static sqInt genLowcodeLoadArgumentInt16(void); -static sqInt genLowcodeLoadArgumentInt32(void); -static sqInt genLowcodeLoadArgumentInt64(void); -static sqInt genLowcodeLoadArgumentInt8(void); -static sqInt genLowcodeLoadArgumentPointer(void); -static sqInt genLowcodeLoadArgumentUInt16(void); -static sqInt genLowcodeLoadArgumentUInt32(void); -static sqInt genLowcodeLoadArgumentUInt64(void); -static sqInt genLowcodeLoadArgumentUInt8(void); -static sqInt genLowcodeLoadFloat32FromMemory(void); -static sqInt genLowcodeLoadFloat64FromMemory(void); -static sqInt genLowcodeLoadInt16FromMemory(void); -static sqInt genLowcodeLoadInt32FromMemory(void); -static sqInt genLowcodeLoadInt64FromMemory(void); -static sqInt genLowcodeLoadInt8FromMemory(void); -static sqInt genLowcodeLoadLocalAddress(void); -static sqInt genLowcodeLoadLocalFloat32(void); -static sqInt genLowcodeLoadLocalFloat64(void); -static sqInt genLowcodeLoadLocalInt16(void); -static sqInt genLowcodeLoadLocalInt32(void); -static sqInt genLowcodeLoadLocalInt64(void); -static sqInt genLowcodeLoadLocalInt8(void); -static sqInt genLowcodeLoadLocalPointer(void); -static sqInt genLowcodeLoadLocalUInt16(void); -static sqInt genLowcodeLoadLocalUInt32(void); -static sqInt genLowcodeLoadLocalUInt64(void); -static sqInt genLowcodeLoadLocalUInt8(void); -static sqInt genLowcodeLoadObjectAt(void); -static sqInt genLowcodeLoadObjectField(void); -static sqInt genLowcodeLoadPointerFromMemory(void); -static sqInt genLowcodeLoadUInt16FromMemory(void); -static sqInt genLowcodeLoadUInt32FromMemory(void); -static sqInt genLowcodeLoadUInt64FromMemory(void); -static sqInt genLowcodeLoadUInt8FromMemory(void); -static sqInt genLowcodeLocalFrameSize(void); -static sqInt genLowcodeLockRegisters(void); -static sqInt genLowcodeLockVM(void); -static sqInt genLowcodeMalloc32(void); -static sqInt genLowcodeMalloc64(void); -static sqInt genLowcodeMemcpy32(void); -static sqInt genLowcodeMemcpy64(void); -static sqInt genLowcodeMemcpyFixed(void); -static sqInt genLowcodeMoveFloat32ToPhysical(void); -static sqInt genLowcodeMoveFloat64ToPhysical(void); -static sqInt genLowcodeMoveInt32ToPhysical(void); -static sqInt genLowcodeMoveInt64ToPhysical(void); -static sqInt genLowcodeMovePointerToPhysical(void); -static sqInt genLowcodeMul32(void); -static sqInt genLowcodeMul64(void); -static sqInt genLowcodeNeg32(void); -static sqInt genLowcodeNeg64(void); -static sqInt genLowcodeNot32(void); -static sqInt genLowcodeNot64(void); static sqInt NoDbgRegParms genLowcodeNullaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeOopEqual(void); -static sqInt genLowcodeOopNotEqual(void); -static sqInt genLowcodeOopSmallIntegerToInt32(void); -static sqInt genLowcodeOopSmallIntegerToInt64(void); -static sqInt genLowcodeOopToBoolean32(void); -static sqInt genLowcodeOopToBoolean64(void); -static sqInt genLowcodeOopToFloat32(void); -static sqInt genLowcodeOopToFloat64(void); -static sqInt genLowcodeOopToInt32(void); -static sqInt genLowcodeOopToInt64(void); -static sqInt genLowcodeOopToPointer(void); -static sqInt genLowcodeOopToPointerReinterpret(void); -static sqInt genLowcodeOopToUInt32(void); -static sqInt genLowcodeOopToUInt64(void); -static sqInt genLowcodeOr32(void); -static sqInt genLowcodeOr64(void); -static sqInt genLowcodePerformCallout(void); -static sqInt genLowcodePerformCalloutIndirect(void); -static sqInt genLowcodePin(void); -static sqInt genLowcodePlaftormCode(void); -static sqInt genLowcodePointerAddConstantOffset(void); -static sqInt genLowcodePointerAddOffset32(void); -static sqInt genLowcodePointerAddOffset64(void); -static sqInt genLowcodePointerEqual(void); -static sqInt genLowcodePointerNotEqual(void); -static sqInt genLowcodePointerToInt32(void); -static sqInt genLowcodePointerToInt64(void); -static sqInt genLowcodePointerToOop(void); -static sqInt genLowcodePointerToOopReinterprer(void); -static sqInt genLowcodePopFloat32(void); -static sqInt genLowcodePopFloat64(void); -static sqInt genLowcodePopInt32(void); -static sqInt genLowcodePopInt64(void); -static sqInt genLowcodePopMultipleNative(void); -static sqInt genLowcodePopPointer(void); -static sqInt genLowcodePushCalloutResultFloat32(void); -static sqInt genLowcodePushCalloutResultFloat64(void); -static sqInt genLowcodePushCalloutResultInt32(void); -static sqInt genLowcodePushCalloutResultInt64(void); -static sqInt genLowcodePushCalloutResultPointer(void); -static sqInt genLowcodePushConstantUInt32(void); -static sqInt genLowcodePushConstantUInt64(void); -static sqInt genLowcodePushNullPointer(void); -static sqInt genLowcodePushOne32(void); -static sqInt genLowcodePushOne64(void); -static sqInt genLowcodePushOneFloat32(void); -static sqInt genLowcodePushOneFloat64(void); -static sqInt genLowcodePushPhysicalFloat32(void); -static sqInt genLowcodePushPhysicalFloat64(void); -static sqInt genLowcodePushPhysicalInt32(void); -static sqInt genLowcodePushPhysicalInt64(void); -static sqInt genLowcodePushPhysicalPointer(void); -static sqInt genLowcodePushSessionIdentifier(void); -static sqInt genLowcodePushZero32(void); -static sqInt genLowcodePushZero64(void); -static sqInt genLowcodePushZeroFloat32(void); -static sqInt genLowcodePushZeroFloat64(void); -static sqInt genLowcodeRem32(void); -static sqInt genLowcodeRem64(void); -static sqInt genLowcodeRightShift32(void); -static sqInt genLowcodeRightShift64(void); -static sqInt genLowcodeSignExtend32From16(void); -static sqInt genLowcodeSignExtend32From8(void); -static sqInt genLowcodeSignExtend64From16(void); -static sqInt genLowcodeSignExtend64From32(void); -static sqInt genLowcodeSignExtend64From8(void); -static sqInt genLowcodeSmallInt32ToOop(void); -static sqInt genLowcodeStoreFloat32ToMemory(void); -static sqInt genLowcodeStoreFloat64ToMemory(void); -static sqInt genLowcodeStoreInt16ToMemory(void); -static sqInt genLowcodeStoreInt32ToMemory(void); -static sqInt genLowcodeStoreInt64ToMemory(void); -static sqInt genLowcodeStoreInt8ToMemory(void); -static sqInt genLowcodeStoreLocalFloat32(void); -static sqInt genLowcodeStoreLocalFloat64(void); -static sqInt genLowcodeStoreLocalInt16(void); -static sqInt genLowcodeStoreLocalInt32(void); -static sqInt genLowcodeStoreLocalInt64(void); -static sqInt genLowcodeStoreLocalInt8(void); -static sqInt genLowcodeStoreLocalPointer(void); -static sqInt genLowcodeStoreObjectField(void); -static sqInt genLowcodeStoreObjectFieldAt(void); -static sqInt genLowcodeStorePointerToMemory(void); -static sqInt genLowcodeSub32(void); -static sqInt genLowcodeSub64(void); static sqInt NoDbgRegParms genLowcodeTrinaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeTruncate32To16(void); -static sqInt genLowcodeTruncate32To8(void); -static sqInt genLowcodeTruncate64To16(void); -static sqInt genLowcodeTruncate64To32(void); -static sqInt genLowcodeTruncate64To8(void); -static sqInt genLowcodeUdiv32(void); -static sqInt genLowcodeUdiv64(void); -static sqInt genLowcodeUint32Great(void); -static sqInt genLowcodeUint32GreatEqual(void); -static sqInt genLowcodeUint32Less(void); -static sqInt genLowcodeUint32LessEqual(void); -static sqInt genLowcodeUint32ToFloat32(void); -static sqInt genLowcodeUint32ToFloat64(void); -static sqInt genLowcodeUint32ToOop(void); -static sqInt genLowcodeUint64Great(void); -static sqInt genLowcodeUint64GreatEqual(void); -static sqInt genLowcodeUint64Less(void); -static sqInt genLowcodeUint64LessEqual(void); -static sqInt genLowcodeUint64ToFloat32(void); -static sqInt genLowcodeUint64ToFloat64(void); -static sqInt genLowcodeUint64ToOop(void); -static sqInt genLowcodeUmul32(void); -static sqInt genLowcodeUmul64(void); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive2(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive3(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive4(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive5(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeUnlockVM(void); -static sqInt genLowcodeUnpin(void); -static sqInt genLowcodeUrem32(void); -static sqInt genLowcodeUrem64(void); -static sqInt genLowcodeXor32(void); -static sqInt genLowcodeXor64(void); -static sqInt genLowcodeZeroExtend32From16(void); -static sqInt genLowcodeZeroExtend32From8(void); -static sqInt genLowcodeZeroExtend64From16(void); -static sqInt genLowcodeZeroExtend64From32(void); -static sqInt genLowcodeZeroExtend64From8(void); static sqInt NoDbgRegParms genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable); static sqInt NoDbgRegParms genMethodAbortTrampolineFor(sqInt numArgs); static sqInt NoDbgRegParms genPICAbortTrampolineFor(sqInt numArgs); @@ -1563,7 +1293,7 @@ static sqInt NoDbgRegParms genStorePopRemoteInstVarofObjectAtneedsStoreCheckneed static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1596,8 +1326,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void ssFlushAll(void); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1605,6 +1333,7 @@ static void NoDbgRegParms ssNativeFlushTo(sqInt index); static void NoDbgRegParms ssNativePop(sqInt n); static void NoDbgRegParms ssNativePush(sqInt n); static CogSimStackNativeEntry * ssNativeTop(void); +static CogSimStackNativeEntry * NoDbgRegParms ssNativeValue(sqInt n); static void NoDbgRegParms ssPopNativeSize(sqInt popSize); static void NoDbgRegParms ssPop(sqInt n); static sqInt NoDbgRegParms ssPushAnnotatedConstant(sqInt literal); @@ -1634,6 +1363,7 @@ static void voidReceiverResultRegContainsSelf(void); /*** Variables ***/ static AbstractInstruction * abstractOpcodes; +static usqInt allocationThreshold; static AbstractInstruction aMethodLabel; static AbstractInstruction * const backEnd = &aMethodLabel; static usqInt baseAddress; @@ -1641,7 +1371,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt breakBlock; static sqInt breakMethod; @@ -1679,6 +1408,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1725,6 +1455,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt cPICCaseSize; static sqInt cPICEndOfCodeOffset; @@ -2334,6 +2065,7 @@ static AbstractInstruction * stackCheckLabel; static AbstractInstruction * stackOverflowCall; static sqInt superSendTrampolines[NumSendTrampolines]; static sqInt tempOop; +static float thresholdRatio = 0.5f; int traceFlags = 8 /* prim trace log on by default */; sqInt traceStores; static char *trampolineAddresses[NumTrampolines*2]; @@ -2375,6 +2107,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -3133,7 +2866,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - usqIntptr_t shiftCountReg; + usqInt shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == ECX @@ -3161,8 +2894,8 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -3175,8 +2908,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x86opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -3193,8 +2926,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeZeroExtend16RR(AbstractInstruction * self_in_concretizeZeroExtend16RR) { - usqIntptr_t destReg; - usqIntptr_t srcReg; + usqInt destReg; + usqInt srcReg; srcReg = ((self_in_concretizeZeroExtend16RR->operands))[0]; destReg = ((self_in_concretizeZeroExtend16RR->operands))[1]; @@ -3238,50 +2971,50 @@ cResultRegisterLow(AbstractInstruction * self_in_cResultRegisterLow) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt addressOperand2; + usqInt addressOperand3; + usqInt addressOperand4; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; AbstractInstruction *dependentChain; - 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 destReg16; - usqIntptr_t destReg17; - usqIntptr_t destReg18; - usqIntptr_t destReg19; - usqIntptr_t destReg2; - usqIntptr_t destReg20; - usqIntptr_t destReg21; - usqIntptr_t destReg22; - usqIntptr_t destReg23; - usqIntptr_t destReg24; - usqIntptr_t destReg3; - usqIntptr_t destReg4; - usqIntptr_t destReg5; - usqIntptr_t destReg6; - usqIntptr_t destReg7; - usqIntptr_t destReg8; - usqIntptr_t destReg9; + usqInt dest; + usqInt dest1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg13; + usqInt destReg14; + usqInt destReg15; + usqInt destReg16; + usqInt destReg17; + usqInt destReg18; + usqInt destReg19; + usqInt destReg2; + usqInt destReg20; + usqInt destReg21; + usqInt destReg22; + usqInt destReg23; + usqInt destReg24; + usqInt destReg3; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; sqInt distance; sqInt distance1; sqInt i; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -3348,14 +3081,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget7; AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; - usqIntptr_t mask; - usqIntptr_t mask1; - usqIntptr_t mask2; + usqInt mask; + usqInt mask1; + usqInt mask2; sqInt mcIdx; sqInt offset; sqInt offset1; - usqIntptr_t offset10; - usqIntptr_t offset11; + usqInt offset10; + usqInt offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -3366,14 +3099,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - usqIntptr_t offset12; + usqInt offset12; sqInt offset120; sqInt offset121; sqInt offset122; sqInt offset123; - usqIntptr_t offset13; - usqIntptr_t offset14; - usqIntptr_t offset15; + usqInt offset13; + usqInt offset14; + usqInt offset15; sqInt offset16; sqInt offset17; sqInt offset18; @@ -3389,117 +3122,117 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - usqIntptr_t offset3; + usqInt offset3; sqInt offset30; sqInt offset31; sqInt offset32; sqInt offset33; - 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; + usqInt offset4; + usqInt offset5; + usqInt offset6; + usqInt offset7; + usqInt offset8; + usqInt offset9; + usqInt reg; + usqInt reg1; + usqInt reg10; + usqInt reg11; + usqInt reg12; + usqInt reg13; + usqInt reg14; + usqInt reg15; + usqInt reg16; + usqInt reg17; + usqInt reg18; + usqInt reg19; + usqInt reg2; + usqInt reg20; + usqInt reg21; + usqInt reg22; + usqInt reg23; + usqInt reg24; + usqInt reg25; + usqInt reg26; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt reg8; + usqInt reg9; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS10; + usqInt regLHS11; + usqInt regLHS12; + usqInt regLHS13; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regLHS5; + usqInt regLHS6; + usqInt regLHS7; + usqInt regLHS8; + usqInt regLHS9; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS10; + usqInt regRHS11; + usqInt regRHS12; + usqInt regRHS13; + usqInt regRHS2; + usqInt regRHS3; + usqInt regRHS4; + usqInt regRHS5; + usqInt regRHS6; + usqInt regRHS7; + usqInt regRHS8; + usqInt regRHS9; + usqInt regToShift; + usqInt regToShift1; sqInt shiftCount; - 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 srcReg14; - usqIntptr_t srcReg15; - usqIntptr_t srcReg16; - usqIntptr_t srcReg17; - usqIntptr_t srcReg18; - usqIntptr_t srcReg19; - usqIntptr_t srcReg2; - usqIntptr_t srcReg20; - usqIntptr_t srcReg21; - usqIntptr_t srcReg22; - usqIntptr_t srcReg3; - usqIntptr_t srcReg4; - usqIntptr_t srcReg5; - usqIntptr_t srcReg6; - usqIntptr_t srcReg7; - usqIntptr_t srcReg8; - usqIntptr_t srcReg9; + usqInt shiftCountReg; + usqInt shiftCountReg1; + usqInt src; + usqInt src1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg20; + usqInt srcReg21; + usqInt srcReg22; + usqInt srcReg3; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; sqInt swapreg; - 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; + usqInt value; + usqInt value1; + usqInt value10; + usqInt value11; + usqInt value12; + usqInt value13; + usqInt value2; + usqInt value3; + usqInt value4; + usqInt value5; + usqInt value6; + usqInt value7; + usqInt value8; + usqInt value9; usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { @@ -5940,25 +5673,25 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt destReg; + usqInt destReg1; + usqInt destReg2; + usqInt destReg3; + usqInt offset; + usqInt offset1; + usqInt offset2; + usqInt offset3; + usqInt reg; + usqInt reg1; + usqInt reg11; + usqInt reg2; + usqInt reg21; + usqInt reg3; + usqInt regDivisor; + usqInt srcReg; + usqInt srcReg1; sqInt srcReg2; sqInt srcReg3; @@ -6668,26 +6401,19 @@ genPushC64(AbstractInstruction * self_in_genPushC64, sqLong constant64Bits) { AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; - AbstractInstruction *anInstruction2; sqInt highPart; AbstractInstruction * inst; sqInt literal; - if (BytesPerWord == 4) { - highPart = (constant64Bits >> 32ll); - /* begin checkLiteral:forInstruction: */ - anInstruction = genoperand(PushCw, highPart); - inst = anInstruction; - /* begin checkLiteral:forInstruction: */ - literal = ((sqInt) (constant64Bits & 0xFFFFFFFFU)); - anInstruction1 = genoperand(PushCw, constant64Bits & 0xFFFFFFFFU); - return inst; - } - else { - /* begin checkLiteral:forInstruction: */ - anInstruction2 = genoperand(PushCw, constant64Bits); - return anInstruction2; - } + assert(BytesPerWord == 4); + highPart = (constant64Bits >> 32LL); + /* begin checkLiteral:forInstruction: */ + anInstruction = genoperand(PushCw, highPart); + inst = anInstruction; + /* begin checkLiteral:forInstruction: */ + literal = ((sqInt) (constant64Bits & 0xFFFFFFFFU)); + anInstruction1 = genoperand(PushCw, constant64Bits & 0xFFFFFFFFU); + return inst; } @@ -7417,15 +7143,15 @@ rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt ca /* prevent type inference for avoiding warning on abs */ /* CogIA32Compiler>>#rewriteCPICJumpAt:target: */ -static sqInt NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +static AbstractInstruction * NoDbgRegParms +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { sqInt callDistance; - callDistance = jumpTargetAddress - addressFollowingJump; + callDistance = jumpTargetAddr - addressFollowingJump; assert((SQABS(callDistance)) < 128); byteAtput(addressFollowingJump - 1, callDistance & 0xFF); - return 2; + return self_in_rewriteCPICJumpAttarget; } @@ -7604,9 +7330,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - usqIntptr_t alignment; - usqIntptr_t maximumSpan; - usqIntptr_t target; + usqInt alignment; + sqInt maximumSpan; + usqInt target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -8034,7 +7760,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -9192,7 +8918,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -9250,7 +8976,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -9317,7 +9043,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -10693,7 +10419,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -10779,11 +10505,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { sqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -10981,7 +10707,7 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) /* Cogit>>#findMapLocationForMcpc:inMethod: */ static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -11499,7 +11225,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -11516,7 +11242,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, operandOne, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -11562,7 +11288,7 @@ generateCogFullBlock(void) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -11611,7 +11337,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -11657,17 +11383,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; + usqInt location; sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -12897,7 +12623,7 @@ gMoveCwR(sqInt wordConstant, sqInt reg) /* 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; @@ -13841,7 +13567,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -14830,7 +14556,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -15634,14 +15360,14 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; sqInt roundedBytes; roundedBytes = (numBytes + 7) & -8; - if ((mzFreeStart + roundedBytes) >= (limitAddress - (methodCount * BytesPerWord))) { + if ((mzFreeStart + roundedBytes) >= ((((limitAddress - (methodCount * BytesPerWord)) < allocationThreshold) ? (limitAddress - (methodCount * BytesPerWord)) : allocationThreshold))) { return 0; } allocation = mzFreeStart; @@ -15824,15 +15550,15 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; - zoneSize = limitAddress - baseAddress; - initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; + zoneSize = ((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - baseAddress; + initialFreeSpace = (((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - mzFreeStart) + methodBytesFreedSinceLastCompaction; freedSoFar = initialFreeSpace; /* 4 needs to be e.g. a start-up parameter */ @@ -15883,17 +15609,6 @@ kosherYoungReferrers(void) return 1; } - /* CogMethodZone>>#manageFrom:to: */ -static void NoDbgRegParms -manageFromto(sqInt theStartAddress, sqInt theLimitAddress) -{ - mzFreeStart = (baseAddress = theStartAddress); - youngReferrers = (limitAddress = theLimitAddress); - openPICList = null; - methodBytesFreedSinceLastCompaction = 0; - methodCount = 0; -} - /* CogMethodZone>>#methodFor: */ CogMethod * methodFor(void *address) @@ -18747,6 +18462,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *jumpImm; AbstractInstruction *jumpNotSet; @@ -18772,7 +18488,17 @@ genPrimitiveIdentityHash(void) /* begin Jump: */ genoperand(Jump, ((sqInt)ret)); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } @@ -20322,7 +20048,9 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ - ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(1, "newHashTrampoline", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 1); + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); + ceInlineNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceInlineNewHash", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { @@ -22825,6 +22553,16 @@ nativeFloatRegisterMask(CogSimStackNativeEntry * self_in_nativeFloatRegisterMask : 0); } + /* CogSimStackNativeEntry>>#nativeFloatRegisterOrNone */ +static sqInt NoDbgRegParms +nativeFloatRegisterOrNone(CogSimStackNativeEntry * self_in_nativeFloatRegisterOrNone) +{ + return ((((self_in_nativeFloatRegisterOrNone->type)) == SSRegisterSingleFloat) + || (((self_in_nativeFloatRegisterOrNone->type)) == SSRegisterDoubleFloat) + ? (self_in_nativeFloatRegisterOrNone->registerr) + : NoReg); +} + /* CogSimStackNativeEntry>>#nativePopToReg: */ static CogSimStackNativeEntry * NoDbgRegParms nativePopToReg(CogSimStackNativeEntry * self_in_nativePopToReg, sqInt reg) @@ -23045,6 +22783,25 @@ nativeRegisterMask(CogSimStackNativeEntry * self_in_nativeRegisterMask) : 0)); } + /* CogSimStackNativeEntry>>#nativeRegisterOrNone */ +static sqInt NoDbgRegParms +nativeRegisterOrNone(CogSimStackNativeEntry * self_in_nativeRegisterOrNone) +{ + return ((((self_in_nativeRegisterOrNone->type)) == SSRegister) + || (((self_in_nativeRegisterOrNone->type)) == SSRegisterPair) + ? (self_in_nativeRegisterOrNone->registerr) + : NoReg); +} + + /* CogSimStackNativeEntry>>#nativeRegisterSecondOrNone */ +static sqInt NoDbgRegParms +nativeRegisterSecondOrNone(CogSimStackNativeEntry * self_in_nativeRegisterSecondOrNone) +{ + return (((self_in_nativeRegisterSecondOrNone->type)) == SSRegisterPair + ? (self_in_nativeRegisterSecondOrNone->registerSecond) + : NoReg); +} + /* CogSimStackNativeEntry>>#nativeStackPopToReg: */ static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToReg(CogSimStackNativeEntry * self_in_nativeStackPopToReg, sqInt reg) @@ -25085,7 +24842,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -25352,7 +25109,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -25381,7 +25138,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1)); introspectionDataIndex += 2; } return 0; @@ -25639,7 +25396,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -25934,6 +25691,41 @@ voidCogCompiledCode(void) } } + /* SistaMethodZone>>#getCogCodeZoneThreshold */ +double +getCogCodeZoneThreshold(void) +{ + return thresholdRatio; +} + + /* SistaMethodZone>>#manageFrom:to: */ +static void NoDbgRegParms +manageFromto(sqInt theStartAddress, sqInt theLimitAddress) +{ + mzFreeStart = (baseAddress = theStartAddress); + youngReferrers = (limitAddress = theLimitAddress); + openPICList = null; + methodBytesFreedSinceLastCompaction = 0; + methodCount = 0; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; +} + + /* SistaMethodZone>>#setCogCodeZoneThreshold: */ +sqInt +setCogCodeZoneThreshold(double ratio) +{ + /* send of break elided */; + if (!((ratio >= 0.1) + && (ratio <= 1.0))) { + return PrimErrBadArgument; + } + thresholdRatio = ratio; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; + return 0; +} + /* Add a blockStart for an embedded block. For a binary tree walk block dispatch blocks must be compiled in pc/depth-first order but are scanned @@ -26056,6 +25848,24 @@ adjustArgumentsForPerform(sqInt numArgs) } +/* if there's a free register, use it */ + + /* StackToRegisterMappingCogit>>#allocateFloatRegNotConflictingWith: */ +static sqInt NoDbgRegParms +allocateFloatRegNotConflictingWith(sqInt regMask) +{ + sqInt reg; + + reg = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | regMask); + if (reg == NoReg) { + + /* No free register, choose one that does not conflict with regMask */ + reg = freeAnyFloatRegNotConflictingWith(regMask); + } + return reg; +} + + /* If the stack entry is already in a register not conflicting with regMask, answers it, else allocate a new register not conflicting with reg mask @@ -26137,7 +25947,8 @@ beginHighLevelCall(sqInt alignment) sqInt mask; sqInt offset; - ssFlushAll(); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin MoveR:Aw: */ address1 = stackPointerAddress(); /* begin checkLiteral:forInstruction: */ @@ -26310,7 +26121,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -26329,8 +26140,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -26530,7 +26341,11 @@ compileCogFullBlockMethod(sqInt numCopied) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -26604,7 +26419,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -27397,6 +27216,39 @@ eventualTargetOf(sqInt targetBytecodePC) } +/* Spill the closest register on stack not conflicting with regMask. + Assertion Failure if regMask has already all the registers */ + + /* StackToRegisterMappingCogit>>#freeAnyFloatRegNotConflictingWith: */ +static sqInt NoDbgRegParms +freeAnyFloatRegNotConflictingWith(sqInt regMask) +{ + CogSimStackEntry *desc; + sqInt index; + sqInt reg; + + assert(needsFrame); + reg = NoReg; + index = ((simSpillBase < 0) ? 0 : simSpillBase); + index = ((simNativeSpillBase < 0) ? 0 : simNativeSpillBase); + while ((reg == NoReg) + && (index < simNativeStackPtr)) { + desc = simNativeStackAt(index); + if ((((desc->type)) == SSRegisterSingleFloat) + || (((desc->type)) == SSRegisterDoubleFloat)) { + if (!(regMask & (registerMaskFor((desc->registerr))))) { + reg = (desc->registerr); + } + } + index += 1; + } + + assert(!((reg == NoReg))); + ssAllocateRequiredFloatReg(reg); + return reg; +} + + /* Spill the closest register on stack not conflicting with regMask. Assertion Failure if regMask has already all the registers */ @@ -28053,7 +27905,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -28287,7 +28140,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -28328,7 +28182,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc = ssTop(); ssPop(1); if ((((desc->type)) == SSConstant) @@ -28399,7 +28254,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -28427,396 +28283,658 @@ genLoadTempin(sqInt objectIndex, sqInt destReg) } -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAdd32 */ -static sqInt -genLowcodeAdd32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAdd64 */ -static sqInt -genLowcodeAdd64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, secondLow, firstLow); - /* begin AddcR:R: */ - genoperandoperand(AddcRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAlloca32 */ -static sqInt -genLowcodeAlloca32(void) -{ - sqInt address; - sqInt address1; - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction *anInstruction2; - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (size == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - /* begin MoveAw:R: */ - address = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction = genoperandoperand(MoveAwR, address, TempReg); - /* begin SubR:R: */ - genoperandoperand(SubRR, size, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(AndCqR, -16, TempReg); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, size); - /* begin MoveR:Aw: */ - address1 = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction2 = genoperandoperand(MoveRAw, size, address1); - ssPushNativeRegister(size); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAlloca64 */ -static sqInt -genLowcodeAlloca64(void) -{ - sqInt sizeHigh; - sqInt sizeLow; - - if (((sizeLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((sizeLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((sizeHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << sizeLow)))) == NoReg) { - ssAllocateRequiredReg((sizeHigh = Arg1Reg)); - } - if ((sizeLow == ReceiverResultReg) - || (sizeHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, sizeLow, SPReg); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, SPReg, sizeLow); - ssPushNativeRegister(sizeLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAnd32 */ -static sqInt -genLowcodeAnd32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AndR:R: */ - genoperandoperand(AndRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAnd64 */ -static sqInt -genLowcodeAnd64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin AndR:R: */ - genoperandoperand(AndRR, secondLow, firstLow); - /* begin AndR:R: */ - genoperandoperand(AndRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeArithmeticRightShift32 */ -static sqInt -genLowcodeArithmeticRightShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ArithmeticShiftRightR:R: */ - genoperandoperand(ArithmeticShiftRightRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeArithmeticRightShift64 */ -static sqInt -genLowcodeArithmeticRightShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << shiftAmount)) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeBeginCall */ -static sqInt -genLowcodeBeginCall(void) -{ - sqInt alignment; - - alignment = extA; - beginHighLevelCall(alignment); - extA = 0; - return 0; -} - - /* Lowcode instruction generator dispatch */ /* StackToRegisterMappingCogit>>#genLowcodeBinaryInlinePrimitive: */ static sqInt NoDbgRegParms genLowcodeBinaryInlinePrimitive(sqInt prim) { + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + sqInt frResult; + sqInt frResult1; + sqInt object; + sqInt object1; + sqInt object10; + sqInt object11; + sqInt object12; + sqInt object13; + sqInt object14; + sqInt object15; + sqInt object16; + sqInt object17; + sqInt object18; + sqInt object19; + sqInt object2; + sqInt object20; + sqInt object21; + sqInt object22; + sqInt object23; + sqInt object3; + sqInt object4; + sqInt object5; + sqInt object6; + sqInt object7; + sqInt object8; + sqInt object9; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue10; + sqInt objectValue11; + sqInt objectValue12; + sqInt objectValue13; + sqInt objectValue14; + sqInt objectValue15; + sqInt objectValue16; + sqInt objectValue17; + sqInt objectValue18; + sqInt objectValue19; + sqInt objectValue2; + sqInt objectValue20; + sqInt objectValue21; + sqInt objectValue22; + sqInt objectValue23; + sqInt objectValue3; + sqInt objectValue4; + sqInt objectValue5; + sqInt objectValue6; + sqInt objectValue7; + sqInt objectValue8; + sqInt objectValue9; + sqInt pointer; + sqInt pointerValue; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop10; + sqInt rOopTop12; + sqInt rOopTop13; + sqInt rOopTop14; + sqInt rOopTop15; + sqInt rOopTop16; + sqInt rOopTop17; + sqInt rOopTop18; + sqInt rOopTop2; + sqInt rOopTop20; + sqInt rOopTop21; + sqInt rOopTop22; + sqInt rOopTop23; + sqInt rOopTop24; + sqInt rOopTop25; + sqInt rOopTop3; + sqInt rOopTop4; + sqInt rOopTop5; + sqInt rOopTop6; + sqInt rOopTop7; + sqInt rOopTop8; + sqInt rOopTop9; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult14; + sqInt rResult15; + sqInt rResult17; + sqInt rResult2; + sqInt rResult21; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value13; + sqInt value2; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value8; + sqInt valueHigh; + sqInt valueHigh1; + sqInt valueHigh2; + sqInt valueHigh3; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueHighValue3; + sqInt valueLow; + sqInt valueLow1; + sqInt valueLow2; + sqInt valueLow3; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueLowValue3; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue13; + sqInt valueValue2; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue8; + switch (prim) { case 0: - return genLowcodeByteSizeOf(); + /* begin genLowcodeByteSizeOf */ + rOopTop16 = NoReg; + rResult9 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop16 = registerOrNone(ssTop()); + } + if (rOopTop16 == NoReg) { + rOopTop16 = allocateRegNotConflictingWith(0); + } + rResult9 = allocateRegNotConflictingWith(1U << rOopTop16); + assert(!(((rOopTop16 == NoReg) + || (rResult9 == NoReg)))); + object15 = rOopTop16; + value8 = rResult9; + + popToReg(ssTop(), object15); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcByteSizeOfto(object15, value8); + return 0; case 1: - return genLowcodeFirstFieldPointer(); + /* begin genLowcodeFirstFieldPointer */ + rOopTop = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop == NoReg))); + object = rOopTop; + + popToReg(ssTop(), object); + ssPop(1); + genLcFirstFieldPointer(object); + return 0; case 2: - return genLowcodeFirstIndexableFieldPointer(); + /* begin genLowcodeFirstIndexableFieldPointer */ + rOopTop1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop1 == NoReg))); + object1 = rOopTop1; + + popToReg(ssTop(), object1); + ssPop(1); + genLcFirstIndexableFieldPointer(object1); + return 0; case 3: - return genLowcodeIsBytes(); + /* begin genLowcodeIsBytes */ + rOopTop2 = NoReg; + rResult = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rOopTop2); + assert(!(((rOopTop2 == NoReg) + || (rResult == NoReg)))); + object2 = rOopTop2; + value = rResult; + + popToReg(ssTop(), object2); + ssPop(1); + genLcIsBytesto(object2, value); + return 0; case 4: - return genLowcodeIsFloatObject(); + /* begin genLowcodeIsFloatObject */ + rOopTop3 = NoReg; + rResult1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1U << rOopTop3); + assert(!(((rOopTop3 == NoReg) + || (rResult1 == NoReg)))); + object3 = rOopTop3; + value1 = rResult1; + + popToReg(ssTop(), object3); + ssPop(1); + genLcIsFloatObjectto(object3, value1); + return 0; case 5: - return genLowcodeIsIndexable(); + /* begin genLowcodeIsIndexable */ + rOopTop4 = NoReg; + rResult2 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop4 = registerOrNone(ssTop()); + } + if (rOopTop4 == NoReg) { + rOopTop4 = allocateRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(1U << rOopTop4); + assert(!(((rOopTop4 == NoReg) + || (rResult2 == NoReg)))); + object4 = rOopTop4; + value2 = rResult2; + + popToReg(ssTop(), object4); + ssPop(1); + genLcIsIndexableto(object4, value2); + return 0; case 6: - return genLowcodeIsIntegerObject(); + /* begin genLowcodeIsIntegerObject */ + rOopTop5 = NoReg; + rResult3 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop5 = registerOrNone(ssTop()); + } + if (rOopTop5 == NoReg) { + rOopTop5 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rOopTop5); + assert(!(((rOopTop5 == NoReg) + || (rResult3 == NoReg)))); + object5 = rOopTop5; + value3 = rResult3; + + popToReg(ssTop(), object5); + ssPop(1); + genLcIsIntegerObjectto(object5, value3); + return 0; case 7: - return genLowcodeIsPointers(); + /* begin genLowcodeIsPointers */ + rOopTop6 = NoReg; + rResult4 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop6 = registerOrNone(ssTop()); + } + if (rOopTop6 == NoReg) { + rOopTop6 = allocateRegNotConflictingWith(0); + } + rResult4 = allocateRegNotConflictingWith(1U << rOopTop6); + assert(!(((rOopTop6 == NoReg) + || (rResult4 == NoReg)))); + object6 = rOopTop6; + value4 = rResult4; + + popToReg(ssTop(), object6); + ssPop(1); + genLcIsPointersto(object6, value4); + return 0; case 8: - return genLowcodeIsWords(); + /* begin genLowcodeIsWords */ + rOopTop7 = NoReg; + rResult5 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop7 = registerOrNone(ssTop()); + } + if (rOopTop7 == NoReg) { + rOopTop7 = allocateRegNotConflictingWith(0); + } + rResult5 = allocateRegNotConflictingWith(1U << rOopTop7); + assert(!(((rOopTop7 == NoReg) + || (rResult5 == NoReg)))); + object7 = rOopTop7; + value5 = rResult5; + + popToReg(ssTop(), object7); + ssPop(1); + genLcIsWordsto(object7, value5); + return 0; case 9: - return genLowcodeIsWordsOrBytes(); + /* begin genLowcodeIsWordsOrBytes */ + rOopTop8 = NoReg; + rResult6 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop8 = registerOrNone(ssTop()); + } + if (rOopTop8 == NoReg) { + rOopTop8 = allocateRegNotConflictingWith(0); + } + rResult6 = allocateRegNotConflictingWith(1U << rOopTop8); + assert(!(((rOopTop8 == NoReg) + || (rResult6 == NoReg)))); + object8 = rOopTop8; + value6 = rResult6; + + popToReg(ssTop(), object8); + ssPop(1); + genLcIsWordsOrBytesto(object8, value6); + return 0; case 10: - return genLowcodeOopSmallIntegerToInt32(); + /* begin genLowcodeOopSmallIntegerToInt32 */ + rOopTop9 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop9 = registerOrNone(ssTop()); + } + if (rOopTop9 == NoReg) { + rOopTop9 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop9 == NoReg))); + object9 = rOopTop9; + + popToReg(ssTop(), object9); + ssPop(1); + genConvertSmallIntegerToIntegerInReg(object9); + ssPushNativeRegister(object9); + return 0; case 11: - return genLowcodeOopSmallIntegerToInt64(); + /* begin genLowcodeOopSmallIntegerToInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop10 = NoReg; + rResult7 = (rResult21 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop10 = registerOrNone(ssTop()); + } + if (rOopTop10 == NoReg) { + rOopTop10 = allocateRegNotConflictingWith(0); + } + rResult7 = allocateRegNotConflictingWith(1U << rOopTop10); + rResult21 = allocateRegNotConflictingWith((1U << rOopTop10) | (1U << rResult7)); + assert(!(((rOopTop10 == NoReg) + || (rResult7 == NoReg)))); + object10 = rOopTop10; + valueLow = rResult7; + valueHigh = rResult21; + + popToReg(ssTop(), object10); + ssPop(1); + genConvertSmallIntegerToIntegerInReg(object10); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); + ssPushNativeRegistersecondRegister(object10, valueHigh); + + return 0; case 12: - return genLowcodeOopToBoolean32(); + /* begin genLowcodeOopToBoolean32 */ + rOopTop17 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop17 = registerOrNone(ssTop()); + } + if (rOopTop17 == NoReg) { + rOopTop17 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop17 == NoReg))); + object16 = rOopTop17; + + popToReg(ssTop(), object16); + ssPop(1); + annotateobjRef(gSubCwR(falseObject(), object16), falseObject()); + ssPushNativeRegister(object16); + return 0; case 13: - return genLowcodeOopToBoolean64(); + /* begin genLowcodeOopToBoolean64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop18 = NoReg; + rResult10 = (rResult22 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop18 = registerOrNone(ssTop()); + } + if (rOopTop18 == NoReg) { + rOopTop18 = allocateRegNotConflictingWith(0); + } + rResult10 = allocateRegNotConflictingWith(1U << rOopTop18); + rResult22 = allocateRegNotConflictingWith((1U << rOopTop18) | (1U << rResult10)); + assert(!(((rOopTop18 == NoReg) + || (rResult10 == NoReg)))); + object17 = rOopTop18; + valueLow1 = rResult10; + valueHigh1 = rResult22; + + popToReg(ssTop(), object17); + ssPop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh1); + annotateobjRef(gSubCwR(falseObject(), object17), falseObject()); + ssPushNativeRegistersecondRegister(object17, valueHigh1); + + return 0; case 14: - return genLowcodeOopToFloat32(); + /* begin genLowcodeOopToFloat32 */ + rOopTop20 = NoReg; + frResult = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop20 = registerOrNone(ssTop()); + } + if (rOopTop20 == NoReg) { + rOopTop20 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rOopTop20 == NoReg) + || (frResult == NoReg)))); + object18 = rOopTop20; + value10 = frResult; + + popToReg(ssTop(), object18); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoFloat32(object18, value10); + return 0; case 15: - return genLowcodeOopToFloat64(); + /* begin genLowcodeOopToFloat64 */ + rOopTop21 = NoReg; + frResult1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop21 = registerOrNone(ssTop()); + } + if (rOopTop21 == NoReg) { + rOopTop21 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rOopTop21 == NoReg) + || (frResult1 == NoReg)))); + object19 = rOopTop21; + value11 = frResult1; + + popToReg(ssTop(), object19); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoFloat64(object19, value11); + return 0; case 16: - return genLowcodeOopToInt32(); + /* begin genLowcodeOopToInt32 */ + rOopTop22 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop22 = registerOrNone(ssTop()); + } + if (rOopTop22 == NoReg) { + rOopTop22 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop22 == NoReg))); + object20 = rOopTop22; + + popToReg(ssTop(), object20); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToInt32(object20); + return 0; case 17: - return genLowcodeOopToInt64(); + /* begin genLowcodeOopToInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop23 = NoReg; + rResult14 = (rResult23 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop23 = registerOrNone(ssTop()); + } + if (rOopTop23 == NoReg) { + rOopTop23 = allocateRegNotConflictingWith(0); + } + rResult14 = allocateRegNotConflictingWith(1U << rOopTop23); + rResult23 = allocateRegNotConflictingWith((1U << rOopTop23) | (1U << rResult14)); + assert(!(((rOopTop23 == NoReg) + || (rResult14 == NoReg)))); + object21 = rOopTop23; + valueLow2 = rResult14; + valueHigh2 = rResult23; + + popToReg(ssTop(), object21); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoInt64highPart(object21, valueLow2, valueHigh2); + + return 0; case 18: - return genLowcodeOopToPointer(); + /* begin genLowcodeOopToPointer */ + rOopTop12 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop12 = registerOrNone(ssTop()); + } + if (rOopTop12 == NoReg) { + rOopTop12 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop12 == NoReg))); + object11 = rOopTop12; + + popToReg(ssTop(), object11); + ssPop(1); + genLcOopToPointer(object11); + return 0; case 19: - return genLowcodeOopToPointerReinterpret(); + /* begin genLowcodeOopToPointerReinterpret */ + rOopTop13 = NoReg; + rResult8 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop13 = registerOrNone(ssTop()); + } + if (rOopTop13 == NoReg) { + rOopTop13 = allocateRegNotConflictingWith(0); + } + rResult8 = allocateRegNotConflictingWith(1U << rOopTop13); + assert(!(((rOopTop13 == NoReg) + || (rResult8 == NoReg)))); + object12 = rOopTop13; + pointer = rResult8; + + popToReg(ssTop(), object12); + ssPop(1); + ssPushNativeRegister(object12); + return 0; case 20: - return genLowcodeOopToUInt32(); + /* begin genLowcodeOopToUInt32 */ + rOopTop24 = NoReg; + rResult15 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop24 = registerOrNone(ssTop()); + } + if (rOopTop24 == NoReg) { + rOopTop24 = allocateRegNotConflictingWith(0); + } + rResult15 = allocateRegNotConflictingWith(1U << rOopTop24); + assert(!(((rOopTop24 == NoReg) + || (rResult15 == NoReg)))); + object22 = rOopTop24; + value13 = rResult15; + + popToReg(ssTop(), object22); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToUInt32(object22); + return 0; case 21: - return genLowcodeOopToUInt64(); + /* begin genLowcodeOopToUInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop25 = NoReg; + rResult17 = (rResult24 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop25 = registerOrNone(ssTop()); + } + if (rOopTop25 == NoReg) { + rOopTop25 = allocateRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(1U << rOopTop25); + rResult24 = allocateRegNotConflictingWith((1U << rOopTop25) | (1U << rResult17)); + assert(!(((rOopTop25 == NoReg) + || (rResult17 == NoReg)))); + object23 = rOopTop25; + valueLow3 = rResult17; + valueHigh3 = rResult24; + + popToReg(ssTop(), object23); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoUInt64highPart(object23, valueLow3, valueHigh3); + + return 0; case 22: - return genLowcodePin(); + /* begin genLowcodePin */ + rOopTop14 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop14 = registerOrNone(ssTop()); + } + if (rOopTop14 == NoReg) { + rOopTop14 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop14 == NoReg))); + object13 = rOopTop14; + + popToReg(ssTop(), object13); + ssPop(1); + abort(); + return 0; case 23: - return genLowcodeUnpin(); + /* begin genLowcodeUnpin */ + rOopTop15 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop15 = registerOrNone(ssTop()); + } + if (rOopTop15 == NoReg) { + rOopTop15 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop15 == NoReg))); + object14 = rOopTop15; + + popToReg(ssTop(), object14); + ssPop(1); + abort(); + return 0; default: return EncounteredUnknownBytecode; @@ -28826,7901 +28944,630 @@ genLowcodeBinaryInlinePrimitive(sqInt prim) } -/* Lowcode instruction generator */ +/* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeBoolean32ToOop */ -static sqInt -genLowcodeBoolean32ToOop(void) + /* StackToRegisterMappingCogit>>#genLowcodeNullaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeNullaryInlinePrimitive(sqInt prim) { AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction3; AbstractInstruction * cont; + AbstractInstruction * cont1; + sqInt floatValue; + sqInt floatValueValue; + sqInt frTop; + sqInt frTop1; AbstractInstruction * inst; + AbstractInstruction * inst1; sqInt object; + sqInt object1; + sqInt object2; + sqInt object3; + sqInt object4; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue2; + sqInt objectValue3; + sqInt objectValue4; + sqInt pointer; + sqInt pointer1; + sqInt pointerClassLiteral; + sqInt pointerValue; + sqInt pointerValue1; + sqInt reg; + sqInt reg1; + sqInt reg2; + sqInt rNext; + sqInt rNext1; + sqInt rNext2; + sqInt rResult; + sqInt rResult2; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rTop; + sqInt rTop2; + sqInt rTop3; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt singleFloatValue; + sqInt singleFloatValueValue; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask2; AbstractInstruction * trueJump; + AbstractInstruction * trueJump1; sqInt value; - sqInt wordConstant; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, value); - /* begin JumpNonZero: */ - trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - annotateobjRef(gMoveCwR(falseObject(), value), falseObject()); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - /* begin MoveCw:R: */ - wordConstant = trueObject(); - /* begin checkLiteral:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCwR, wordConstant, value); - inst = anInstruction1; - jmpTarget(trueJump, inst); - annotateobjRef(inst, trueObject()); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeBoolean64ToOop */ -static sqInt -genLowcodeBoolean64ToOop(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction * cont; - AbstractInstruction * inst; - sqInt object; - AbstractInstruction * trueJump; + sqInt value2; + sqInt value4; + sqInt value5; sqInt valueHigh; + sqInt valueHigh1; + sqInt valueHigh2; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; sqInt valueLow; + sqInt valueLow1; + sqInt valueLow2; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueValue; + sqInt valueValue2; + sqInt valueValue4; + sqInt valueValue5; sqInt wordConstant; + sqInt wordConstant2; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, valueLow, valueHigh); - /* begin JumpNonZero: */ - trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - annotateobjRef(gMoveCwR(falseObject(), valueLow), falseObject()); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - /* begin MoveCw:R: */ - wordConstant = trueObject(); - /* begin checkLiteral:forInstruction: */ - anInstruction = genoperandoperand(MoveCwR, wordConstant, valueLow); - inst = anInstruction; - jmpTarget(trueJump, inst); - annotateobjRef(inst, trueObject()); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushRegister(valueLow); - - return 0; -} + + switch (prim) { + case 0: + /* begin genLowcodeBoolean32ToOop */ + rTop = NoReg; + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rTop); + assert(!(((rTop == NoReg) + || (rResult == NoReg)))); + value = rTop; + object = rResult; + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(CmpCqR, 0, value); + /* begin JumpNonZero: */ + trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + annotateobjRef(gMoveCwR(falseObject(), value), falseObject()); + /* begin Jump: */ + cont = genoperand(Jump, ((sqInt)0)); + /* begin MoveCw:R: */ + wordConstant = trueObject(); + /* begin checkLiteral:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCwR, wordConstant, value); + inst = anInstruction1; + jmpTarget(trueJump, inst); + annotateobjRef(inst, trueObject()); + jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushRegister(value); + return 0; -/* Lowcode instruction generator */ + case 1: + /* begin genLowcodeBoolean64ToOop */ + /* begin allocateRegistersForLowcodeInteger2ResultOop: */ + topRegistersMask = 0; + rTop2 = (rNext = NoReg); + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop2 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext == NoReg)))); + rResult2 = allocateFloatRegNotConflictingWith((1U << rTop2) | (1U << rNext)); + assert(!((rResult2 == NoReg))); + valueLow = rTop2; + valueHigh = rNext; + object1 = rResult2; - /* StackToRegisterMappingCogit>>#genLowcodeByteSizeOf */ -static sqInt -genLowcodeByteSizeOf(void) -{ - sqInt object; - sqInt value; + nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, valueLow, valueHigh); + /* begin JumpNonZero: */ + trueJump1 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + annotateobjRef(gMoveCwR(falseObject(), valueLow), falseObject()); + /* begin Jump: */ + cont1 = genoperand(Jump, ((sqInt)0)); + /* begin MoveCw:R: */ + wordConstant2 = trueObject(); + /* begin checkLiteral:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCwR, wordConstant2, valueLow); + inst1 = anInstruction3; + jmpTarget(trueJump1, inst1); + annotateobjRef(inst1, trueObject()); + jmpTarget(cont1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushRegister(valueLow); - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcByteSizeOfto(object, value); - return 0; -} + return 0; + case 2: + /* begin genLowcodeFloat32ToOop */ + frTop = NoReg; + + /* Float argument */ + rResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(0); + assert(!(((frTop == NoReg) + || (rResult3 == NoReg)))); + singleFloatValue = frTop; + object2 = rResult3; + + nativePopToReg(ssNativeTop(), singleFloatValue); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcFloat32toOop(singleFloatValue, object2); + return 0; -/* Lowcode instruction generator */ + case 3: + /* begin genLowcodeFloat64ToOop */ + frTop1 = NoReg; + + /* Float argument */ + rResult4 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + rResult4 = allocateRegNotConflictingWith(0); + assert(!(((frTop1 == NoReg) + || (rResult4 == NoReg)))); + floatValue = frTop1; + object3 = rResult4; + + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcFloat64toOop(floatValue, object3); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentFloat32 */ -static sqInt -genLowcodeCallArgumentFloat32(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt literal; + case 4: + /* begin genLowcodeInt32ToOop */ + rTop3 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(0); + } + assert(!((rTop3 == NoReg))); + value2 = rTop3; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInt32ToOop(value2); + return 0; - nativeStackPopToReg(ssNativeTop(), DPFPReg0); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - literal = -BytesPerWord; - anInstruction = genoperandoperandoperand(MoveRsM32r, DPFPReg0, -BytesPerWord, SPReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(SubCqR, BytesPerWord, SPReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} + case 5: + /* begin genLowcodeInt64ToOop */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask1 = 0; + rTop4 = (rNext1 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext1 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg1; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext1 == NoReg)))); + valueLow1 = rTop4; + valueHigh1 = rNext1; + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInt64ToOophighPart(valueLow1, valueHigh1); -/* Lowcode instruction generator */ + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentFloat64 */ -static sqInt -genLowcodeCallArgumentFloat64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; + case 6: + /* begin genLowcodePointerToOop */ + pointerClassLiteral = getLiteral(extA); + /* begin allocateRegistersForLowcodeInteger: */ + rTop7 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop7 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + assert(!((rTop7 == NoReg))); + pointer1 = rTop7; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcPointerToOopclass(pointer1, pointerClassLiteral); + extA = 0; + return 0; - nativeStackPopToReg(ssNativeTop(), DPFPReg0); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, DPFPReg0, -8, SPReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(SubCqR, 8, SPReg); - currentCallCleanUpSize += 8; - return 0; -} + case 7: + /* begin genLowcodePointerToOopReinterprer */ + rTop5 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(0); + } + assert(!((rTop5 == NoReg))); + pointer = rTop5; + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + ssPushRegister(pointer); + return 0; -/* Lowcode instruction generator */ + case 8: + /* begin genLowcodeSmallInt32ToOop */ + rTop6 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + assert(!((rTop6 == NoReg))); + value4 = rTop6; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentInt32 */ -static sqInt -genLowcodeCallArgumentInt32(void) -{ - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + genConvertIntegerToSmallIntegerInReg(value4); + ssPushRegister(value4); + return 0; + case 9: + /* begin genLowcodeUint32ToOop */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value5 = rTop8; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcUInt32ToOop(value5); + return 0; -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentInt64 */ -static sqInt -genLowcodeCallArgumentInt64(void) -{ - nativeStackPopToRegsecondReg(ssNativeTop(), TempReg, ReceiverResultReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - /* begin PushR: */ - genoperand(PushR, ReceiverResultReg); - currentCallCleanUpSize += 8; - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentPointer */ -static sqInt -genLowcodeCallArgumentPointer(void) -{ - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} - - -/* Lowcode instruction generator */ -/* Allocate space */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentSpace */ -static sqInt -genLowcodeCallArgumentSpace(void) -{ - AbstractInstruction *anInstruction; - - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(SubCqR, extA, SPReg); - currentCallCleanUpSize += extA; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ -/* Fetch the pointer */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentStructure */ -static sqInt -genLowcodeCallArgumentStructure(void) -{ - AbstractInstruction *anInstruction; - - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(SubCqR, extA, SPReg); - - /* Copy the structure */ - currentCallCleanUpSize += extA; - genMemCopytoconstantSize(backEnd, TempReg, SPReg, extA); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallInstruction */ -static sqInt -genLowcodeCallInstruction(void) -{ - AbstractInstruction *abstractInstruction; - sqInt function; - - function = extA; - /* begin CallRT: */ - abstractInstruction = genoperand(Call, function); - (abstractInstruction->annotation = IsRelativeCall); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallPhysical */ -static sqInt -genLowcodeCallPhysical(void) -{ - sqInt registerID; - - registerID = extA; - /* begin CallR: */ - genoperand(CallR, registerID); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCheckSessionIdentifier */ -static sqInt -genLowcodeCheckSessionIdentifier(void) -{ - sqInt expectedSession; - - expectedSession = extA; - ssPushNativeConstantInt32((expectedSession == (getThisSessionID()) - ? 1 - : 0)); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCompareAndSwap32 */ -static sqInt -genLowcodeCompareAndSwap32(void) -{ - sqInt check; - sqInt newValue; - sqInt oldValue; - sqInt value; - - if (((newValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((newValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((oldValue = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << newValue)))) == NoReg) { - ssAllocateRequiredReg((oldValue = Arg1Reg)); - } - if (((check = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << newValue)) | (1U << oldValue)))) == NoReg) { - ssAllocateRequiredReg((check = SendNumArgsReg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << newValue)) | (1U << oldValue)) | (1U << check)))) == NoReg) { - ssAllocateRequiredReg((value = ClassReg)); - } - if ((((newValue == ReceiverResultReg) - || (oldValue == ReceiverResultReg)) - || (check == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), newValue); - ssNativePop(1); - nativePopToReg(ssNativeTop(), oldValue); - ssNativePop(1); - nativePopToReg(ssNativeTop(), check); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDiv32 */ -static sqInt -genLowcodeDiv32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, first, second); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDiv64 */ -static sqInt -genLowcodeDiv64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateFloat32 */ -static sqInt -genLowcodeDuplicateFloat32(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((dup2 = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((dup2 = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveRs:Rs: */ - genoperandoperand(MoveRsRs, value, dup2); - ssPushNativeRegisterSingleFloat(value); - ssPushNativeRegisterSingleFloat(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateFloat64 */ -static sqInt -genLowcodeDuplicateFloat64(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((dup2 = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((dup2 = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveRd:Rd: */ - genoperandoperand(MoveRdRd, value, dup2); - ssPushNativeRegisterDoubleFloat(value); - ssPushNativeRegisterDoubleFloat(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateInt32 */ -static sqInt -genLowcodeDuplicateInt32(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dup2 = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((dup2 = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (dup2 == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, dup2); - ssPushNativeRegister(value); - ssPushNativeRegister(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateInt64 */ -static sqInt -genLowcodeDuplicateInt64(void) -{ - sqInt dup2High; - sqInt dup2Low; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((dup2Low = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((dup2Low = SendNumArgsReg)); - } - if (((dup2High = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)) | (1U << dup2Low)))) == NoReg) { - ssAllocateRequiredReg((dup2High = ClassReg)); - } - if ((((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (dup2Low == ReceiverResultReg)) - || (dup2High == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, valueLow, dup2Low); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, valueHigh, dup2High); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - ssPushNativeRegistersecondRegister(dup2Low, dup2High); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicatePointer */ -static sqInt -genLowcodeDuplicatePointer(void) -{ - sqInt dup2; - sqInt pointerValue; - - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dup2 = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointerValue)))) == NoReg) { - ssAllocateRequiredReg((dup2 = Arg1Reg)); - } - if ((pointerValue == ReceiverResultReg) - || (dup2 == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointerValue, dup2); - ssPushNativeRegister(pointerValue); - ssPushNativeRegister(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEffectiveAddress32 */ -static sqInt -genLowcodeEffectiveAddress32(void) -{ - sqInt base; - sqInt index; - sqInt offset; - sqInt scale; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((scale = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offset)))) == NoReg) { - ssAllocateRequiredReg((scale = Arg1Reg)); - } - if (((index = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << offset)) | (1U << scale)))) == NoReg) { - ssAllocateRequiredReg((index = SendNumArgsReg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << offset)) | (1U << scale)) | (1U << index)))) == NoReg) { - ssAllocateRequiredReg((base = ClassReg)); - } - if ((((offset == ReceiverResultReg) - || (scale == ReceiverResultReg)) - || (index == ReceiverResultReg)) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), scale); - ssNativePop(1); - nativePopToReg(ssNativeTop(), index); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, scale, index); - /* begin AddR:R: */ - genoperandoperand(AddRR, index, base); - /* begin AddR:R: */ - genoperandoperand(AddRR, offset, base); - ssPushNativeRegister(base); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEffectiveAddress64 */ -static sqInt -genLowcodeEffectiveAddress64(void) -{ - sqInt base; - sqInt index; - sqInt offset; - sqInt result; - sqInt scale; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((scale = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offset)))) == NoReg) { - ssAllocateRequiredReg((scale = Arg1Reg)); - } - if (((index = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << offset)) | (1U << scale)))) == NoReg) { - ssAllocateRequiredReg((index = SendNumArgsReg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << offset)) | (1U << scale)) | (1U << index)))) == NoReg) { - ssAllocateRequiredReg((base = ClassReg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((((liveRegisters()) | (1U << offset)) | (1U << scale)) | (1U << index)) | (1U << base)))) == NoReg) { - ssAllocateRequiredReg((result = ReceiverResultReg)); - } - if (((((offset == ReceiverResultReg) - || (scale == ReceiverResultReg)) - || (index == ReceiverResultReg)) - || (base == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), scale); - ssNativePop(1); - nativePopToReg(ssNativeTop(), index); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEndCall */ -static sqInt -genLowcodeEndCall(void) -{ - endHighLevelCallWithCleanup(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEndCallNoCleanup */ -static sqInt -genLowcodeEndCallNoCleanup(void) -{ - endHighLevelCallWithoutCleanup(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFirstFieldPointer */ -static sqInt -genLowcodeFirstFieldPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcFirstFieldPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFirstIndexableFieldPointer */ -static sqInt -genLowcodeFirstIndexableFieldPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcFirstIndexableFieldPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Add */ -static sqInt -genLowcodeFloat32Add(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddRs:Rs: */ - genoperandoperand(AddRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Div */ -static sqInt -genLowcodeFloat32Div(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin DivRs:Rs: */ - genoperandoperand(DivRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Equal */ -static sqInt -genLowcodeFloat32Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPNotEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Great */ -static sqInt -genLowcodeFloat32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPLessOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32GreatEqual */ -static sqInt -genLowcodeFloat32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPLess(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Less */ -static sqInt -genLowcodeFloat32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPGreaterOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32LessEqual */ -static sqInt -genLowcodeFloat32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPGreater(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Mul */ -static sqInt -genLowcodeFloat32Mul(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulRs:Rs: */ - genoperandoperand(MulRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Neg */ -static sqInt -genLowcodeFloat32Neg(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin XorRs:Rs: */ - genoperandoperand(XorRsRs, result, result); - /* begin SubRs:Rs: */ - genoperandoperand(SubRsRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32NotEqual */ -static sqInt -genLowcodeFloat32NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Sqrt */ -static sqInt -genLowcodeFloat32Sqrt(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SqrtRs: */ - genoperand(SqrtRs, value); - ssPushNativeRegisterSingleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Sub */ -static sqInt -genLowcodeFloat32Sub(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubRs:Rs: */ - genoperandoperand(SubRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToFloat64 */ -static sqInt -genLowcodeFloat32ToFloat64(void) -{ - sqInt singleFloatValue; - - if (((singleFloatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((singleFloatValue = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), singleFloatValue); - ssNativePop(1); - /* begin ConvertRs:Rd: */ - genoperandoperand(ConvertRsRd, singleFloatValue, singleFloatValue); - ssPushNativeRegisterDoubleFloat(singleFloatValue); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToInt32 */ -static sqInt -genLowcodeFloat32ToInt32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertRs:R: */ - genoperandoperand(ConvertRsR, value, result); - ssPushNativeRegister(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToInt64 */ -static sqInt -genLowcodeFloat32ToInt64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToOop */ -static sqInt -genLowcodeFloat32ToOop(void) -{ - sqInt object; - sqInt singleFloatValue; - - if (((singleFloatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((singleFloatValue = DPFPReg0)); - } - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), singleFloatValue); - ssNativePop(1); - ssFlushAll(); - genLcFloat32toOop(singleFloatValue, object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToUInt32 */ -static sqInt -genLowcodeFloat32ToUInt32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertRs:R: */ - genoperandoperand(ConvertRsR, value, result); - ssPushNativeRegister(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToUInt64 */ -static sqInt -genLowcodeFloat32ToUInt64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Add */ -static sqInt -genLowcodeFloat64Add(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddRd:Rd: */ - genoperandoperand(AddRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Div */ -static sqInt -genLowcodeFloat64Div(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin DivRd:Rd: */ - genoperandoperand(DivRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Equal */ -static sqInt -genLowcodeFloat64Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPNotEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Great */ -static sqInt -genLowcodeFloat64Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPLessOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64GreatEqual */ -static sqInt -genLowcodeFloat64GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPLess(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Less */ -static sqInt -genLowcodeFloat64Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPGreaterOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64LessEqual */ -static sqInt -genLowcodeFloat64LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPGreater(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Mul */ -static sqInt -genLowcodeFloat64Mul(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulRd:Rd: */ - genoperandoperand(MulRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Neg */ -static sqInt -genLowcodeFloat64Neg(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin XorRd:Rd: */ - genoperandoperand(XorRdRd, result, result); - /* begin SubRd:Rd: */ - genoperandoperand(SubRdRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64NotEqual */ -static sqInt -genLowcodeFloat64NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Sqrt */ -static sqInt -genLowcodeFloat64Sqrt(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SqrtRd: */ - genoperand(SqrtRd, value); - ssPushNativeRegisterDoubleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Sub */ -static sqInt -genLowcodeFloat64Sub(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubRd:Rd: */ - genoperandoperand(SubRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToFloat32 */ -static sqInt -genLowcodeFloat64ToFloat32(void) -{ - sqInt floatValue; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:Rs: */ - genoperandoperand(ConvertRdRs, floatValue, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToInt32 */ -static sqInt -genLowcodeFloat64ToInt32(void) -{ - sqInt floatValue; - sqInt int32Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int32Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int32Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int32Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:R: */ - genoperandoperand(ConvertRdR, floatValue, int32Result); - ssPushNativeRegister(int32Result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToInt64 */ -static sqInt -genLowcodeFloat64ToInt64(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToOop */ -static sqInt -genLowcodeFloat64ToOop(void) -{ - sqInt floatValue; - sqInt object; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - ssFlushAll(); - genLcFloat64toOop(floatValue, object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToUInt32 */ -static sqInt -genLowcodeFloat64ToUInt32(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:R: */ - genoperandoperand(ConvertRdR, floatValue, int64Result); - ssPushNativeRegister(int64Result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToUInt64 */ -static sqInt -genLowcodeFloat64ToUInt64(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFree */ -static sqInt -genLowcodeFree(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssFlushAll(); - if (pointer != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointer, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFreeTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateIndexable32Oop */ -static sqInt -genLowcodeInstantiateIndexable32Oop(void) -{ - sqInt classOop; - sqInt indexableSize; - sqInt object; - - if (((indexableSize = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((indexableSize = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((classOop = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << indexableSize)))) == NoReg) { - ssAllocateRequiredReg((classOop = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << indexableSize)) | (1U << classOop)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((indexableSize == ReceiverResultReg) - || (classOop == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), indexableSize); - ssNativePop(1); - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOopindexableSize(classOop, indexableSize); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateIndexableOop */ -static sqInt -genLowcodeInstantiateIndexableOop(void) -{ - sqInt classOop; - sqInt indexableSize; - sqInt object; - - indexableSize = extA; - if (((classOop = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((classOop = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << classOop)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((classOop == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOopconstantIndexableSize(classOop, indexableSize); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateOop */ -static sqInt -genLowcodeInstantiateOop(void) -{ - sqInt classOop; - - if (((classOop = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((classOop = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (classOop == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOop(classOop); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Equal */ -static sqInt -genLowcodeInt32Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Great */ -static sqInt -genLowcodeInt32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpLessOrEqual: */ - falseJump = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32GreatEqual */ -static sqInt -genLowcodeInt32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpLess: */ - falseJump = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Less */ -static sqInt -genLowcodeInt32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpGreaterOrEqual: */ - falseJump = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32LessEqual */ -static sqInt -genLowcodeInt32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpGreater: */ - falseJump = genConditionalBranchoperand(JumpGreater, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32NotEqual */ -static sqInt -genLowcodeInt32NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToFloat32 */ -static sqInt -genLowcodeInt32ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rs: */ - genoperandoperand(ConvertRRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToFloat64 */ -static sqInt -genLowcodeInt32ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rd: */ - genoperandoperand(ConvertRRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToOop */ -static sqInt -genLowcodeInt32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcInt32ToOop(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToPointer */ -static sqInt -genLowcodeInt32ToPointer(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Equal */ -static sqInt -genLowcodeInt64Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - AbstractInstruction * falseJump2; - AbstractInstruction * falseLabel; - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondHigh, firstHigh); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondLow, firstLow); - /* begin JumpNonZero: */ - falseJump2 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, firstLow); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, firstLow); - falseLabel = anInstruction1; - jmpTarget(falseJump, falseLabel); - jmpTarget(falseJump2, falseLabel); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(firstLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Great */ -static sqInt -genLowcodeInt64Great(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64GreatEqual */ -static sqInt -genLowcodeInt64GreatEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Less */ -static sqInt -genLowcodeInt64Less(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64LessEqual */ -static sqInt -genLowcodeInt64LessEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64NotEqual */ -static sqInt -genLowcodeInt64NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - AbstractInstruction * falseJump2; - AbstractInstruction * falseLabel; - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondHigh, firstHigh); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondLow, firstLow); - /* begin JumpNonZero: */ - falseJump2 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, firstLow); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 1, firstLow); - falseLabel = anInstruction1; - jmpTarget(falseJump, falseLabel); - jmpTarget(falseJump2, falseLabel); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(firstLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToFloat32 */ -static sqInt -genLowcodeInt64ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToFloat64 */ -static sqInt -genLowcodeInt64ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToOop */ -static sqInt -genLowcodeInt64ToOop(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssFlushAll(); - genLcInt64ToOophighPart(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToPointer */ -static sqInt -genLowcodeInt64ToPointer(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsBytes */ -static sqInt -genLowcodeIsBytes(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsBytesto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsFloatObject */ -static sqInt -genLowcodeIsFloatObject(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsFloatObjectto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsIndexable */ -static sqInt -genLowcodeIsIndexable(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsIndexableto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsIntegerObject */ -static sqInt -genLowcodeIsIntegerObject(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsIntegerObjectto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsPointers */ -static sqInt -genLowcodeIsPointers(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsPointersto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsWords */ -static sqInt -genLowcodeIsWords(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsWordsto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsWordsOrBytes */ -static sqInt -genLowcodeIsWordsOrBytes(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsWordsOrBytesto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLeftShift32 */ -static sqInt -genLowcodeLeftShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin LogicalShiftLeftR:R: */ - genoperandoperand(LogicalShiftLeftRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLeftShift64 */ -static sqInt -genLowcodeLeftShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << shiftAmount)) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentAddress */ -static sqInt -genLowcodeLoadArgumentAddress(void) -{ - sqInt baseOffset; - sqInt pointer; - - baseOffset = extA; - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, pointer); - ssPushNativeRegister(pointer); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentFloat32 */ -static sqInt -genLowcodeLoadArgumentFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt floatValue; - - baseOffset = extA; - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentFloat64 */ -static sqInt -genLowcodeLoadArgumentFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt doubleValue; - - baseOffset = extA; - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); - ssPushNativeRegisterDoubleFloat(doubleValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt16 */ -static sqInt -genLowcodeLoadArgumentInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt32 */ -static sqInt -genLowcodeLoadArgumentInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt64 */ -static sqInt -genLowcodeLoadArgumentInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt8 */ -static sqInt -genLowcodeLoadArgumentInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentPointer */ -static sqInt -genLowcodeLoadArgumentPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerResult; - - baseOffset = extA; - if (((pointerResult = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerResult = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerResult == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); - ssPushNativeRegister(pointerResult); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt16 */ -static sqInt -genLowcodeLoadArgumentUInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt32 */ -static sqInt -genLowcodeLoadArgumentUInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt64 */ -static sqInt -genLowcodeLoadArgumentUInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt8 */ -static sqInt -genLowcodeLoadArgumentUInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadFloat32FromMemory */ -static sqInt -genLowcodeLoadFloat32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, pointer, value); - ssPushNativeRegisterSingleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadFloat64FromMemory */ -static sqInt -genLowcodeLoadFloat64FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, pointer, value); - ssPushNativeRegisterDoubleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt16FromMemory */ -static sqInt -genLowcodeLoadInt16FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, pointer, value); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt32FromMemory */ -static sqInt -genLowcodeLoadInt32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt64FromMemory */ -static sqInt -genLowcodeLoadInt64FromMemory(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt pointer; - sqInt valueHigh; - sqInt valueLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, pointer, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt8FromMemory */ -static sqInt -genLowcodeLoadInt8FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, pointer, value); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalAddress */ -static sqInt -genLowcodeLoadLocalAddress(void) -{ - sqInt baseOffset; - sqInt pointer; - - baseOffset = extA; - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, pointer); - ssPushNativeRegister(pointer); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalFloat32 */ -static sqInt -genLowcodeLoadLocalFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt floatValue; - - baseOffset = extA; - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalFloat64 */ -static sqInt -genLowcodeLoadLocalFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt doubleValue; - - baseOffset = extA; - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); - ssPushNativeRegisterDoubleFloat(doubleValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt16 */ -static sqInt -genLowcodeLoadLocalInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt32 */ -static sqInt -genLowcodeLoadLocalInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt64 */ -static sqInt -genLowcodeLoadLocalInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt8 */ -static sqInt -genLowcodeLoadLocalInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalPointer */ -static sqInt -genLowcodeLoadLocalPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerResult; - - baseOffset = extA; - if (((pointerResult = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerResult = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerResult == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); - ssPushNativeRegister(pointerResult); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt16 */ -static sqInt -genLowcodeLoadLocalUInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt32 */ -static sqInt -genLowcodeLoadLocalUInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt64 */ -static sqInt -genLowcodeLoadLocalUInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt8 */ -static sqInt -genLowcodeLoadLocalUInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadObjectAt */ -static sqInt -genLowcodeLoadObjectAt(void) -{ - sqInt fieldIndex; - sqInt object; - - if (((fieldIndex = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((fieldIndex = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << fieldIndex)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((fieldIndex == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), fieldIndex); - ssNativePop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcLoadObjectat(object, fieldIndex); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadObjectField */ -static sqInt -genLowcodeLoadObjectField(void) -{ - sqInt fieldIndex; - sqInt object; - - fieldIndex = extA; - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcLoadObjectfield(object, fieldIndex); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadPointerFromMemory */ -static sqInt -genLowcodeLoadPointerFromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt pointerResult; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointerResult = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((pointerResult = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (pointerResult == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, pointer, pointerResult); - ssPushNativeRegister(pointerResult); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt16FromMemory */ -static sqInt -genLowcodeLoadUInt16FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt32FromMemory */ -static sqInt -genLowcodeLoadUInt32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt64FromMemory */ -static sqInt -genLowcodeLoadUInt64FromMemory(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt pointer; - sqInt valueHigh; - sqInt valueLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, pointer, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt8FromMemory */ -static sqInt -genLowcodeLoadUInt8FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLocalFrameSize */ -static sqInt -genLowcodeLocalFrameSize(void) -{ - sqInt address; - sqInt address1; - sqInt alignedSize; - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction *anInstruction2; - AbstractInstruction *anInstruction3; - AbstractInstruction *anInstruction4; - AbstractInstruction *anInstruction5; - AbstractInstruction *anInstruction6; - AbstractInstruction *anInstruction7; - AbstractInstruction *anInstruction8; - sqInt offset; - sqInt offset1; - sqInt offset2; - sqInt offset3; - sqInt quickConstant; - sqInt size; - - size = extA; - assert(needsFrame); - - /* Align the size to 16 bytes. */ - hasNativeFrame = 1; - - /* Mark the stack frame */ - alignedSize = (size + 15) & -16; - annotateobjRef(gMoveCwR(splObj(LowcodeContextMark), TempReg), splObj(LowcodeContextMark)); - /* begin MoveR:Mw:r: */ - offset = frameOffsetOfNativeFrameMark(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, TempReg, offset, FPReg); - /* begin MoveAw:R: */ - address = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction1 = genoperandoperand(MoveAwR, address, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction2 = genoperandoperand(AddCqR, 1, TempReg); - /* begin MoveR:Mw:r: */ - offset1 = frameOffsetOfPreviousNativeStackPointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction3 = genoperandoperandoperand(MoveRMwr, TempReg, offset1, FPReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction4 = genoperandoperand(SubCqR, alignedSize, TempReg); - /* begin MoveR:Mw:r: */ - offset2 = frameOffsetOfNativeFramePointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction5 = genoperandoperandoperand(MoveRMwr, TempReg, offset2, FPReg); - /* begin MoveR:Mw:r: */ - offset3 = frameOffsetOfNativeStackPointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction6 = genoperandoperandoperand(MoveRMwr, TempReg, offset3, FPReg); - /* begin SubCq:R: */ - quickConstant = 1 + (defaultNativeStackFrameSize()); - /* begin checkQuickConstant:forInstruction: */ - anInstruction7 = genoperandoperand(SubCqR, quickConstant, TempReg); - /* begin MoveR:Aw: */ - address1 = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction8 = genoperandoperand(MoveRAw, TempReg, address1); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLockRegisters */ -static sqInt -genLowcodeLockRegisters(void) -{ - ssFlushAll(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLockVM */ -static sqInt -genLowcodeLockVM(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMalloc32 */ -static sqInt -genLowcodeMalloc32(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << size)))) == NoReg) { - ssAllocateRequiredReg((pointer = Arg1Reg)); - } - if ((size == ReceiverResultReg) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - ssFlushAll(); - if (size != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, size, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceMallocTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, pointer); - ssPushNativeRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMalloc64 */ -static sqInt -genLowcodeMalloc64(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - sqInt sizeHigh; - sqInt sizeLow; - - if (((sizeLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((sizeLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((sizeHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << sizeLow)))) == NoReg) { - ssAllocateRequiredReg((sizeHigh = Arg1Reg)); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << sizeLow)) | (1U << sizeHigh)))) == NoReg) { - ssAllocateRequiredReg((pointer = SendNumArgsReg)); - } - if (((sizeLow == ReceiverResultReg) - || (sizeHigh == ReceiverResultReg)) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); - ssNativePop(1); - ssFlushAll(); - if (sizeLow != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, sizeLow, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceMallocTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, pointer); - ssPushNativeRegister(pointer); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpy32 */ -static sqInt -genLowcodeMemcpy32(void) -{ - sqInt dest; - sqInt size; - sqInt source; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((source = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << size)))) == NoReg) { - ssAllocateRequiredReg((source = Arg1Reg)); - } - if (((dest = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << size)) | (1U << source)))) == NoReg) { - ssAllocateRequiredReg((dest = SendNumArgsReg)); - } - if (((size == ReceiverResultReg) - || (source == ReceiverResultReg)) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - ssFlushAll(); - genMemCopytosize(backEnd, source, dest, size); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpy64 */ -static sqInt -genLowcodeMemcpy64(void) -{ - sqInt dest; - sqInt size; - sqInt sizeLow; - sqInt source; - - sizeLow = 0; - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((source = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << size)))) == NoReg) { - ssAllocateRequiredReg((source = Arg1Reg)); - } - if (((dest = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << size)) | (1U << source)))) == NoReg) { - ssAllocateRequiredReg((dest = SendNumArgsReg)); - } - if (((size == ReceiverResultReg) - || (source == ReceiverResultReg)) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - ssFlushAll(); - genMemCopytosize(backEnd, source, dest, sizeLow); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpyFixed */ -static sqInt -genLowcodeMemcpyFixed(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt dest; - sqInt size; - sqInt source; - - size = extA; - if (((source = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((source = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dest = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << source)))) == NoReg) { - ssAllocateRequiredReg((dest = Arg1Reg)); - } - if ((source == ReceiverResultReg) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - if (size == BytesPerWord) { - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, source, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRMwr, TempReg, 0, dest); - } - else { - ssFlushAll(); - genMemCopytoconstantSize(backEnd, source, dest, size); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveFloat32ToPhysical */ -static sqInt -genLowcodeMoveFloat32ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveFloat64ToPhysical */ -static sqInt -genLowcodeMoveFloat64ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += 8; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveInt32ToPhysical */ -static sqInt -genLowcodeMoveInt32ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveInt64ToPhysical */ -static sqInt -genLowcodeMoveInt64ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += 8; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMovePointerToPhysical */ -static sqInt -genLowcodeMovePointerToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMul32 */ -static sqInt -genLowcodeMul32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMul64 */ -static sqInt -genLowcodeMul64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNeg32 */ -static sqInt -genLowcodeNeg32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NegateR: */ - genoperand(NegateR, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNeg64 */ -static sqInt -genLowcodeNeg64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, valueLow); - /* begin NotR: */ - genoperand(NotR, valueHigh); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AddCqR, 1, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(AddcCqR, 0, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNot32 */ -static sqInt -genLowcodeNot32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNot64 */ -static sqInt -genLowcodeNot64(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, valueLow); - /* begin NotR: */ - genoperand(NotR, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator dispatch */ - - /* StackToRegisterMappingCogit>>#genLowcodeNullaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeNullaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeBoolean32ToOop(); - - case 1: - return genLowcodeBoolean64ToOop(); - - case 2: - return genLowcodeFloat32ToOop(); - - case 3: - return genLowcodeFloat64ToOop(); - - case 4: - return genLowcodeInt32ToOop(); - - case 5: - return genLowcodeInt64ToOop(); - - case 6: - return genLowcodePointerToOop(); - - case 7: - return genLowcodePointerToOopReinterprer(); - - case 8: - return genLowcodeSmallInt32ToOop(); - - case 9: - return genLowcodeUint32ToOop(); - - case 10: - return genLowcodeUint64ToOop(); - - default: - return EncounteredUnknownBytecode; - - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopEqual */ -static sqInt -genLowcodeOopEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), second); - ssPop(1); - popToReg(ssTop(), first); - ssPop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopNotEqual */ -static sqInt -genLowcodeOopNotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), second); - ssPop(1); - popToReg(ssTop(), first); - ssPop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopSmallIntegerToInt32 */ -static sqInt -genLowcodeOopSmallIntegerToInt32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genConvertSmallIntegerToIntegerInReg(object); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopSmallIntegerToInt64 */ -static sqInt -genLowcodeOopSmallIntegerToInt64(void) -{ - AbstractInstruction *anInstruction; - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genConvertSmallIntegerToIntegerInReg(object); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - ssPushNativeRegistersecondRegister(object, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToBoolean32 */ -static sqInt -genLowcodeOopToBoolean32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - annotateobjRef(gSubCwR(falseObject(), object), falseObject()); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToBoolean64 */ -static sqInt -genLowcodeOopToBoolean64(void) -{ - AbstractInstruction *anInstruction; - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - annotateobjRef(gSubCwR(falseObject(), object), falseObject()); - ssPushNativeRegistersecondRegister(object, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToFloat32 */ -static sqInt -genLowcodeOopToFloat32(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoFloat32(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToFloat64 */ -static sqInt -genLowcodeOopToFloat64(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoFloat64(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToInt32 */ -static sqInt -genLowcodeOopToInt32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToInt32(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToInt64 */ -static sqInt -genLowcodeOopToInt64(void) -{ - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoInt64highPart(object, valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToPointer */ -static sqInt -genLowcodeOopToPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcOopToPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToPointerReinterpret */ -static sqInt -genLowcodeOopToPointerReinterpret(void) -{ - sqInt object; - sqInt pointer; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((pointer = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToUInt32 */ -static sqInt -genLowcodeOopToUInt32(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToUInt32(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToUInt64 */ -static sqInt -genLowcodeOopToUInt64(void) -{ - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoUInt64highPart(object, valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOr32 */ -static sqInt -genLowcodeOr32(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOr64 */ -static sqInt -genLowcodeOr64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, secondLow, firstLow); - /* begin OrR:R: */ - genoperandoperand(OrRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePerformCallout */ -static sqInt -genLowcodePerformCallout(void) -{ - AbstractInstruction *abstractInstruction; - AbstractInstruction *abstractInstruction1; - AbstractInstruction *anInstruction; - - callSwitchToCStack(); - /* begin checkLiteral:forInstruction: */ - anInstruction = genoperandoperand(MoveCwR, extA, TempReg); - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin annotateBytecode: */ - abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); - (abstractInstruction1->annotation = HasBytecodePC); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePerformCalloutIndirect */ -static sqInt -genLowcodePerformCalloutIndirect(void) -{ - AbstractInstruction *abstractInstruction; - AbstractInstruction *abstractInstruction1; - - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - callSwitchToCStack(); - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin annotateBytecode: */ - abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); - (abstractInstruction1->annotation = HasBytecodePC); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePin */ -static sqInt -genLowcodePin(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePlaftormCode */ -static sqInt -genLowcodePlaftormCode(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddConstantOffset */ -static sqInt -genLowcodePointerAddConstantOffset(void) -{ - AbstractInstruction *anInstruction; - sqInt base; - sqInt offset; - - offset = extB; - if (((base = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((base = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (base == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AddCqR, offset, base); - ssPushNativeRegister(base); - extB = 0; - numExtB = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddOffset32 */ -static sqInt -genLowcodePointerAddOffset32(void) -{ - sqInt base; - sqInt offset; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((base = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offset)))) == NoReg) { - ssAllocateRequiredReg((base = Arg1Reg)); - } - if ((offset == ReceiverResultReg) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, offset, base); - ssPushNativeRegister(base); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddOffset64 */ -static sqInt -genLowcodePointerAddOffset64(void) -{ - sqInt base; - sqInt offsetHigh; - sqInt offsetLow; - - if (((offsetLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offsetLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((offsetHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offsetLow)))) == NoReg) { - ssAllocateRequiredReg((offsetHigh = Arg1Reg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << offsetLow)) | (1U << offsetHigh)))) == NoReg) { - ssAllocateRequiredReg((base = SendNumArgsReg)); - } - if (((offsetLow == ReceiverResultReg) - || (offsetHigh == ReceiverResultReg)) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), offsetLow, offsetHigh); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, offsetLow, base); - ssPushNativeRegister(base); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerEqual */ -static sqInt -genLowcodePointerEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerNotEqual */ -static sqInt -genLowcodePointerNotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToInt32 */ -static sqInt -genLowcodePointerToInt32(void) -{ - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssPushNativeRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToInt64 */ -static sqInt -genLowcodePointerToInt64(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt resultHigh; - sqInt resultLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((resultLow = Arg1Reg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointer, resultLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, resultHigh); - ssPushNativeRegistersecondRegister(resultLow, resultHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToOop */ -static sqInt -genLowcodePointerToOop(void) -{ - sqInt pointer; - sqInt pointerClassLiteral; - - pointerClassLiteral = getLiteral(extA); - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssFlushAll(); - genLcPointerToOopclass(pointer, pointerClassLiteral); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToOopReinterprer */ -static sqInt -genLowcodePointerToOopReinterprer(void) -{ - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssPushRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopFloat32 */ -static sqInt -genLowcodePopFloat32(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopFloat64 */ -static sqInt -genLowcodePopFloat64(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopInt32 */ -static sqInt -genLowcodePopInt32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopInt64 */ -static sqInt -genLowcodePopInt64(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopMultipleNative */ -static sqInt -genLowcodePopMultipleNative(void) -{ - ssPopNativeSize(extA); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopPointer */ -static sqInt -genLowcodePopPointer(void) -{ - sqInt pointerValue; - - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerValue == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultFloat32 */ -static sqInt -genLowcodePushCalloutResultFloat32(void) -{ - cFloatResultToRs(backEnd, DPFPReg0); - ssPushNativeRegisterSingleFloat(DPFPReg0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultFloat64 */ -static sqInt -genLowcodePushCalloutResultFloat64(void) -{ - cFloatResultToRd(backEnd, DPFPReg0); - ssPushNativeRegisterDoubleFloat(DPFPReg0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultInt32 */ -static sqInt -genLowcodePushCalloutResultInt32(void) -{ - sqInt reg1; - - /* begin MoveR:R: */ - reg1 = EAX; - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - ssPushNativeRegister(ReceiverResultReg); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultInt64 */ -static sqInt -genLowcodePushCalloutResultInt64(void) -{ - sqInt reg1; - sqInt reg11; - - /* begin MoveR:R: */ - reg1 = EAX; - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - /* begin MoveR:R: */ - reg11 = EDX; - genoperandoperand(MoveRR, reg11, Arg0Reg); - ssPushNativeRegistersecondRegister(ReceiverResultReg, Arg0Reg); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultPointer */ -static sqInt -genLowcodePushCalloutResultPointer(void) -{ - sqInt reg1; - - /* begin MoveR:R: */ - reg1 = EAX; - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - ssPushNativeRegister(ReceiverResultReg); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushConstantUInt32 */ -static sqInt -genLowcodePushConstantUInt32(void) -{ - sqInt constant; - - constant = extA; - ssPushNativeConstantInt32(constant); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushConstantUInt64 */ -static sqInt -genLowcodePushConstantUInt64(void) -{ - sqInt constant; - - constant = extA; - ssPushNativeConstantInt64(constant); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushNullPointer */ -static sqInt -genLowcodePushNullPointer(void) -{ - ssPushNativeConstantPointer(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOne32 */ -static sqInt -genLowcodePushOne32(void) -{ - ssPushNativeConstantInt32(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOne64 */ -static sqInt -genLowcodePushOne64(void) -{ - ssPushNativeConstantInt64(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOneFloat32 */ -static sqInt -genLowcodePushOneFloat32(void) -{ - ssPushNativeConstantFloat32(1.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOneFloat64 */ -static sqInt -genLowcodePushOneFloat64(void) -{ - ssPushNativeConstantFloat64(1.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalFloat32 */ -static sqInt -genLowcodePushPhysicalFloat32(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalFloat64 */ -static sqInt -genLowcodePushPhysicalFloat64(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalInt32 */ -static sqInt -genLowcodePushPhysicalInt32(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalInt64 */ -static sqInt -genLowcodePushPhysicalInt64(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalPointer */ -static sqInt -genLowcodePushPhysicalPointer(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushSessionIdentifier */ -static sqInt -genLowcodePushSessionIdentifier(void) -{ - ssPushNativeConstantInt32(getThisSessionID()); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZero32 */ -static sqInt -genLowcodePushZero32(void) -{ - ssPushNativeConstantInt32(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZero64 */ -static sqInt -genLowcodePushZero64(void) -{ - ssPushNativeConstantInt64(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZeroFloat32 */ -static sqInt -genLowcodePushZeroFloat32(void) -{ - ssPushNativeConstantFloat32(0.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZeroFloat64 */ -static sqInt -genLowcodePushZeroFloat64(void) -{ - ssPushNativeConstantFloat64(0.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRem32 */ -static sqInt -genLowcodeRem32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRem64 */ -static sqInt -genLowcodeRem64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRightShift32 */ -static sqInt -genLowcodeRightShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin LogicalShiftRightR:R: */ - genoperandoperand(LogicalShiftRightRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRightShift64 */ -static sqInt -genLowcodeRightShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << shiftAmount)) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend32From16 */ -static sqInt -genLowcodeSignExtend32From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend32From8 */ -static sqInt -genLowcodeSignExtend32From8(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From16 */ -static sqInt -genLowcodeSignExtend64From16(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * isNegative; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, valueLow); - /* begin JumpLess: */ - isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh))); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From32 */ -static sqInt -genLowcodeSignExtend64From32(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * isNegative; - sqInt resultHigh; - sqInt resultLow; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((resultLow = Arg1Reg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << value)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, resultLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, value); - /* begin JumpLess: */ - isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, resultHigh); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, resultHigh))); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegistersecondRegister(resultLow, resultHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From8 */ -static sqInt -genLowcodeSignExtend64From8(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * isNegative; - sqInt resultHigh; - sqInt resultLow; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((resultLow = SendNumArgsReg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = ClassReg)); - } - if ((((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, valueLow); - /* begin JumpLess: */ - isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh))); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSmallInt32ToOop */ -static sqInt -genLowcodeSmallInt32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - genConvertIntegerToSmallIntegerInReg(value); - ssPushRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreFloat32ToMemory */ -static sqInt -genLowcodeStoreFloat32ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt floatValue; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRsM32r, floatValue, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreFloat64ToMemory */ -static sqInt -genLowcodeStoreFloat64ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt doubleValue; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), doubleValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, doubleValue, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt16ToMemory */ -static sqInt -genLowcodeStoreInt16ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM16r, TempReg, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt32ToMemory */ -static sqInt -genLowcodeStoreInt32ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, value, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt64ToMemory */ -static sqInt -genLowcodeStoreInt64ToMemory(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt pointer; - sqInt valueHigh; - sqInt valueLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, valueLow, 0, pointer); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRM32r, valueHigh, 4, pointer); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt8ToMemory */ -static sqInt -genLowcodeStoreInt8ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM8r, TempReg, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalFloat32 */ -static sqInt -genLowcodeStoreLocalFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRsM32r, value, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalFloat64 */ -static sqInt -genLowcodeStoreLocalFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, value, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt16 */ -static sqInt -genLowcodeStoreLocalInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - loadNativeLocalAddressto(baseOffset, value); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM16r, TempReg, 0, value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt32 */ -static sqInt -genLowcodeStoreLocalInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, value, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt64 */ -static sqInt -genLowcodeStoreLocalInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, valueLow, 0, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRM32r, valueHigh, 4, TempReg); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt8 */ -static sqInt -genLowcodeStoreLocalInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - loadNativeLocalAddressto(baseOffset, value); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM8r, TempReg, 0, value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalPointer */ -static sqInt -genLowcodeStoreLocalPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerValue; - - baseOffset = extA; - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerValue == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, pointerValue, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreObjectField */ -static sqInt -genLowcodeStoreObjectField(void) -{ - sqInt fieldIndex; - sqInt object; - sqInt value; - - fieldIndex = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), value); - ssPop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcStoreobjectfield(value, object, fieldIndex); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreObjectFieldAt */ -static sqInt -genLowcodeStoreObjectFieldAt(void) -{ - sqInt fieldIndex; - sqInt object; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((fieldIndex = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((fieldIndex = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << value)) | (1U << fieldIndex)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (fieldIndex == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), value); - ssPop(1); - nativePopToReg(ssNativeTop(), fieldIndex); - ssNativePop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcStoreobjectat(value, object, fieldIndex); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStorePointerToMemory */ -static sqInt -genLowcodeStorePointerToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt memoryPointer; - sqInt pointerValue; - - if (((memoryPointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((memoryPointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointerValue = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << memoryPointer)))) == NoReg) { - ssAllocateRequiredReg((pointerValue = Arg1Reg)); - } - if ((memoryPointer == ReceiverResultReg) - || (pointerValue == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), memoryPointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, pointerValue, 0, memoryPointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSub32 */ -static sqInt -genLowcodeSub32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSub64 */ -static sqInt -genLowcodeSub64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, secondLow, firstLow); - /* begin SubbR:R: */ - genoperandoperand(SubbRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator dispatch */ - - /* StackToRegisterMappingCogit>>#genLowcodeTrinaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeTrinaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeOopEqual(); - - case 1: - return genLowcodeOopNotEqual(); - - case 2: - return genLowcodeStoreObjectField(); - - case 3: - return genLowcodeStoreObjectFieldAt(); - - default: - return EncounteredUnknownBytecode; - - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate32To16 */ -static sqInt -genLowcodeTruncate32To16(void) -{ - AbstractInstruction *anInstruction; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFFFF, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate32To8 */ -static sqInt -genLowcodeTruncate32To8(void) -{ - AbstractInstruction *anInstruction; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFF, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To16 */ -static sqInt -genLowcodeTruncate64To16(void) -{ - AbstractInstruction *anInstruction; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFFFF, valueLow); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To32 */ -static sqInt -genLowcodeTruncate64To32(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To8 */ -static sqInt -genLowcodeTruncate64To8(void) -{ - AbstractInstruction *anInstruction; - sqInt result; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFF, valueLow); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUdiv32 */ -static sqInt -genLowcodeUdiv32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, first, second); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUdiv64 */ -static sqInt -genLowcodeUdiv64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32Great */ -static sqInt -genLowcodeUint32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpBelowOrEqual: */ - falseJump = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32GreatEqual */ -static sqInt -genLowcodeUint32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpBelow: */ - falseJump = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32Less */ -static sqInt -genLowcodeUint32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpAboveOrEqual: */ - falseJump = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32LessEqual */ -static sqInt -genLowcodeUint32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpAbove: */ - falseJump = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToFloat32 */ -static sqInt -genLowcodeUint32ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rs: */ - genoperandoperand(ConvertRRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToFloat64 */ -static sqInt -genLowcodeUint32ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rd: */ - genoperandoperand(ConvertRRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToOop */ -static sqInt -genLowcodeUint32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcUInt32ToOop(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64Great */ -static sqInt -genLowcodeUint64Great(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64GreatEqual */ -static sqInt -genLowcodeUint64GreatEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} + case 10: + /* begin genLowcodeUint64ToOop */ + /* begin allocateRegistersForLowcodeInteger2ResultOop: */ + topRegistersMask2 = 0; + rTop9 = (rNext2 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop9 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext2 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop9); + } + assert(!(((rTop9 == NoReg) + || (rNext2 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop9) | (1U << rNext2)); + assert(!((rResult5 == NoReg))); + valueLow2 = rTop9; + valueHigh2 = rNext2; + object4 = rResult5; + nativePopToRegsecondReg(ssNativeTop(), valueLow2, valueHigh2); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcUInt64ToOophighPart(valueLow2, valueHigh2); -/* Lowcode instruction generator */ + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeUint64Less */ -static sqInt -genLowcodeUint64Less(void) -{ - sqInt first; - sqInt second; - sqInt value; + default: + return EncounteredUnknownBytecode; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); return 0; } -/* Lowcode instruction generator */ +/* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeUint64LessEqual */ -static sqInt -genLowcodeUint64LessEqual(void) + /* StackToRegisterMappingCogit>>#genLowcodeTrinaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeTrinaryInlinePrimitive(sqInt prim) { + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction3; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + sqInt fieldIndex; + sqInt fieldIndex1; + sqInt fieldIndexValue; sqInt first; + sqInt first1; + sqInt firstValue; + sqInt firstValue1; + sqInt object; + sqInt object1; + sqInt objectValue; + sqInt objectValue1; + sqInt oopTopRegisterMask; + sqInt oopTopRegisterMask1; + sqInt oopTopRegisterMask2; + sqInt oopTopRegisterMask3; + sqInt rOopNext; + sqInt rOopNext1; + sqInt rOopNext2; + sqInt rOopNext3; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop2; + sqInt rOopTop3; + sqInt rResult; + sqInt rTop; sqInt second; + sqInt second1; + sqInt secondValue; + sqInt secondValue1; + sqInt topRegisterMask; sqInt value; + sqInt value1; + sqInt value2; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue2; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToFloat32 */ -static sqInt -genLowcodeUint64ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToFloat64 */ -static sqInt -genLowcodeUint64ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToOop */ -static sqInt -genLowcodeUint64ToOop(void) -{ - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssFlushAll(); - genLcUInt64ToOophighPart(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ + + switch (prim) { + case 0: + /* begin genLowcodeOopEqual */ + rOopTop = (rOopNext = NoReg); + rResult = NoReg; + oopTopRegisterMask = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask = 1U << rOopNext; + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(oopTopRegisterMask); + } + if (rOopNext == NoReg) { + rOopNext = allocateRegNotConflictingWith(1U << rOopTop); + } + rResult = allocateRegNotConflictingWith((1U << rOopTop) | (1U << rOopNext)); + assert(!(((rOopTop == NoReg) + || ((rOopNext == NoReg) + || (rResult == NoReg))))); + second = rOopTop; + first = rOopNext; + value = rResult; + + popToReg(ssTop(), second); + ssPop(1); + popToReg(ssTop(), first); + ssPop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second, first); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 1, first); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, first); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeUmul32 */ -static sqInt -genLowcodeUmul32(void) -{ - sqInt first; - sqInt second; + case 1: + /* begin genLowcodeOopNotEqual */ + rOopTop1 = (rOopNext1 = NoReg); + oopTopRegisterMask1 = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext1 = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask1 = 1U << rOopNext1; + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(oopTopRegisterMask1); + } + if (rOopNext1 == NoReg) { + rOopNext1 = allocateRegNotConflictingWith(1U << rOopTop1); + } + assert(!(((rOopTop1 == NoReg) + || (rOopNext1 == NoReg)))); + second1 = rOopTop1; + first1 = rOopNext1; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, second, first); - ssPushNativeRegister(first); - return 0; -} + popToReg(ssTop(), second1); + ssPop(1); + popToReg(ssTop(), first1); + ssPop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second1, first1); + /* begin JumpZero: */ + falseJump1 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(MoveCqR, 1, first1); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, first1); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first1); + return 0; + case 2: + /* begin genLowcodeStoreObjectField */ + fieldIndex = extA; + /* begin allocateRegistersForLowcodeOop2: */ + rOopTop2 = (rOopNext2 = NoReg); + oopTopRegisterMask2 = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext2 = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask2 = 1U << rOopNext2; + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(oopTopRegisterMask2); + } + if (rOopNext2 == NoReg) { + rOopNext2 = allocateRegNotConflictingWith(1U << rOopTop2); + } + assert(!(((rOopTop2 == NoReg) + || (rOopNext2 == NoReg)))); + value1 = rOopTop2; + object = rOopNext2; + + popToReg(ssTop(), value1); + ssPop(1); + popToReg(ssTop(), object); + ssPop(1); + genLcStoreobjectfield(value1, object, fieldIndex); + extA = 0; + return 0; -/* Lowcode instruction generator */ + case 3: + /* begin genLowcodeStoreObjectFieldAt */ + rTop = (rOopTop3 = (rOopNext3 = NoReg)); + oopTopRegisterMask3 = (topRegisterMask = 0); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + /* begin registerMaskFor: */ + oopTopRegisterMask3 = 1U << rTop; + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask = 1U << rOopTop3; + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext3 = registerOrNone(ssValue(1)); + topRegisterMask = topRegisterMask | (1U << rOopNext3); + oopTopRegisterMask3 = oopTopRegisterMask3 | (1U << rOopNext3); + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegisterMask); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(oopTopRegisterMask3); + } + if (rOopNext3 == NoReg) { + rOopNext3 = allocateRegNotConflictingWith((1U << rTop) | (1U << rOopTop3)); + } + assert(!(((rTop == NoReg) + || ((rOopTop3 == NoReg) + || (rOopNext3 == NoReg))))); + fieldIndex1 = rTop; + value2 = rOopTop3; + object1 = rOopNext3; + + popToReg(ssTop(), value2); + ssPop(1); + nativePopToReg(ssNativeTop(), fieldIndex1); + ssNativePop(1); + popToReg(ssTop(), object1); + ssPop(1); + genLcStoreobjectat(value2, object1, fieldIndex1); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeUmul64 */ -static sqInt -genLowcodeUmul64(void) -{ - sqInt first; - sqInt result; - sqInt second; + default: + return EncounteredUnknownBytecode; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); return 0; } @@ -36731,187 +29578,2125 @@ genLowcodeUmul64(void) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive2(sqInt prim) { + AbstractInstruction *abstractInstruction; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction110; + AbstractInstruction *anInstruction111; + AbstractInstruction *anInstruction112; + AbstractInstruction *anInstruction113; + AbstractInstruction *anInstruction114; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction27; + AbstractInstruction *anInstruction28; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction30; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction33; + AbstractInstruction *anInstruction34; + AbstractInstruction *anInstruction35; + AbstractInstruction *anInstruction36; + AbstractInstruction *anInstruction37; + AbstractInstruction *anInstruction38; + AbstractInstruction *anInstruction39; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction40; + AbstractInstruction *anInstruction41; + AbstractInstruction *anInstruction42; + AbstractInstruction *anInstruction43; + AbstractInstruction *anInstruction44; + AbstractInstruction *anInstruction45; + AbstractInstruction *anInstruction46; + AbstractInstruction *anInstruction47; + AbstractInstruction *anInstruction48; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt baseOffset; + sqInt baseOffset1; + sqInt baseOffset10; + sqInt baseOffset11; + sqInt baseOffset12; + sqInt baseOffset13; + sqInt baseOffset14; + sqInt baseOffset15; + sqInt baseOffset16; + sqInt baseOffset17; + sqInt baseOffset18; + sqInt baseOffset19; + sqInt baseOffset2; + sqInt baseOffset20; + sqInt baseOffset21; + sqInt baseOffset22; + sqInt baseOffset23; + sqInt baseOffset3; + sqInt baseOffset4; + sqInt baseOffset5; + sqInt baseOffset6; + sqInt baseOffset7; + sqInt baseOffset8; + sqInt baseOffset9; + sqInt classOop; + sqInt classOop1; + sqInt classOop2; + sqInt classOopValue; + sqInt classOopValue1; + sqInt classOopValue2; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + AbstractInstruction * contJump4; + AbstractInstruction * contJump5; + AbstractInstruction * contJump6; + AbstractInstruction * contJump7; + sqInt doubleValue; + sqInt doubleValue1; + sqInt doubleValueValue; + sqInt doubleValueValue1; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump21; + AbstractInstruction * falseJump22; + AbstractInstruction * falseJump3; + AbstractInstruction * falseJump4; + AbstractInstruction * falseJump5; + AbstractInstruction * falseJump6; + AbstractInstruction * falseJump7; + AbstractInstruction * falseLabel; + AbstractInstruction * falseLabel1; + sqInt fieldIndex; + sqInt fieldIndexValue; + sqInt first; + sqInt first1; + sqInt first10; + sqInt first2; + sqInt first3; + sqInt first4; + sqInt first5; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstHigh; + sqInt firstHigh5; + sqInt firstHighValue; + sqInt firstHighValue1; + sqInt firstLow; + sqInt firstLow5; + sqInt firstLowValue; + sqInt firstLowValue1; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue10; + sqInt firstValue2; + sqInt firstValue3; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt floatValue; + sqInt floatValue1; + sqInt floatValue2; + sqInt floatValue3; + sqInt floatValue4; + sqInt floatValue5; + sqInt floatValue6; + sqInt floatValueValue; + sqInt floatValueValue1; + sqInt floatValueValue2; + sqInt floatValueValue3; + sqInt floatValueValue4; + sqInt floatValueValue5; + sqInt floatValueValue6; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frResult4; + sqInt frResult5; + sqInt frResult6; + sqInt frResult7; + sqInt frResult8; + sqInt frResult9; + sqInt frTop; + sqInt frTop1; + sqInt frTop2; + sqInt frTop3; + sqInt frTop4; + sqInt indexableSize; + sqInt indexableSize1; + sqInt indexableSizeValue; + sqInt int32Result; + sqInt int32ResultValue; + sqInt int64Result; + sqInt int64Result1; + sqInt int64Result2; + sqInt int64ResultValue; + sqInt int64ResultValue1; + sqInt int64ResultValue2; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt object; + sqInt object1; + sqInt object2; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue2; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointer6; + sqInt pointer7; + sqInt pointer8; + sqInt pointerResult; + sqInt pointerResult1; + sqInt pointerResultValue; + sqInt pointerResultValue1; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValue8; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg2; + sqInt reg3; + sqInt reg4; + sqInt reg5; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerMask; + sqInt registerMask1; + sqInt result; + sqInt result1; + sqInt result2; + sqInt result3; + sqInt result4; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue2; + sqInt resultValue3; + sqInt resultValue4; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext12; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext2; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNextNext; + sqInt rNextNextNext1; + sqInt rOopResult; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop2; + sqInt rOopTop3; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult11; + sqInt rResult12; + sqInt rResult13; + sqInt rResult14; + sqInt rResult15; + sqInt rResult16; + sqInt rResult17; + sqInt rResult18; + sqInt rResult19; + sqInt rResult2; + sqInt rResult20; + sqInt rResult21; + sqInt rResult210; + sqInt rResult211; + sqInt rResult212; + sqInt rResult213; + sqInt rResult214; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult25; + sqInt rResult26; + sqInt rResult27; + sqInt rResult28; + sqInt rResult29; + sqInt rResult3; + sqInt rResult30; + sqInt rResult31; + sqInt rResult32; + sqInt rResult33; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop12; + sqInt rTop13; + sqInt rTop14; + sqInt rTop15; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt second; + sqInt second1; + sqInt second10; + sqInt second2; + sqInt second3; + sqInt second4; + sqInt second5; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondHigh; + sqInt secondHigh5; + sqInt secondHighValue; + sqInt secondHighValue1; + sqInt secondLow; + sqInt secondLow5; + sqInt secondLowValue; + sqInt secondLowValue1; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue10; + sqInt secondValue2; + sqInt secondValue3; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt topRegisterMask; + sqInt topRegisterMask1; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask13; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask2; + sqInt topRegistersMask3; + sqInt topRegistersMask4; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value17; + sqInt value18; + sqInt value19; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value27; + sqInt value28; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value7; + sqInt value8; + sqInt valueHigh2; + sqInt valueHigh4; + sqInt valueHigh5; + sqInt valueHigh6; + sqInt valueHigh7; + sqInt valueHigh8; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueHighValue3; + sqInt valueHighValue4; + sqInt valueHighValue5; + sqInt valueLow2; + sqInt valueLow4; + sqInt valueLow5; + sqInt valueLow6; + sqInt valueLow7; + sqInt valueLow8; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueLowValue3; + sqInt valueLowValue4; + sqInt valueLowValue5; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue17; + sqInt valueValue18; + sqInt valueValue19; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue27; + sqInt valueValue28; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue7; + sqInt valueValue8; + switch (prim) { case 60: - return genLowcodeFloat64ToFloat32(); + /* begin genLowcodeFloat64ToFloat32 */ + topRegistersMask = 0; + frTop = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(topRegistersMask); + } + assert(!((frTop == NoReg))); + floatValue = frTop; + + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin ConvertRd:Rs: */ + genoperandoperand(ConvertRdRs, floatValue, floatValue); + ssPushNativeRegisterSingleFloat(floatValue); + return 0; case 61: - return genLowcodeFloat64ToInt32(); + /* begin genLowcodeFloat64ToInt32 */ + frTop1 = NoReg; + + /* Float argument */ + rResult = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(0); + assert(!(((frTop1 == NoReg) + || (rResult == NoReg)))); + floatValue1 = frTop1; + int32Result = rResult; + + nativePopToReg(ssNativeTop(), floatValue1); + ssNativePop(1); + /* begin ConvertRd:R: */ + genoperandoperand(ConvertRdR, floatValue1, int32Result); + ssPushNativeRegister(int32Result); + return 0; case 0x3E: - return genLowcodeFloat64ToInt64(); + /* begin genLowcodeFloat64ToInt64 */ + frTop2 = NoReg; + + /* Float argument */ + rResult1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(0); + assert(!(((frTop2 == NoReg) + || (rResult1 == NoReg)))); + floatValue2 = frTop2; + int64Result = rResult1; + + nativePopToReg(ssNativeTop(), floatValue2); + ssNativePop(1); + abort(); + return 0; case 0x3F: - return genLowcodeFloat64ToUInt32(); + /* begin genLowcodeFloat64ToUInt32 */ + frTop3 = NoReg; + + /* Float argument */ + rResult2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(0); + assert(!(((frTop3 == NoReg) + || (rResult2 == NoReg)))); + floatValue3 = frTop3; + int64Result1 = rResult2; + + nativePopToReg(ssNativeTop(), floatValue3); + ssNativePop(1); + /* begin ConvertRd:R: */ + genoperandoperand(ConvertRdR, floatValue3, int64Result1); + ssPushNativeRegister(int64Result1); + return 0; case 64: - return genLowcodeFloat64ToUInt64(); + /* begin genLowcodeFloat64ToUInt64 */ + frTop4 = NoReg; + + /* Float argument */ + rResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop4 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop4 == NoReg) { + frTop4 = allocateFloatRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(0); + assert(!(((frTop4 == NoReg) + || (rResult3 == NoReg)))); + floatValue4 = frTop4; + int64Result2 = rResult3; + + nativePopToReg(ssNativeTop(), floatValue4); + ssNativePop(1); + abort(); + return 0; case 65: - return genLowcodeFree(); + /* begin genLowcodeFree */ + rTop28 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop28 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(0); + } + assert(!((rTop28 == NoReg))); + pointer7 = rTop28; + + nativePopToReg(ssNativeTop(), pointer7); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (pointer7 != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointer7, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceFreeTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + return 0; case 66: - return genLowcodeInstantiateIndexable32Oop(); + /* begin genLowcodeInstantiateIndexable32Oop */ + rTop29 = (rOopTop1 = NoReg); + rOopResult = NoReg; + topRegisterMask1 = 0; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask1 = 1U << rOopTop1; + } + if (rTop29 == NoReg) { + rTop29 = allocateRegNotConflictingWith(topRegisterMask1); + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(1U << rTop29); + } + rOopResult = allocateRegNotConflictingWith((1U << rTop29) | (1U << rOopTop1)); + assert(!(((rTop29 == NoReg) + || ((rOopTop1 == NoReg) + || (rOopResult == NoReg))))); + indexableSize = rTop29; + classOop = rOopTop1; + object1 = rOopResult; + + nativePopToReg(ssNativeTop(), indexableSize); + ssNativePop(1); + popToReg(ssTop(), classOop); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOopindexableSize(classOop, indexableSize); + return 0; case 67: - return genLowcodeInstantiateIndexableOop(); + /* begin genLowcodeInstantiateIndexableOop */ + indexableSize1 = extA; + /* begin allocateRegistersForLowcodeOopResultOop: */ + rOopTop2 = NoReg; + rResult28 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(0); + } + rResult28 = allocateRegNotConflictingWith(1U << rOopTop2); + assert(!(((rOopTop2 == NoReg) + || (rResult28 == NoReg)))); + classOop1 = rOopTop2; + object2 = rResult28; + + popToReg(ssTop(), classOop1); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOopconstantIndexableSize(classOop1, indexableSize1); + extA = 0; + return 0; case 68: - return genLowcodeInstantiateOop(); + /* begin genLowcodeInstantiateOop */ + rOopTop3 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop3 == NoReg))); + classOop2 = rOopTop3; + + popToReg(ssTop(), classOop2); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOop(classOop2); + return 0; case 69: - return genLowcodeInt32Equal(); + /* begin genLowcodeInt32Equal */ + topRegistersMask1 = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second, first); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 1, first); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, first); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first); + return 0; case 70: - return genLowcodeInt32Great(); + /* begin genLowcodeInt32Great */ + topRegistersMask2 = 0; + rTop1 = (rNext1 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop1 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext1 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg1; + } + } + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop1); + } + assert(!(((rTop1 == NoReg) + || (rNext1 == NoReg)))); + second1 = rTop1; + first1 = rNext1; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second1, first1); + /* begin JumpLessOrEqual: */ + falseJump1 = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(MoveCqR, 1, first1); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, first1); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first1); + return 0; case 71: - return genLowcodeInt32GreatEqual(); + /* begin genLowcodeInt32GreatEqual */ + topRegistersMask3 = 0; + rTop2 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg2; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext2 == NoReg)))); + second2 = rTop2; + first2 = rNext2; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second2, first2); + /* begin JumpLess: */ + falseJump2 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(MoveCqR, 1, first2); + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperand(MoveCqR, 0, first2); + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first2); + return 0; case 72: - return genLowcodeInt32Less(); + /* begin genLowcodeInt32Less */ + topRegistersMask4 = 0; + rTop3 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1U << reg3; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + second3 = rTop3; + first3 = rNext3; + + nativePopToReg(ssNativeTop(), second3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first3); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second3, first3); + /* begin JumpGreaterOrEqual: */ + falseJump3 = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperand(MoveCqR, 1, first3); + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperand(MoveCqR, 0, first3); + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first3); + return 0; case 73: - return genLowcodeInt32LessEqual(); + /* begin genLowcodeInt32LessEqual */ + topRegistersMask5 = 0; + rTop4 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1U << reg4; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext4 == NoReg)))); + second4 = rTop4; + first4 = rNext4; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second4, first4); + /* begin JumpGreater: */ + falseJump4 = genConditionalBranchoperand(JumpGreater, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperand(MoveCqR, 1, first4); + /* begin Jump: */ + contJump4 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperand(MoveCqR, 0, first4); + jmpTarget(contJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first4); + return 0; case 74: - return genLowcodeInt32NotEqual(); + /* begin genLowcodeInt32NotEqual */ + topRegistersMask6 = 0; + rTop5 = (rNext5 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext5 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg5; + } + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext5 == NoReg) { + rNext5 = allocateRegNotConflictingWith(1U << rTop5); + } + assert(!(((rTop5 == NoReg) + || (rNext5 == NoReg)))); + second5 = rTop5; + first5 = rNext5; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second5, first5); + /* begin JumpZero: */ + falseJump5 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperand(MoveCqR, 1, first5); + /* begin Jump: */ + contJump5 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperand(MoveCqR, 0, first5); + jmpTarget(contJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first5); + return 0; case 75: - return genLowcodeInt32ToFloat32(); + /* begin genLowcodeInt32ToFloat32 */ + rTop6 = NoReg; + frResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop6 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop6 == NoReg) + || (frResult == NoReg)))); + value = rTop6; + result = frResult; + + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin ConvertR:Rs: */ + genoperandoperand(ConvertRRs, value, result); + ssPushNativeRegisterSingleFloat(result); + return 0; case 76: - return genLowcodeInt32ToFloat64(); + /* begin genLowcodeInt32ToFloat64 */ + rTop7 = NoReg; + frResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop7 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop7 == NoReg) + || (frResult1 == NoReg)))); + value1 = rTop7; + result1 = frResult1; + + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + /* begin ConvertR:Rd: */ + genoperandoperand(ConvertRRd, value1, result1); + ssPushNativeRegisterDoubleFloat(result1); + return 0; case 77: - return genLowcodeInt32ToPointer(); + /* begin genLowcodeInt32ToPointer */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value2 = rTop8; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + ssPushNativeRegister(value2); + return 0; case 78: - return genLowcodeInt64Equal(); + /* begin genLowcodeInt64Equal */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop9 = (rNext6 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext6 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop9 == NoReg) { + registerMask = 0; + if (rNext6 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext6; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop9 = allocateRegNotConflictingWith(registerMask); + } + if (rNext6 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop9; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext6 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop9) | (1U << rNext6); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop9) | (1U << rNext6)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop9 == NoReg) + || ((rNext6 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow = rTop9; + secondHigh = rNext6; + firstLow = rNextNext; + firstHigh = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondHigh, firstHigh); + /* begin JumpNonZero: */ + falseJump6 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondLow, firstLow); + /* begin JumpNonZero: */ + falseJump21 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperand(MoveCqR, 1, firstLow); + /* begin Jump: */ + contJump6 = genoperand(Jump, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperand(MoveCqR, 0, firstLow); + falseLabel = anInstruction13; + jmpTarget(falseJump6, falseLabel); + jmpTarget(falseJump21, falseLabel); + jmpTarget(contJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(firstLow); + + return 0; case 79: - return genLowcodeInt64Great(); + /* begin genLowcodeInt64Great */ + topRegistersMask8 = 0; + rTop10 = (rNext7 = NoReg); + rResult4 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext7 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg7; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1U << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext7 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop10) | (1U << rNext7)); + assert(!((rResult4 == NoReg))); + second7 = rTop10; + first7 = rNext7; + value3 = rResult4; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + abort(); + return 0; case 80: - return genLowcodeInt64GreatEqual(); + /* begin genLowcodeInt64GreatEqual */ + topRegistersMask9 = 0; + rTop12 = (rNext8 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop12 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext8 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1U << reg8; + } + } + if (rTop12 == NoReg) { + rTop12 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1U << rTop12); + } + assert(!(((rTop12 == NoReg) + || (rNext8 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop12) | (1U << rNext8)); + assert(!((rResult5 == NoReg))); + second8 = rTop12; + first8 = rNext8; + value4 = rResult5; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + abort(); + return 0; case 81: - return genLowcodeInt64Less(); + /* begin genLowcodeInt64Less */ + topRegistersMask10 = 0; + rTop13 = (rNext9 = NoReg); + rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop13 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext9 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask10 = 1U << reg9; + } + } + if (rTop13 == NoReg) { + rTop13 = allocateRegNotConflictingWith(topRegistersMask10); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop13); + } + assert(!(((rTop13 == NoReg) + || (rNext9 == NoReg)))); + rResult6 = allocateFloatRegNotConflictingWith((1U << rTop13) | (1U << rNext9)); + assert(!((rResult6 == NoReg))); + second9 = rTop13; + first9 = rNext9; + value5 = rResult6; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + abort(); + return 0; case 82: - return genLowcodeInt64LessEqual(); + /* begin genLowcodeInt64LessEqual */ + topRegistersMask11 = 0; + rTop14 = (rNext10 = NoReg); + rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop14 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1U << reg10; + } + } + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(topRegistersMask11); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop14); + } + assert(!(((rTop14 == NoReg) + || (rNext10 == NoReg)))); + rResult7 = allocateFloatRegNotConflictingWith((1U << rTop14) | (1U << rNext10)); + assert(!((rResult7 == NoReg))); + second10 = rTop14; + first10 = rNext10; + value6 = rResult7; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + abort(); + return 0; case 83: - return genLowcodeInt64NotEqual(); + /* begin genLowcodeInt64NotEqual */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop15 = (rNext12 = (rNextNext1 = (rNextNextNext1 = NoReg))); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext12 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext12 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext12 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + nativeValueIndex1 += 1; + } + } + if (rTop15 == NoReg) { + registerMask1 = 0; + if (rNext12 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext12; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rTop15 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext12 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop15; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNext12 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop15) | (1U << rNext12); + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNextNext1 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask1 = ((1U << rTop15) | (1U << rNext12)) | (1U << rNextNext1); + rNextNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop15 == NoReg) + || ((rNext12 == NoReg) + || ((rNextNext1 == NoReg) + || (rNextNextNext1 == NoReg)))))); + secondLow5 = rTop15; + secondHigh5 = rNext12; + firstLow5 = rNextNext1; + firstHigh5 = rNextNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), secondLow5, secondHigh5); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow5, firstHigh5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondHigh5, firstHigh5); + /* begin JumpNonZero: */ + falseJump7 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondLow5, firstLow5); + /* begin JumpNonZero: */ + falseJump22 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCqR, 0, firstLow5); + /* begin Jump: */ + contJump7 = genoperand(Jump, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(MoveCqR, 1, firstLow5); + falseLabel1 = anInstruction17; + jmpTarget(falseJump7, falseLabel1); + jmpTarget(falseJump22, falseLabel1); + jmpTarget(contJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(firstLow5); + + return 0; case 84: - return genLowcodeInt64ToFloat32(); + /* begin genLowcodeInt64ToFloat32 */ + rTop17 = NoReg; + frResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop17 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop17 == NoReg) + || (frResult2 == NoReg)))); + value7 = rTop17; + result2 = frResult2; + + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + abort(); + return 0; case 85: - return genLowcodeInt64ToFloat64(); + /* begin genLowcodeInt64ToFloat64 */ + rTop18 = NoReg; + frResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop18 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop18 == NoReg) { + rTop18 = allocateRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop18 == NoReg) + || (frResult3 == NoReg)))); + value8 = rTop18; + result3 = frResult3; + + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + abort(); + return 0; case 86: - return genLowcodeInt64ToPointer(); + /* begin genLowcodeInt64ToPointer */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask13 = 0; + rTop19 = (rNext14 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (rNext14 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1U << reg12; + } + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(topRegistersMask13); + } + if (rNext14 == NoReg) { + rNext14 = allocateRegNotConflictingWith(1U << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext14 == NoReg)))); + valueLow2 = rTop19; + valueHigh2 = rNext14; + + nativePopToRegsecondReg(ssNativeTop(), valueLow2, valueHigh2); + ssNativePop(1); + ssPushNativeRegister(valueLow2); + + return 0; case 87: - return genLowcodeLeftShift32(); + /* begin genLowcodeLeftShift32 */ + topRegistersMask14 = 0; + rTop20 = (rNext15 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext15 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1U << reg13; + } + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(topRegistersMask14); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1U << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext15 == NoReg)))); + shiftAmount = rTop20; + value10 = rNext15; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + /* begin LogicalShiftLeftR:R: */ + genoperandoperand(LogicalShiftLeftRR, shiftAmount, value10); + ssPushNativeRegister(value10); + return 0; case 88: - return genLowcodeLeftShift64(); + /* begin genLowcodeLeftShift64 */ + topRegistersMask15 = 0; + rTop21 = (rNext16 = NoReg); + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop21 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext16 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext16 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (rNext16 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1U << reg14; + } + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(topRegistersMask15); + } + if (rNext16 == NoReg) { + rNext16 = allocateRegNotConflictingWith(1U << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext16 == NoReg)))); + rResult8 = allocateFloatRegNotConflictingWith((1U << rTop21) | (1U << rNext16)); + assert(!((rResult8 == NoReg))); + shiftAmount1 = rTop21; + value11 = rNext16; + result4 = rResult8; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value11); + ssNativePop(1); + abort(); + return 0; case 89: - return genLowcodeLoadArgumentAddress(); + /* begin genLowcodeLoadArgumentAddress */ + baseOffset = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult9 = NoReg; + rResult9 = allocateRegNotConflictingWith(0); + assert(!((rResult9 == NoReg))); + pointer = rResult9; + + loadNativeArgumentAddressto(baseOffset, pointer); + ssPushNativeRegister(pointer); + extA = 0; + return 0; case 90: - return genLowcodeLoadArgumentFloat32(); + /* begin genLowcodeLoadArgumentFloat32 */ + baseOffset1 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult4 = NoReg; + frResult4 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult4 == NoReg))); + floatValue5 = frResult4; + + loadNativeArgumentAddressto(baseOffset1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue5); + ssPushNativeRegisterSingleFloat(floatValue5); + extA = 0; + return 0; case 91: - return genLowcodeLoadArgumentFloat64(); + /* begin genLowcodeLoadArgumentFloat64 */ + baseOffset2 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult5 = NoReg; + frResult5 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult5 == NoReg))); + doubleValue = frResult5; + + loadNativeArgumentAddressto(baseOffset2, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction21 = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); + ssPushNativeRegisterDoubleFloat(doubleValue); + extA = 0; + return 0; case 92: - return genLowcodeLoadArgumentInt16(); + /* begin genLowcodeLoadArgumentInt16 */ + baseOffset3 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult10 = NoReg; + rResult10 = allocateRegNotConflictingWith(0); + assert(!((rResult10 == NoReg))); + value12 = rResult10; + + loadNativeArgumentAddressto(baseOffset3, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value12); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value12, value12); + ssPushNativeRegister(value12); + extA = 0; + return 0; case 93: - return genLowcodeLoadArgumentInt32(); + /* begin genLowcodeLoadArgumentInt32 */ + baseOffset4 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult11 = NoReg; + rResult11 = allocateRegNotConflictingWith(0); + assert(!((rResult11 == NoReg))); + value13 = rResult11; + + loadNativeArgumentAddressto(baseOffset4, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value13); + ssPushNativeRegister(value13); + extA = 0; + return 0; case 94: - return genLowcodeLoadArgumentInt64(); + /* begin genLowcodeLoadArgumentInt64 */ + baseOffset20 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult29 = (rResult210 = NoReg); + rResult29 = allocateRegNotConflictingWith(0); + rResult210 = allocateRegNotConflictingWith(1U << rResult29); + assert(!(((rResult29 == NoReg) + || (rResult210 == NoReg)))); + valueLow4 = rResult29; + valueHigh4 = rResult210; + + loadNativeArgumentAddressto(baseOffset20, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow4); + /* begin checkQuickConstant:forInstruction: */ + anInstruction110 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh4); + ssPushNativeRegistersecondRegister(valueLow4, valueHigh4); + + extA = 0; + return 0; case 95: - return genLowcodeLoadArgumentInt8(); + /* begin genLowcodeLoadArgumentInt8 */ + baseOffset5 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult12 = NoReg; + rResult12 = allocateRegNotConflictingWith(0); + assert(!((rResult12 == NoReg))); + value14 = rResult12; + + loadNativeArgumentAddressto(baseOffset5, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value14); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value14, value14); + ssPushNativeRegister(value14); + extA = 0; + return 0; case 96: - return genLowcodeLoadArgumentPointer(); + /* begin genLowcodeLoadArgumentPointer */ + baseOffset6 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult13 = NoReg; + rResult13 = allocateRegNotConflictingWith(0); + assert(!((rResult13 == NoReg))); + pointerResult = rResult13; + + loadNativeArgumentAddressto(baseOffset6, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction27 = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); + ssPushNativeRegister(pointerResult); + extA = 0; + return 0; case 97: - return genLowcodeLoadArgumentUInt16(); + /* begin genLowcodeLoadArgumentUInt16 */ + baseOffset7 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult14 = NoReg; + rResult14 = allocateRegNotConflictingWith(0); + assert(!((rResult14 == NoReg))); + value15 = rResult14; + + loadNativeArgumentAddressto(baseOffset7, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction28 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value15); + ssPushNativeRegister(value15); + extA = 0; + return 0; case 98: - return genLowcodeLoadArgumentUInt32(); + /* begin genLowcodeLoadArgumentUInt32 */ + baseOffset8 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult15 = NoReg; + rResult15 = allocateRegNotConflictingWith(0); + assert(!((rResult15 == NoReg))); + value16 = rResult15; + + loadNativeArgumentAddressto(baseOffset8, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value16); + ssPushNativeRegister(value16); + extA = 0; + return 0; case 99: - return genLowcodeLoadArgumentUInt64(); + /* begin genLowcodeLoadArgumentUInt64 */ + baseOffset21 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult30 = (rResult211 = NoReg); + rResult30 = allocateRegNotConflictingWith(0); + rResult211 = allocateRegNotConflictingWith(1U << rResult30); + assert(!(((rResult30 == NoReg) + || (rResult211 == NoReg)))); + valueLow5 = rResult30; + valueHigh5 = rResult211; + + loadNativeArgumentAddressto(baseOffset21, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction30 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow5); + /* begin checkQuickConstant:forInstruction: */ + anInstruction111 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh5); + ssPushNativeRegistersecondRegister(valueLow5, valueHigh5); + + extA = 0; + return 0; case 100: - return genLowcodeLoadArgumentUInt8(); + /* begin genLowcodeLoadArgumentUInt8 */ + baseOffset9 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult16 = NoReg; + rResult16 = allocateRegNotConflictingWith(0); + assert(!((rResult16 == NoReg))); + value17 = rResult16; + + loadNativeArgumentAddressto(baseOffset9, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value17); + ssPushNativeRegister(value17); + extA = 0; + return 0; case 101: - return genLowcodeLoadFloat32FromMemory(); + /* begin genLowcodeLoadFloat32FromMemory */ + rTop22 = NoReg; + frResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop22 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(0); + } + frResult6 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop22 == NoReg) + || (frResult6 == NoReg)))); + pointer1 = rTop22; + value18 = frResult6; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperandoperand(MoveM32rRs, 0, pointer1, value18); + ssPushNativeRegisterSingleFloat(value18); + return 0; case 102: - return genLowcodeLoadFloat64FromMemory(); + /* begin genLowcodeLoadFloat64FromMemory */ + rTop23 = NoReg; + frResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop23 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop23 == NoReg) { + rTop23 = allocateRegNotConflictingWith(0); + } + frResult7 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop23 == NoReg) + || (frResult7 == NoReg)))); + pointer2 = rTop23; + value19 = frResult7; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction33 = genoperandoperandoperand(MoveM64rRd, 0, pointer2, value19); + ssPushNativeRegisterDoubleFloat(value19); + return 0; case 103: - return genLowcodeLoadInt16FromMemory(); + /* begin genLowcodeLoadInt16FromMemory */ + rTop24 = NoReg; + rResult17 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop24 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(1U << rTop24); + assert(!(((rTop24 == NoReg) + || (rResult17 == NoReg)))); + pointer3 = rTop24; + value20 = rResult17; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction34 = genoperandoperandoperand(MoveM16rR, 0, pointer3, value20); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value20, value20); + ssPushNativeRegister(value20); + return 0; case 104: - return genLowcodeLoadInt32FromMemory(); + /* begin genLowcodeLoadInt32FromMemory */ + rTop25 = NoReg; + rResult18 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop25 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + rResult18 = allocateRegNotConflictingWith(1U << rTop25); + assert(!(((rTop25 == NoReg) + || (rResult18 == NoReg)))); + pointer4 = rTop25; + value21 = rResult18; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction35 = genoperandoperandoperand(MoveM32rR, 0, pointer4, value21); + ssPushNativeRegister(value21); + return 0; case 105: - return genLowcodeLoadInt64FromMemory(); + /* begin genLowcodeLoadInt64FromMemory */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop30 = NoReg; + rResult31 = (rResult31 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop30 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop30 == NoReg) { + rTop30 = allocateRegNotConflictingWith(0); + } + rResult31 = allocateRegNotConflictingWith(1U << rTop30); + rResult212 = allocateRegNotConflictingWith((1U << rTop30) | (1U << rResult31)); + assert(!(((rTop30 == NoReg) + || ((rResult31 == NoReg) + || (rResult212 == NoReg))))); + pointer8 = rTop30; + valueLow6 = rResult31; + valueHigh6 = rResult212; + + nativePopToReg(ssNativeTop(), pointer8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction36 = genoperandoperandoperand(MoveM32rR, 0, pointer8, valueLow6); + /* begin checkQuickConstant:forInstruction: */ + anInstruction112 = genoperandoperandoperand(MoveM32rR, 4, pointer8, valueHigh6); + ssPushNativeRegistersecondRegister(valueLow6, valueHigh6); + + return 0; case 106: - return genLowcodeLoadInt8FromMemory(); + /* begin genLowcodeLoadInt8FromMemory */ + rTop26 = NoReg; + rResult19 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop26 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(0); + } + rResult19 = allocateRegNotConflictingWith(1U << rTop26); + assert(!(((rTop26 == NoReg) + || (rResult19 == NoReg)))); + pointer5 = rTop26; + value22 = rResult19; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction37 = genoperandoperandoperand(MoveM8rR, 0, pointer5, value22); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value22, value22); + ssPushNativeRegister(value22); + return 0; case 107: - return genLowcodeLoadLocalAddress(); + /* begin genLowcodeLoadLocalAddress */ + baseOffset10 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult20 = NoReg; + rResult20 = allocateRegNotConflictingWith(0); + assert(!((rResult20 == NoReg))); + pointer6 = rResult20; + + loadNativeLocalAddressto(baseOffset10, pointer6); + ssPushNativeRegister(pointer6); + extA = 0; + return 0; case 108: - return genLowcodeLoadLocalFloat32(); + /* begin genLowcodeLoadLocalFloat32 */ + baseOffset11 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult8 = NoReg; + frResult8 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult8 == NoReg))); + floatValue6 = frResult8; + + loadNativeLocalAddressto(baseOffset11, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction38 = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue6); + ssPushNativeRegisterSingleFloat(floatValue6); + extA = 0; + return 0; case 109: - return genLowcodeLoadLocalFloat64(); + /* begin genLowcodeLoadLocalFloat64 */ + baseOffset12 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult9 = NoReg; + frResult9 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult9 == NoReg))); + doubleValue1 = frResult9; + + loadNativeLocalAddressto(baseOffset12, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction39 = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue1); + ssPushNativeRegisterDoubleFloat(doubleValue1); + extA = 0; + return 0; case 110: - return genLowcodeLoadLocalInt16(); + /* begin genLowcodeLoadLocalInt16 */ + baseOffset13 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult21 = NoReg; + rResult21 = allocateRegNotConflictingWith(0); + assert(!((rResult21 == NoReg))); + value23 = rResult21; + + loadNativeLocalAddressto(baseOffset13, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction40 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value23); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value23, value23); + ssPushNativeRegister(value23); + extA = 0; + return 0; case 111: - return genLowcodeLoadLocalInt32(); + /* begin genLowcodeLoadLocalInt32 */ + baseOffset14 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult22 = NoReg; + rResult22 = allocateRegNotConflictingWith(0); + assert(!((rResult22 == NoReg))); + value24 = rResult22; + + loadNativeLocalAddressto(baseOffset14, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction41 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value24); + ssPushNativeRegister(value24); + extA = 0; + return 0; case 112: - return genLowcodeLoadLocalInt64(); + /* begin genLowcodeLoadLocalInt64 */ + baseOffset22 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult32 = (rResult213 = NoReg); + rResult32 = allocateRegNotConflictingWith(0); + rResult213 = allocateRegNotConflictingWith(1U << rResult32); + assert(!(((rResult32 == NoReg) + || (rResult213 == NoReg)))); + valueLow7 = rResult32; + valueHigh7 = rResult213; + + loadNativeLocalAddressto(baseOffset22, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction42 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow7); + /* begin checkQuickConstant:forInstruction: */ + anInstruction113 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh7); + ssPushNativeRegistersecondRegister(valueLow7, valueHigh7); + + extA = 0; + return 0; case 113: - return genLowcodeLoadLocalInt8(); + /* begin genLowcodeLoadLocalInt8 */ + baseOffset15 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult23 = NoReg; + rResult23 = allocateRegNotConflictingWith(0); + assert(!((rResult23 == NoReg))); + value25 = rResult23; + + loadNativeLocalAddressto(baseOffset15, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction43 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value25); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value25, value25); + ssPushNativeRegister(value25); + extA = 0; + return 0; case 114: - return genLowcodeLoadLocalPointer(); + /* begin genLowcodeLoadLocalPointer */ + baseOffset16 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult24 = NoReg; + rResult24 = allocateRegNotConflictingWith(0); + assert(!((rResult24 == NoReg))); + pointerResult1 = rResult24; + + loadNativeLocalAddressto(baseOffset16, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction44 = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult1); + ssPushNativeRegister(pointerResult1); + extA = 0; + return 0; case 115: - return genLowcodeLoadLocalUInt16(); + /* begin genLowcodeLoadLocalUInt16 */ + baseOffset17 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult25 = NoReg; + rResult25 = allocateRegNotConflictingWith(0); + assert(!((rResult25 == NoReg))); + value26 = rResult25; + + loadNativeLocalAddressto(baseOffset17, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction45 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value26); + ssPushNativeRegister(value26); + extA = 0; + return 0; case 116: - return genLowcodeLoadLocalUInt32(); + /* begin genLowcodeLoadLocalUInt32 */ + baseOffset18 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult26 = NoReg; + rResult26 = allocateRegNotConflictingWith(0); + assert(!((rResult26 == NoReg))); + value27 = rResult26; + + loadNativeLocalAddressto(baseOffset18, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction46 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value27); + ssPushNativeRegister(value27); + extA = 0; + return 0; case 117: - return genLowcodeLoadLocalUInt64(); + /* begin genLowcodeLoadLocalUInt64 */ + baseOffset23 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult33 = (rResult214 = NoReg); + rResult33 = allocateRegNotConflictingWith(0); + rResult214 = allocateRegNotConflictingWith(1U << rResult33); + assert(!(((rResult33 == NoReg) + || (rResult214 == NoReg)))); + valueLow8 = rResult33; + valueHigh8 = rResult214; + + loadNativeLocalAddressto(baseOffset23, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction47 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow8); + /* begin checkQuickConstant:forInstruction: */ + anInstruction114 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh8); + ssPushNativeRegistersecondRegister(valueLow8, valueHigh8); + + extA = 0; + return 0; case 118: - return genLowcodeLoadLocalUInt8(); + /* begin genLowcodeLoadLocalUInt8 */ + baseOffset19 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult27 = NoReg; + rResult27 = allocateRegNotConflictingWith(0); + assert(!((rResult27 == NoReg))); + value28 = rResult27; + + loadNativeLocalAddressto(baseOffset19, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction48 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value28); + ssPushNativeRegister(value28); + extA = 0; + return 0; case 119: - return genLowcodeLoadObjectAt(); + /* begin genLowcodeLoadObjectAt */ + rTop27 = (rOopTop = NoReg); + topRegisterMask = 0; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask = 1U << rOopTop; + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(topRegisterMask); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(1U << rTop27); + } + assert(!(((rTop27 == NoReg) + || (rOopTop == NoReg)))); + fieldIndex = rTop27; + object = rOopTop; + + nativePopToReg(ssNativeTop(), fieldIndex); + ssNativePop(1); + popToReg(ssTop(), object); + ssPop(1); + genLcLoadObjectat(object, fieldIndex); + return 0; default: return genLowcodeUnaryInlinePrimitive3(prim); @@ -36927,187 +31712,1605 @@ genLowcodeUnaryInlinePrimitive2(sqInt prim) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive3(sqInt prim) { + AbstractInstruction *abstractInstruction; + AbstractInstruction *abstractInstruction1; + AbstractInstruction *abstractInstruction11; + AbstractInstruction *abstractInstruction2; + AbstractInstruction *abstractInstruction3; + AbstractInstruction *abstractInstruction4; + sqInt address; + sqInt address1; + sqInt alignedSize; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction41; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt base; + sqInt base1; + sqInt base2; + sqInt baseValue; + sqInt baseValue1; + sqInt baseValue2; + sqInt constant; + sqInt constant1; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + sqInt dest; + sqInt dest1; + sqInt dest2; + sqInt destValue; + sqInt destValue1; + sqInt destValue2; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + sqInt fieldIndex; + sqInt first; + sqInt first1; + sqInt first2; + sqInt first4; + sqInt first5; + sqInt firstHigh1; + sqInt firstHighValue; + sqInt firstLow1; + sqInt firstLowValue; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue2; + sqInt firstValue4; + sqInt firstValue5; + sqInt frTop; + sqInt frTop1; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt nativeValueIndex2; + sqInt nativeValueIndex3; + sqInt object; + sqInt objectValue; + sqInt offset; + sqInt offset1; + sqInt offset11; + sqInt offset21; + sqInt offset3; + sqInt offset4; + sqInt offsetHigh; + sqInt offsetHighValue; + sqInt offsetLow; + sqInt offsetLowValue; + sqInt offsetValue; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointer6; + sqInt pointer7; + sqInt pointer8; + sqInt pointerResult; + sqInt pointerResultValue; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValue8; + sqInt pointerValue9; + sqInt pointerValueValue; + sqInt quickConstant; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg11; + sqInt reg111; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg2; + sqInt reg3; + sqInt reg4; + sqInt reg6; + sqInt reg8; + sqInt reg9; + sqInt registerID; + sqInt registerID1; + sqInt registerID2; + sqInt registerID3; + sqInt registerID4; + sqInt registerMask; + sqInt registerMask1; + sqInt registerMask2; + sqInt registerMask3; + sqInt result; + sqInt result1; + sqInt resultHigh1; + sqInt resultHighValue; + sqInt resultLow1; + sqInt resultLowValue; + sqInt resultValue; + sqInt resultValue1; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext2; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNext2; + sqInt rNextNext3; + sqInt rNextNextNext; + sqInt rOopTop; + sqInt rResult; + sqInt rResult1; + sqInt rResult2; + sqInt rResult21; + sqInt rResult22; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop13; + sqInt rTop15; + sqInt rTop16; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop31; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt second; + sqInt second1; + sqInt second2; + sqInt second4; + sqInt second5; + sqInt secondHigh1; + sqInt secondHighValue; + sqInt secondLow1; + sqInt secondLowValue; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue2; + sqInt secondValue4; + sqInt secondValue5; + sqInt size; + sqInt size1; + sqInt size3; + sqInt size4; + sqInt size5; + sqInt sizeHigh; + sqInt sizeHighValue; + sqInt sizeLow; + sqInt sizeLow1; + sqInt sizeLowValue; + sqInt sizeValue; + sqInt sizeValue2; + sqInt sizeValue3; + sqInt source; + sqInt source1; + sqInt source2; + sqInt sourceValue; + sqInt sourceValue1; + sqInt sourceValue2; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask13; + sqInt topRegistersMask2; + sqInt topRegistersMask3; + sqInt topRegistersMask4; + sqInt topRegistersMask6; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value2; + sqInt value3; + sqInt value5; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueHigh; + sqInt valueHigh1; + sqInt valueHigh3; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueLow; + sqInt valueLow1; + sqInt valueLow3; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue2; + sqInt valueValue3; + sqInt valueValue5; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + + sizeLow1 = 0; switch (prim) { case 120: - return genLowcodeLoadObjectField(); + /* begin genLowcodeLoadObjectField */ + fieldIndex = extA; + /* begin allocateRegistersForLowcodeOop: */ + rOopTop = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop == NoReg))); + object = rOopTop; + + popToReg(ssTop(), object); + ssPop(1); + genLcLoadObjectfield(object, fieldIndex); + extA = 0; + return 0; case 121: - return genLowcodeLoadPointerFromMemory(); + /* begin genLowcodeLoadPointerFromMemory */ + rTop = NoReg; + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rTop); + assert(!(((rTop == NoReg) + || (rResult == NoReg)))); + pointer = rTop; + pointerResult = rResult; + + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperandoperand(MoveMwrR, 0, pointer, pointerResult); + ssPushNativeRegister(pointerResult); + return 0; case 122: - return genLowcodeLoadUInt16FromMemory(); + /* begin genLowcodeLoadUInt16FromMemory */ + rTop1 = NoReg; + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop1 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1U << rTop1); + assert(!(((rTop1 == NoReg) + || (rResult1 == NoReg)))); + pointer1 = rTop1; + value = rResult1; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperandoperand(MoveM16rR, 0, pointer1, value); + ssPushNativeRegister(value); + return 0; case 123: - return genLowcodeLoadUInt32FromMemory(); + /* begin genLowcodeLoadUInt32FromMemory */ + rTop2 = NoReg; + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop2 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(1U << rTop2); + assert(!(((rTop2 == NoReg) + || (rResult2 == NoReg)))); + pointer2 = rTop2; + value1 = rResult2; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperandoperand(MoveM32rR, 0, pointer2, value1); + ssPushNativeRegister(value1); + return 0; case 0x7C: - return genLowcodeLoadUInt64FromMemory(); + /* begin genLowcodeLoadUInt64FromMemory */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop26 = NoReg; + rResult7 = (rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop26 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(0); + } + rResult7 = allocateRegNotConflictingWith(1U << rTop26); + rResult22 = allocateRegNotConflictingWith((1U << rTop26) | (1U << rResult7)); + assert(!(((rTop26 == NoReg) + || ((rResult7 == NoReg) + || (rResult22 == NoReg))))); + pointer6 = rTop26; + valueLow3 = rResult7; + valueHigh3 = rResult22; + + nativePopToReg(ssNativeTop(), pointer6); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperandoperand(MoveM32rR, 0, pointer6, valueLow3); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperandoperand(MoveM32rR, 4, pointer6, valueHigh3); + ssPushNativeRegistersecondRegister(valueLow3, valueHigh3); + + return 0; case 125: - return genLowcodeLoadUInt8FromMemory(); + /* begin genLowcodeLoadUInt8FromMemory */ + rTop3 = NoReg; + rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop3 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rTop3); + assert(!(((rTop3 == NoReg) + || (rResult3 == NoReg)))); + pointer3 = rTop3; + value2 = rResult3; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperandoperand(MoveM8rR, 0, pointer3, value2); + ssPushNativeRegister(value2); + return 0; case 0x7E: - return genLowcodeLocalFrameSize(); + /* begin genLowcodeLocalFrameSize */ + size = extA; + assert(needsFrame); + + /* Align the size to 16 bytes. */ + hasNativeFrame = 1; + + /* Mark the stack frame */ + alignedSize = (size + 15) & -16; + annotateobjRef(gMoveCwR(splObj(LowcodeContextMark), TempReg), splObj(LowcodeContextMark)); + /* begin MoveR:Mw:r: */ + offset4 = frameOffsetOfNativeFrameMark(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperandoperand(MoveRMwr, TempReg, offset4, FPReg); + /* begin MoveAw:R: */ + address = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction12 = genoperandoperand(MoveAwR, address, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperand(AddCqR, 1, TempReg); + /* begin MoveR:Mw:r: */ + offset11 = frameOffsetOfPreviousNativeStackPointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperandoperand(MoveRMwr, TempReg, offset11, FPReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction41 = genoperandoperand(SubCqR, alignedSize, TempReg); + /* begin MoveR:Mw:r: */ + offset21 = frameOffsetOfNativeFramePointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperandoperand(MoveRMwr, TempReg, offset21, FPReg); + /* begin MoveR:Mw:r: */ + offset3 = frameOffsetOfNativeStackPointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperandoperand(MoveRMwr, TempReg, offset3, FPReg); + /* begin SubCq:R: */ + quickConstant = 1 + (defaultNativeStackFrameSize()); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperand(SubCqR, quickConstant, TempReg); + /* begin MoveR:Aw: */ + address1 = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction8 = genoperandoperand(MoveRAw, TempReg, address1); + extA = 0; + return 0; case 0x7F: - return genLowcodeLockRegisters(); + /* begin genLowcodeLockRegisters */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + return 0; case 128: - return genLowcodeLockVM(); + /* begin genLowcodeLockVM */ + abort(); + return 0; case 129: - return genLowcodeMalloc32(); + /* begin genLowcodeMalloc32 */ + rTop27 = NoReg; + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop27 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(0); + } + rResult8 = allocateRegNotConflictingWith(1U << rTop27); + assert(!(((rTop27 == NoReg) + || (rResult8 == NoReg)))); + size1 = rTop27; + pointer7 = rResult8; + + nativePopToReg(ssNativeTop(), size1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (size1 != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, size1, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction3 = genoperand(Call, ceMallocTrampoline); + (abstractInstruction3->annotation = IsRelativeCall); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, pointer7); + ssPushNativeRegister(pointer7); + return 0; case 130: - return genLowcodeMalloc64(); + /* begin genLowcodeMalloc64 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger: */ + topRegistersMask12 = 0; + rTop28 = (rNext10 = NoReg); + rResult9 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop28 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1U << reg10; + } + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(topRegistersMask12); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop28); + } + assert(!(((rTop28 == NoReg) + || (rNext10 == NoReg)))); + rResult9 = allocateFloatRegNotConflictingWith((1U << rTop28) | (1U << rNext10)); + assert(!((rResult9 == NoReg))); + sizeLow = rTop28; + sizeHigh = rNext10; + pointer8 = rResult9; + + nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (sizeLow != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, sizeLow, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction4 = genoperand(Call, ceMallocTrampoline); + (abstractInstruction4->annotation = IsRelativeCall); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, pointer8); + ssPushNativeRegister(pointer8); + + return 0; case 131: - return genLowcodeMemcpy32(); + /* begin genLowcodeMemcpy32 */ + rTop29 = (rNext13 = (rNextNext2 = NoReg)); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext13 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + } + if (rTop29 == NoReg) { + registerMask2 = 0; + if (rNext13 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rNext13; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rTop29 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext13 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rTop29; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rNext13 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1U << rTop29) | (1U << rNext13); + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop29 == NoReg) + || ((rNext13 == NoReg) + || (rNextNext2 == NoReg))))); + size3 = rTop29; + source = rNext13; + dest = rNextNext2; + + nativePopToReg(ssNativeTop(), size3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), source); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytosize(backEnd, source, dest, size3); + return 0; case 132: - return genLowcodeMemcpy64(); + /* begin genLowcodeMemcpy64 */ + rTop30 = (rNext14 = (rNextNext3 = NoReg)); + nativeValueIndex3 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop30 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNext14 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + } + } + if (rTop30 == NoReg) { + registerMask3 = 0; + if (rNext14 != NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rNext14; + } + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + rTop30 = allocateRegNotConflictingWith(registerMask3); + } + if (rNext14 == NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rTop30; + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + rNext14 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNext3 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask3 = (1U << rTop30) | (1U << rNext14); + rNextNext3 = allocateRegNotConflictingWith(registerMask3); + } + assert(!(((rTop30 == NoReg) + || ((rNext14 == NoReg) + || (rNextNext3 == NoReg))))); + size4 = rTop30; + source1 = rNext14; + dest1 = rNextNext3; + + nativePopToReg(ssNativeTop(), size4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), source1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytosize(backEnd, source1, dest1, sizeLow1); + return 0; case 133: - return genLowcodeMemcpyFixed(); + /* begin genLowcodeMemcpyFixed */ + size5 = extA; + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask13 = 0; + rTop31 = (rNext15 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop31 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext15 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1U << reg15; + } + } + if (rTop31 == NoReg) { + rTop31 = allocateRegNotConflictingWith(topRegistersMask13); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1U << rTop31); + } + assert(!(((rTop31 == NoReg) + || (rNext15 == NoReg)))); + source2 = rTop31; + dest2 = rNext15; + + nativePopToReg(ssNativeTop(), source2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest2); + ssNativePop(1); + if (size5 == BytesPerWord) { + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperandoperand(MoveMwrR, 0, source2, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperandoperand(MoveRMwr, TempReg, 0, dest2); + } + else { + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytoconstantSize(backEnd, source2, dest2, size5); + } + extA = 0; + return 0; case 134: - return genLowcodeMoveFloat32ToPhysical(); + /* begin genLowcodeMoveFloat32ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 135: - return genLowcodeMoveFloat64ToPhysical(); + /* begin genLowcodeMoveFloat64ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += 8; + extA = 0; + return 0; case 136: - return genLowcodeMoveInt32ToPhysical(); + /* begin genLowcodeMoveInt32ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 137: - return genLowcodeMoveInt64ToPhysical(); + /* begin genLowcodeMoveInt64ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += 8; + extA = 0; + return 0; case 138: - return genLowcodeMovePointerToPhysical(); + /* begin genLowcodeMovePointerToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 139: - return genLowcodeMul32(); + /* begin genLowcodeMul32 */ + topRegistersMask = 0; + rTop4 = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext == NoReg)))); + second = rTop4; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, second, first); + ssPushNativeRegister(first); + return 0; case 140: - return genLowcodeMul64(); + /* begin genLowcodeMul64 */ + topRegistersMask1 = 0; + rTop5 = (rNext1 = NoReg); + rResult4 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop5 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext1 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg1; + } + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop5); + } + assert(!(((rTop5 == NoReg) + || (rNext1 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop5) | (1U << rNext1)); + assert(!((rResult4 == NoReg))); + second1 = rTop5; + first1 = rNext1; + result = rResult4; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + abort(); + return 0; case 141: - return genLowcodeNeg32(); + /* begin genLowcodeNeg32 */ + rTop6 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + assert(!((rTop6 == NoReg))); + value3 = rTop6; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin NegateR: */ + genoperand(NegateR, value3); + ssPushNativeRegister(value3); + return 0; case 142: - return genLowcodeNeg64(); + /* begin genLowcodeNeg64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask2 = 0; + rTop7 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop7 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop7); + } + assert(!(((rTop7 == NoReg) + || (rNext2 == NoReg)))); + valueLow = rTop7; + valueHigh = rNext2; + + nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, valueLow); + /* begin NotR: */ + genoperand(NotR, valueHigh); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperand(AddCqR, 1, valueLow); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperand(AddcCqR, 0, valueHigh); + ssPushNativeRegistersecondRegister(valueLow, valueHigh); + + return 0; case 143: - return genLowcodeNot32(); + /* begin genLowcodeNot32 */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value5 = rTop8; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, value5); + ssPushNativeRegister(value5); + return 0; case 144: - return genLowcodeNot64(); + /* begin genLowcodeNot64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask3 = 0; + rTop9 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg3; + } + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop9); + } + assert(!(((rTop9 == NoReg) + || (rNext3 == NoReg)))); + valueLow1 = rTop9; + valueHigh1 = rNext3; + + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, valueLow1); + /* begin NotR: */ + genoperand(NotR, valueHigh1); + ssPushNativeRegistersecondRegister(valueLow1, valueHigh1); + + return 0; case 145: - return genLowcodeOr32(); + /* begin genLowcodeOr32 */ + topRegistersMask4 = 0; + rTop10 = (rNext4 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext4 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1U << reg4; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext4 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop10) | (1U << rNext4)); + assert(!((rResult5 == NoReg))); + second2 = rTop10; + first2 = rNext4; + result1 = rResult5; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 146: - return genLowcodeOr64(); + /* begin genLowcodeOr64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop13 = (rNext5 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop13 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext5 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop13 == NoReg) { + registerMask = 0; + if (rNext5 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext5; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop13 = allocateRegNotConflictingWith(registerMask); + } + if (rNext5 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop13; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext5 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop13) | (1U << rNext5); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop13) | (1U << rNext5)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop13 == NoReg) + || ((rNext5 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow1 = rTop13; + secondHigh1 = rNext5; + firstLow1 = rNextNext; + firstHigh1 = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow1, secondHigh1); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow1, firstHigh1); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, secondLow1, firstLow1); + /* begin OrR:R: */ + genoperandoperand(OrRR, secondHigh1, firstHigh1); + ssPushNativeRegistersecondRegister(firstLow1, firstHigh1); + + return 0; case 147: - return genLowcodePerformCallout(); + /* begin genLowcodePerformCallout */ + callSwitchToCStack(); + /* begin checkLiteral:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCwR, extA, TempReg); + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + /* begin annotateBytecode: */ + abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); + (abstractInstruction1->annotation = HasBytecodePC); + extA = 0; + return 0; case 148: - return genLowcodePerformCalloutIndirect(); + /* begin genLowcodePerformCalloutIndirect */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + callSwitchToCStack(); + /* begin CallRT: */ + abstractInstruction2 = genoperand(Call, ceFFICalloutTrampoline); + (abstractInstruction2->annotation = IsRelativeCall); + /* begin annotateBytecode: */ + abstractInstruction11 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); + (abstractInstruction11->annotation = HasBytecodePC); + return 0; case 149: - return genLowcodePushCalloutResultFloat32(); + /* begin genLowcodePushCalloutResultFloat32 */ + cFloatResultToRs(backEnd, DPFPReg0); + ssPushNativeRegisterSingleFloat(DPFPReg0); + return 0; case 150: - return genLowcodePushCalloutResultFloat64(); + /* begin genLowcodePushCalloutResultFloat64 */ + cFloatResultToRd(backEnd, DPFPReg0); + ssPushNativeRegisterDoubleFloat(DPFPReg0); + return 0; case 151: - return genLowcodePushCalloutResultInt32(); + /* begin genLowcodePushCalloutResultInt32 */ + reg11 = EAX; + genoperandoperand(MoveRR, reg11, ReceiverResultReg); + ssPushNativeRegister(ReceiverResultReg); + return 0; case 152: - return genLowcodePushCalloutResultInt64(); + /* begin genLowcodePushCalloutResultInt64 */ + /* begin MoveR:R: */ + reg13 = EAX; + genoperandoperand(MoveRR, reg13, ReceiverResultReg); + /* begin MoveR:R: */ + reg111 = EDX; + genoperandoperand(MoveRR, reg111, Arg0Reg); + ssPushNativeRegistersecondRegister(ReceiverResultReg, Arg0Reg); + + return 0; case 153: - return genLowcodePushCalloutResultPointer(); + /* begin genLowcodePushCalloutResultPointer */ + reg14 = EAX; + genoperandoperand(MoveRR, reg14, ReceiverResultReg); + ssPushNativeRegister(ReceiverResultReg); + return 0; case 161: - return genLowcodePlaftormCode(); + /* begin genLowcodePlaftormCode */ + abort(); + return 0; case 162: - return genLowcodePointerAddConstantOffset(); + /* begin genLowcodePointerAddConstantOffset */ + offset = extB; + /* begin allocateRegistersForLowcodeInteger: */ + rTop15 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(0); + } + assert(!((rTop15 == NoReg))); + base = rTop15; + + nativePopToReg(ssNativeTop(), base); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(AddCqR, offset, base); + ssPushNativeRegister(base); + extB = 0; + numExtB = 0; + return 0; case 163: - return genLowcodePointerAddOffset32(); + /* begin genLowcodePointerAddOffset32 */ + topRegistersMask6 = 0; + rTop16 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop16 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg6; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1U << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext6 == NoReg)))); + offset1 = rTop16; + base1 = rNext6; + + nativePopToReg(ssNativeTop(), offset1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base1); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, offset1, base1); + ssPushNativeRegister(base1); + return 0; case 164: - return genLowcodePointerAddOffset64(); + /* begin genLowcodePointerAddOffset64 */ + /* begin allocateRegistersForLowcodeInteger3: */ + rTop18 = (rNext7 = (rNextNext1 = NoReg)); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext7 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext7 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + } + if (rTop18 == NoReg) { + registerMask1 = 0; + if (rNext7 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext7; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rTop18 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext7 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop18; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rNext7 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop18) | (1U << rNext7); + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop18 == NoReg) + || ((rNext7 == NoReg) + || (rNextNext1 == NoReg))))); + offsetLow = rTop18; + offsetHigh = rNext7; + base2 = rNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), offsetLow, offsetHigh); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base2); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, offsetLow, base2); + ssPushNativeRegister(base2); + + return 0; case 165: - return genLowcodePointerEqual(); + /* begin genLowcodePointerEqual */ + topRegistersMask8 = 0; + rTop19 = (rNext8 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg8; + } + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1U << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext8 == NoReg)))); + second4 = rTop19; + first4 = rNext8; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second4, first4); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperand(MoveCqR, 1, first4); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperand(MoveCqR, 0, first4); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first4); + return 0; case 166: - return genLowcodePointerNotEqual(); + /* begin genLowcodePointerNotEqual */ + topRegistersMask9 = 0; + rTop20 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1U << reg9; + } + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext9 == NoReg)))); + second5 = rTop20; + first5 = rNext9; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second5, first5); + /* begin JumpZero: */ + falseJump1 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperand(MoveCqR, 1, first5); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperand(MoveCqR, 0, first5); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first5); + return 0; case 167: - return genLowcodePointerToInt32(); + /* begin genLowcodePointerToInt32 */ + rTop21 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(0); + } + assert(!((rTop21 == NoReg))); + pointer4 = rTop21; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + ssPushNativeRegister(pointer4); + return 0; case 168: - return genLowcodePointerToInt64(); + /* begin genLowcodePointerToInt64 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop22 = NoReg; + rResult6 = (rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop22 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(0); + } + rResult6 = allocateRegNotConflictingWith(1U << rTop22); + rResult21 = allocateRegNotConflictingWith((1U << rTop22) | (1U << rResult6)); + assert(!(((rTop22 == NoReg) + || ((rResult6 == NoReg) + || (rResult21 == NoReg))))); + pointer5 = rTop22; + resultLow1 = rResult6; + resultHigh1 = rResult21; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointer5, resultLow1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(MoveCqR, 0, resultHigh1); + ssPushNativeRegistersecondRegister(resultLow1, resultHigh1); + + return 0; case 169: - return genLowcodePopFloat32(); + /* begin genLowcodePopFloat32 */ + topRegistersMask10 = 0; + frTop = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + assert(!((frTop == NoReg))); + value7 = frTop; + + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + return 0; case 170: - return genLowcodePopFloat64(); + /* begin genLowcodePopFloat64 */ + topRegistersMask11 = 0; + frTop1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(topRegistersMask11); + } + assert(!((frTop1 == NoReg))); + value8 = frTop1; + + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + return 0; case 171: - return genLowcodePopInt32(); + /* begin genLowcodePopInt32 */ + rTop23 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop23 == NoReg) { + rTop23 = allocateRegNotConflictingWith(0); + } + assert(!((rTop23 == NoReg))); + value9 = rTop23; + + nativePopToReg(ssNativeTop(), value9); + ssNativePop(1); + return 0; case 172: - return genLowcodePopInt64(); + /* begin genLowcodePopInt64 */ + rTop24 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + assert(!((rTop24 == NoReg))); + value10 = rTop24; + + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + return 0; case 173: - return genLowcodePopMultipleNative(); + /* begin genLowcodePopMultipleNative */ + ssPopNativeSize(extA); + extA = 0; + return 0; case 174: - return genLowcodePopPointer(); + /* begin genLowcodePopPointer */ + rTop25 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + assert(!((rTop25 == NoReg))); + pointerValue6 = rTop25; + + nativePopToReg(ssNativeTop(), pointerValue6); + ssNativePop(1); + return 0; case 175: - return genLowcodePushConstantUInt32(); + /* begin genLowcodePushConstantUInt32 */ + constant = extA; + ssPushNativeConstantInt32(constant); + extA = 0; + return 0; case 176: - return genLowcodePushConstantUInt64(); + /* begin genLowcodePushConstantUInt64 */ + constant1 = extA; + ssPushNativeConstantInt64(constant1); + extA = 0; + return 0; case 177: - return genLowcodePushNullPointer(); + /* begin genLowcodePushNullPointer */ + ssPushNativeConstantPointer(0); + return 0; case 178: - return genLowcodePushOne32(); + /* begin genLowcodePushOne32 */ + ssPushNativeConstantInt32(1); + return 0; case 179: - return genLowcodePushOne64(); + /* begin genLowcodePushOne64 */ + ssPushNativeConstantInt64(1); + return 0; case 180: - return genLowcodePushOneFloat32(); + /* begin genLowcodePushOneFloat32 */ + ssPushNativeConstantFloat32(1.0); + return 0; case 181: - return genLowcodePushOneFloat64(); + /* begin genLowcodePushOneFloat64 */ + ssPushNativeConstantFloat64(1.0); + return 0; case 182: - return genLowcodePushPhysicalFloat32(); + /* begin genLowcodePushPhysicalFloat32 */ + registerID = extA; + abort(); + extA = 0; + return 0; case 183: - return genLowcodePushPhysicalFloat64(); + /* begin genLowcodePushPhysicalFloat64 */ + registerID1 = extA; + abort(); + extA = 0; + return 0; case 184: - return genLowcodePushPhysicalInt32(); + /* begin genLowcodePushPhysicalInt32 */ + registerID2 = extA; + abort(); + extA = 0; + return 0; case 185: - return genLowcodePushPhysicalInt64(); + /* begin genLowcodePushPhysicalInt64 */ + registerID3 = extA; + abort(); + extA = 0; + return 0; case 186: - return genLowcodePushPhysicalPointer(); + /* begin genLowcodePushPhysicalPointer */ + registerID4 = extA; + abort(); + extA = 0; + return 0; default: return genLowcodeUnaryInlinePrimitive4(prim); @@ -37123,187 +33326,2417 @@ genLowcodeUnaryInlinePrimitive3(sqInt prim) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive4(sqInt prim) { + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction25; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction33; + AbstractInstruction *anInstruction34; + AbstractInstruction *anInstruction35; + AbstractInstruction *anInstruction36; + AbstractInstruction *anInstruction37; + AbstractInstruction *anInstruction38; + AbstractInstruction *anInstruction39; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt baseOffset; + sqInt baseOffset1; + sqInt baseOffset2; + sqInt baseOffset3; + sqInt baseOffset4; + sqInt baseOffset5; + sqInt baseOffset6; + AbstractInstruction * cont; + AbstractInstruction * cont1; + AbstractInstruction * cont2; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + sqInt doubleValue; + sqInt doubleValueValue; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump3; + sqInt first; + sqInt first1; + sqInt first10; + sqInt first11; + sqInt first12; + sqInt first13; + sqInt first14; + sqInt first15; + sqInt first16; + sqInt first17; + sqInt first18; + sqInt first2; + sqInt first4; + sqInt first5; + sqInt first6; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstHigh1; + sqInt firstHigh9; + sqInt firstHighValue; + sqInt firstHighValue1; + sqInt firstLow1; + sqInt firstLow9; + sqInt firstLowValue; + sqInt firstLowValue1; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue10; + sqInt firstValue11; + sqInt firstValue12; + sqInt firstValue13; + sqInt firstValue14; + sqInt firstValue15; + sqInt firstValue16; + sqInt firstValue17; + sqInt firstValue18; + sqInt firstValue2; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue6; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt floatValue; + sqInt floatValueValue; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frTop; + sqInt frTop1; + sqInt frTop2; + sqInt frTop3; + AbstractInstruction * isNegative; + AbstractInstruction * isNegative1; + AbstractInstruction * isNegative2; + sqInt memoryPointer; + sqInt memoryPointerValue; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt nativeValueIndex2; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValueValue; + sqInt pointerValueValue1; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg16; + sqInt reg17; + sqInt reg18; + sqInt reg19; + sqInt reg2; + sqInt reg20; + sqInt reg21; + sqInt reg22; + sqInt reg23; + sqInt reg24; + sqInt reg25; + sqInt reg26; + sqInt reg28; + sqInt reg29; + sqInt reg3; + sqInt reg30; + sqInt reg31; + sqInt reg33; + sqInt reg4; + sqInt reg5; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerMask; + sqInt registerMask1; + sqInt registerMask2; + sqInt result; + sqInt result1; + sqInt result10; + sqInt result11; + sqInt result4; + sqInt result5; + sqInt result6; + sqInt result7; + sqInt result8; + sqInt result9; + sqInt resultHigh2; + sqInt resultHigh3; + sqInt resultHighValue; + sqInt resultHighValue1; + sqInt resultLow2; + sqInt resultLow3; + sqInt resultLowValue; + sqInt resultLowValue1; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue10; + sqInt resultValue11; + sqInt resultValue4; + sqInt resultValue5; + sqInt resultValue6; + sqInt resultValue7; + sqInt resultValue8; + sqInt resultValue9; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext11; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext17; + sqInt rNext18; + sqInt rNext19; + sqInt rNext2; + sqInt rNext20; + sqInt rNext21; + sqInt rNext22; + sqInt rNext23; + sqInt rNext24; + sqInt rNext25; + sqInt rNext26; + sqInt rNext27; + sqInt rNext28; + sqInt rNext29; + sqInt rNext3; + sqInt rNext30; + sqInt rNext31; + sqInt rNext32; + sqInt rNext33; + sqInt rNext34; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNext2; + sqInt rNextNextNext; + sqInt rNextNextNext1; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult14; + sqInt rResult15; + sqInt rResult2; + sqInt rResult21; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop14; + sqInt rTop15; + sqInt rTop16; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop31; + sqInt rTop32; + sqInt rTop33; + sqInt rTop34; + sqInt rTop35; + sqInt rTop36; + sqInt rTop37; + sqInt rTop38; + sqInt rTop39; + sqInt rTop4; + sqInt rTop40; + sqInt rTop41; + sqInt rTop42; + sqInt rTop43; + sqInt rTop44; + sqInt rTop45; + sqInt rTop46; + sqInt rTop47; + sqInt rTop48; + sqInt rTop49; + sqInt rTop5; + sqInt rTop50; + sqInt rTop51; + sqInt rTop52; + sqInt rTop53; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt second; + sqInt second1; + sqInt second10; + sqInt second11; + sqInt second12; + sqInt second13; + sqInt second14; + sqInt second15; + sqInt second16; + sqInt second17; + sqInt second18; + sqInt second2; + sqInt second4; + sqInt second5; + sqInt second6; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondHigh1; + sqInt secondHigh9; + sqInt secondHighValue; + sqInt secondHighValue1; + sqInt secondLow1; + sqInt secondLow9; + sqInt secondLowValue; + sqInt secondLowValue1; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue10; + sqInt secondValue11; + sqInt secondValue12; + sqInt secondValue13; + sqInt secondValue14; + sqInt secondValue15; + sqInt secondValue16; + sqInt secondValue17; + sqInt secondValue18; + sqInt secondValue2; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue6; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask16; + sqInt topRegistersMask17; + sqInt topRegistersMask18; + sqInt topRegistersMask19; + sqInt topRegistersMask2; + sqInt topRegistersMask20; + sqInt topRegistersMask21; + sqInt topRegistersMask22; + sqInt topRegistersMask23; + sqInt topRegistersMask24; + sqInt topRegistersMask25; + sqInt topRegistersMask26; + sqInt topRegistersMask27; + sqInt topRegistersMask28; + sqInt topRegistersMask3; + sqInt topRegistersMask30; + sqInt topRegistersMask31; + sqInt topRegistersMask32; + sqInt topRegistersMask33; + sqInt topRegistersMask35; + sqInt topRegistersMask4; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value27; + sqInt value3; + sqInt value30; + sqInt value31; + sqInt value5; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueHigh1; + sqInt valueHigh10; + sqInt valueHigh2; + sqInt valueHigh3; + sqInt valueHigh4; + sqInt valueHigh5; + sqInt valueHigh8; + sqInt valueHigh9; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueHighValue3; + sqInt valueHighValue4; + sqInt valueHighValue5; + sqInt valueHighValue6; + sqInt valueHighValue7; + sqInt valueLow1; + sqInt valueLow10; + sqInt valueLow2; + sqInt valueLow3; + sqInt valueLow4; + sqInt valueLow5; + sqInt valueLow8; + sqInt valueLow9; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueLowValue3; + sqInt valueLowValue4; + sqInt valueLowValue5; + sqInt valueLowValue6; + sqInt valueLowValue7; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue27; + sqInt valueValue3; + sqInt valueValue30; + sqInt valueValue31; + sqInt valueValue5; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + switch (prim) { case 187: - return genLowcodePushSessionIdentifier(); + /* begin genLowcodePushSessionIdentifier */ + ssPushNativeConstantInt32(getThisSessionID()); + return 0; case 188: - return genLowcodePushZero32(); + /* begin genLowcodePushZero32 */ + ssPushNativeConstantInt32(0); + return 0; case 189: - return genLowcodePushZero64(); + /* begin genLowcodePushZero64 */ + ssPushNativeConstantInt64(0); + return 0; case 190: - return genLowcodePushZeroFloat32(); + /* begin genLowcodePushZeroFloat32 */ + ssPushNativeConstantFloat32(0.0); + return 0; case 191: - return genLowcodePushZeroFloat64(); + /* begin genLowcodePushZeroFloat64 */ + ssPushNativeConstantFloat64(0.0); + return 0; case 192: - return genLowcodeRem32(); + /* begin genLowcodeRem32 */ + topRegistersMask = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + gDivRRQuoRem(second, first, second, first); + ssPushNativeRegister(first); + return 0; case 193: - return genLowcodeRem64(); + /* begin genLowcodeRem64 */ + topRegistersMask1 = 0; + rTop1 = (rNext1 = NoReg); + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop1 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext1 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg1; + } + } + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop1); + } + assert(!(((rTop1 == NoReg) + || (rNext1 == NoReg)))); + rResult = allocateFloatRegNotConflictingWith((1U << rTop1) | (1U << rNext1)); + assert(!((rResult == NoReg))); + second1 = rTop1; + first1 = rNext1; + result = rResult; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + abort(); + return 0; case 194: - return genLowcodeRightShift32(); + /* begin genLowcodeRightShift32 */ + topRegistersMask2 = 0; + rTop2 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext2 == NoReg)))); + shiftAmount = rTop2; + value = rNext2; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin LogicalShiftRightR:R: */ + genoperandoperand(LogicalShiftRightRR, shiftAmount, value); + ssPushNativeRegister(value); + return 0; case 195: - return genLowcodeRightShift64(); + /* begin genLowcodeRightShift64 */ + topRegistersMask3 = 0; + rTop3 = (rNext3 = NoReg); + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop3 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext3 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg3; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + rResult1 = allocateFloatRegNotConflictingWith((1U << rTop3) | (1U << rNext3)); + assert(!((rResult1 == NoReg))); + shiftAmount1 = rTop3; + value1 = rNext3; + result1 = rResult1; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + abort(); + return 0; case 196: - return genLowcodeSignExtend32From16(); + /* begin genLowcodeSignExtend32From16 */ + rTop4 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(0); + } + assert(!((rTop4 == NoReg))); + value2 = rTop4; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value2, value2); + ssPushNativeRegister(value2); + return 0; case 197: - return genLowcodeSignExtend32From8(); + /* begin genLowcodeSignExtend32From8 */ + rTop5 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(0); + } + assert(!((rTop5 == NoReg))); + value3 = rTop5; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value3, value3); + ssPushNativeRegister(value3); + return 0; case 198: - return genLowcodeSignExtend64From16(); + /* begin genLowcodeSignExtend64From16 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask4 = 0; + rTop6 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1U << reg4; + } + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop6); + } + assert(!(((rTop6 == NoReg) + || (rNext4 == NoReg)))); + valueLow1 = rTop6; + valueHigh1 = rNext4; + + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, valueLow1, valueLow1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(CmpCqR, 0, valueLow1); + /* begin JumpLess: */ + isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh1); + /* begin Jump: */ + cont = genoperand(Jump, ((sqInt)0)); + jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh1))); + jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegistersecondRegister(valueLow1, valueHigh1); + + return 0; case 199: - return genLowcodeSignExtend64From32(); + /* begin genLowcodeSignExtend64From32 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop7 = NoReg; + rResult3 = (rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop7 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rTop7); + rResult2 = allocateRegNotConflictingWith((1U << rTop7) | (1U << rResult3)); + assert(!(((rTop7 == NoReg) + || ((rResult3 == NoReg) + || (rResult2 == NoReg))))); + value5 = rTop7; + resultLow2 = rResult3; + resultHigh2 = rResult2; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value5, resultLow2); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(CmpCqR, 0, value5); + /* begin JumpLess: */ + isNegative1 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, resultHigh2); + /* begin Jump: */ + cont1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(isNegative1, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, resultHigh2))); + jmpTarget(cont1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegistersecondRegister(resultLow2, resultHigh2); + + return 0; case 200: - return genLowcodeSignExtend64From8(); + /* begin genLowcodeSignExtend64From8 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger2: */ + topRegistersMask5 = 0; + rTop8 = (rNext5 = NoReg); + rResult4 = (rResult21 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop8 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext5 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0)); + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext5 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1U << reg5; + } + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext5 == NoReg) { + rNext5 = allocateRegNotConflictingWith(1U << rTop8); + } + assert(!(((rTop8 == NoReg) + || (rNext5 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop8) | (1U << rNext5)); + rResult21 = allocateFloatRegNotConflictingWith(((1U << rTop8) | (1U << rNext5)) | (1U << rResult4)); + assert(!(((rResult4 == NoReg) + || (rResult21 == NoReg)))); + valueLow2 = rTop8; + valueHigh2 = rNext5; + resultLow3 = rResult4; + resultHigh3 = rResult21; + + nativePopToRegsecondReg(ssNativeTop(), valueLow2, valueHigh2); + ssNativePop(1); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, valueLow2, valueLow2); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(CmpCqR, 0, valueLow2); + /* begin JumpLess: */ + isNegative2 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperand(MoveCqR, 0, valueHigh2); + /* begin Jump: */ + cont2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(isNegative2, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh2))); + jmpTarget(cont2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegistersecondRegister(valueLow2, valueHigh2); + + return 0; case 201: - return genLowcodeStoreFloat32ToMemory(); + /* begin genLowcodeStoreFloat32ToMemory */ + + /* Integer registers */ + frTop = (rTop9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(0); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeValue(1)); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + assert(!(((frTop == NoReg) + || (rTop9 == NoReg)))); + floatValue = frTop; + pointer = rTop9; + + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperandoperand(MoveRsM32r, floatValue, 0, pointer); + return 0; case 202: - return genLowcodeStoreFloat64ToMemory(); + /* begin genLowcodeStoreFloat64ToMemory */ + + /* Integer registers */ + frTop1 = (rTop10 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop10 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(0); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeValue(1)); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + assert(!(((frTop1 == NoReg) + || (rTop10 == NoReg)))); + doubleValue = frTop1; + pointer1 = rTop10; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), doubleValue); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperandoperand(MoveRdM64r, doubleValue, 0, pointer1); + return 0; case 203: - return genLowcodeStoreInt16ToMemory(); + /* begin genLowcodeStoreInt16ToMemory */ + topRegistersMask6 = 0; + rTop14 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop14 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg6; + } + } + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1U << rTop14); + } + assert(!(((rTop14 == NoReg) + || (rNext6 == NoReg)))); + pointer2 = rTop14; + value7 = rNext6; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value7, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperandoperand(MoveRM16r, TempReg, 0, pointer2); + return 0; case 204: - return genLowcodeStoreInt32ToMemory(); + /* begin genLowcodeStoreInt32ToMemory */ + topRegistersMask7 = 0; + rTop15 = (rNext7 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext7 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1U << reg7; + } + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1U << rTop15); + } + assert(!(((rTop15 == NoReg) + || (rNext7 == NoReg)))); + pointer3 = rTop15; + value8 = rNext7; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperandoperand(MoveRM32r, value8, 0, pointer3); + return 0; case 205: - return genLowcodeStoreInt64ToMemory(); + /* begin genLowcodeStoreInt64ToMemory */ + /* begin allocateRegistersForLowcodeInteger3: */ + rTop45 = (rNext28 = (rNextNext1 = NoReg)); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop45 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext28 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext28 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext28 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + } + if (rTop45 == NoReg) { + registerMask1 = 0; + if (rNext28 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext28; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rTop45 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext28 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop45; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rNext28 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop45) | (1U << rNext28); + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop45 == NoReg) + || ((rNext28 == NoReg) + || (rNextNext1 == NoReg))))); + pointer5 = rTop45; + valueLow8 = rNext28; + valueHigh8 = rNextNext1; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), valueLow8, valueHigh8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperandoperand(MoveRM32r, valueLow8, 0, pointer5); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperandoperand(MoveRM32r, valueHigh8, 4, pointer5); + + return 0; case 206: - return genLowcodeStoreInt8ToMemory(); + /* begin genLowcodeStoreInt8ToMemory */ + topRegistersMask8 = 0; + rTop16 = (rNext8 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop16 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg8; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1U << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext8 == NoReg)))); + pointer4 = rTop16; + value9 = rNext8; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value9); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value9, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperandoperand(MoveRM8r, TempReg, 0, pointer4); + return 0; case 207: - return genLowcodeStoreLocalFloat32(); + /* begin genLowcodeStoreLocalFloat32 */ + baseOffset = extA; + /* begin allocateRegistersForLowcodeFloat: */ + topRegistersMask9 = 0; + frTop2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(topRegistersMask9); + } + assert(!((frTop2 == NoReg))); + value10 = frTop2; + + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperandoperand(MoveRsM32r, value10, 0, TempReg); + extA = 0; + return 0; case 208: - return genLowcodeStoreLocalFloat64(); + /* begin genLowcodeStoreLocalFloat64 */ + baseOffset1 = extA; + /* begin allocateRegistersForLowcodeFloat: */ + topRegistersMask10 = 0; + frTop3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + assert(!((frTop3 == NoReg))); + value11 = frTop3; + + nativePopToReg(ssNativeTop(), value11); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperandoperand(MoveRdM64r, value11, 0, TempReg); + extA = 0; + return 0; case 209: - return genLowcodeStoreLocalInt16(); + /* begin genLowcodeStoreLocalInt16 */ + baseOffset2 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop17 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop17 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(0); + } + assert(!((rTop17 == NoReg))); + value12 = rTop17; + + nativePopToReg(ssNativeTop(), value12); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value12, TempReg); + loadNativeLocalAddressto(baseOffset2, value12); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperandoperand(MoveRM16r, TempReg, 0, value12); + extA = 0; + return 0; case 210: - return genLowcodeStoreLocalInt32(); + /* begin genLowcodeStoreLocalInt32 */ + baseOffset3 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop18 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop18 == NoReg) { + rTop18 = allocateRegNotConflictingWith(0); + } + assert(!((rTop18 == NoReg))); + value13 = rTop18; + + nativePopToReg(ssNativeTop(), value13); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset3, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperandoperand(MoveRM32r, value13, 0, TempReg); + extA = 0; + return 0; case 211: - return genLowcodeStoreLocalInt64(); + /* begin genLowcodeStoreLocalInt64 */ + baseOffset6 = extA; + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask30 = 0; + rTop46 = (rNext29 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop46 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext29 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext29 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg28 = (rNext29 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask30 = 1U << reg28; + } + } + if (rTop46 == NoReg) { + rTop46 = allocateRegNotConflictingWith(topRegistersMask30); + } + if (rNext29 == NoReg) { + rNext29 = allocateRegNotConflictingWith(1U << rTop46); + } + assert(!(((rTop46 == NoReg) + || (rNext29 == NoReg)))); + valueLow9 = rTop46; + valueHigh9 = rNext29; + + nativePopToRegsecondReg(ssNativeTop(), valueLow9, valueHigh9); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset6, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperandoperand(MoveRM32r, valueLow9, 0, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperandoperand(MoveRM32r, valueHigh9, 4, TempReg); + + extA = 0; + return 0; case 212: - return genLowcodeStoreLocalInt8(); + /* begin genLowcodeStoreLocalInt8 */ + baseOffset4 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop19 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(0); + } + assert(!((rTop19 == NoReg))); + value14 = rTop19; + + nativePopToReg(ssNativeTop(), value14); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value14, TempReg); + loadNativeLocalAddressto(baseOffset4, value14); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperandoperand(MoveRM8r, TempReg, 0, value14); + extA = 0; + return 0; case 213: - return genLowcodeStoreLocalPointer(); + /* begin genLowcodeStoreLocalPointer */ + baseOffset5 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop20 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(0); + } + assert(!((rTop20 == NoReg))); + pointerValue5 = rTop20; + + nativePopToReg(ssNativeTop(), pointerValue5); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset5, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperandoperand(MoveRMwr, pointerValue5, 0, TempReg); + extA = 0; + return 0; case 214: - return genLowcodeStorePointerToMemory(); + /* begin genLowcodeStorePointerToMemory */ + topRegistersMask11 = 0; + rTop21 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1U << reg9; + } + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(topRegistersMask11); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext9 == NoReg)))); + memoryPointer = rTop21; + pointerValue6 = rNext9; + + nativePopToReg(ssNativeTop(), memoryPointer); + ssNativePop(1); + nativePopToReg(ssNativeTop(), pointerValue6); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperandoperand(MoveRMwr, pointerValue6, 0, memoryPointer); + return 0; case 215: - return genLowcodeSub32(); + /* begin genLowcodeSub32 */ + topRegistersMask12 = 0; + rTop22 = (rNext10 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop22 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext10 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1U << reg10; + } + } + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(topRegistersMask12); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop22); + } + assert(!(((rTop22 == NoReg) + || (rNext10 == NoReg)))); + second2 = rTop22; + first2 = rNext10; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 216: - return genLowcodeSub64(); + /* begin genLowcodeSub64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop23 = (rNext11 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext11 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext11 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext11 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop23 == NoReg) { + registerMask = 0; + if (rNext11 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext11; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop23 = allocateRegNotConflictingWith(registerMask); + } + if (rNext11 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop23; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext11 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop23) | (1U << rNext11); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop23) | (1U << rNext11)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop23 == NoReg) + || ((rNext11 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow1 = rTop23; + secondHigh1 = rNext11; + firstLow1 = rNextNext; + firstHigh1 = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow1, secondHigh1); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow1, firstHigh1); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, secondLow1, firstLow1); + /* begin SubbR:R: */ + genoperandoperand(SubbRR, secondHigh1, firstHigh1); + ssPushNativeRegistersecondRegister(firstLow1, firstHigh1); + + return 0; case 217: - return genLowcodeTruncate32To16(); + /* begin genLowcodeTruncate32To16 */ + rTop24 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + assert(!((rTop24 == NoReg))); + value15 = rTop24; + + nativePopToReg(ssNativeTop(), value15); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(AndCqR, 0xFFFF, value15); + ssPushNativeRegister(value15); + return 0; case 218: - return genLowcodeTruncate32To8(); + /* begin genLowcodeTruncate32To8 */ + rTop25 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + assert(!((rTop25 == NoReg))); + value16 = rTop25; + + nativePopToReg(ssNativeTop(), value16); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction25 = genoperandoperand(AndCqR, 0xFF, value16); + ssPushNativeRegister(value16); + return 0; case 219: - return genLowcodeTruncate64To16(); + /* begin genLowcodeTruncate64To16 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask14 = 0; + rTop26 = (rNext13 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop26 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (rNext13 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1U << reg12; + } + } + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(topRegistersMask14); + } + if (rNext13 == NoReg) { + rNext13 = allocateRegNotConflictingWith(1U << rTop26); + } + assert(!(((rTop26 == NoReg) + || (rNext13 == NoReg)))); + valueLow3 = rTop26; + valueHigh3 = rNext13; + + nativePopToRegsecondReg(ssNativeTop(), valueLow3, valueHigh3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperand(AndCqR, 0xFFFF, valueLow3); + ssPushNativeRegister(valueLow3); + + return 0; case 220: - return genLowcodeTruncate64To32(); + /* begin genLowcodeTruncate64To32 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask15 = 0; + rTop27 = (rNext14 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (rNext14 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1U << reg13; + } + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(topRegistersMask15); + } + if (rNext14 == NoReg) { + rNext14 = allocateRegNotConflictingWith(1U << rTop27); + } + assert(!(((rTop27 == NoReg) + || (rNext14 == NoReg)))); + valueLow4 = rTop27; + valueHigh4 = rNext14; + + nativePopToRegsecondReg(ssNativeTop(), valueLow4, valueHigh4); + ssNativePop(1); + ssPushNativeRegister(valueLow4); + + return 0; case 221: - return genLowcodeTruncate64To8(); + /* begin genLowcodeTruncate64To8 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger: */ + topRegistersMask16 = 0; + rTop28 = (rNext15 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop28 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext15 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask16 = 1U << reg14; + } + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(topRegistersMask16); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1U << rTop28); + } + assert(!(((rTop28 == NoReg) + || (rNext15 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop28) | (1U << rNext15)); + assert(!((rResult5 == NoReg))); + valueLow5 = rTop28; + valueHigh5 = rNext15; + result4 = rResult5; + + nativePopToRegsecondReg(ssNativeTop(), valueLow5, valueHigh5); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperand(AndCqR, 0xFF, valueLow5); + ssPushNativeRegister(valueLow5); + + return 0; case 222: - return genLowcodeUdiv32(); + /* begin genLowcodeUdiv32 */ + topRegistersMask17 = 0; + rTop29 = (rNext16 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext16 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext16 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (rNext16 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask17 = 1U << reg15; + } + } + if (rTop29 == NoReg) { + rTop29 = allocateRegNotConflictingWith(topRegistersMask17); + } + if (rNext16 == NoReg) { + rNext16 = allocateRegNotConflictingWith(1U << rTop29); + } + assert(!(((rTop29 == NoReg) + || (rNext16 == NoReg)))); + second4 = rTop29; + first4 = rNext16; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + gDivRRQuoRem(second4, first4, first4, second4); + ssPushNativeRegister(first4); + return 0; case 223: - return genLowcodeUdiv64(); + /* begin genLowcodeUdiv64 */ + topRegistersMask18 = 0; + rTop30 = (rNext17 = NoReg); + rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop30 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext17 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext17 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg16 = (rNext17 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask18 = 1U << reg16; + } + } + if (rTop30 == NoReg) { + rTop30 = allocateRegNotConflictingWith(topRegistersMask18); + } + if (rNext17 == NoReg) { + rNext17 = allocateRegNotConflictingWith(1U << rTop30); + } + assert(!(((rTop30 == NoReg) + || (rNext17 == NoReg)))); + rResult6 = allocateFloatRegNotConflictingWith((1U << rTop30) | (1U << rNext17)); + assert(!((rResult6 == NoReg))); + second5 = rTop30; + first5 = rNext17; + result5 = rResult6; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + abort(); + return 0; case 224: - return genLowcodeUint32Great(); + /* begin genLowcodeUint32Great */ + topRegistersMask19 = 0; + rTop31 = (rNext18 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop31 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext18 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext18 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg17 = (rNext18 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask19 = 1U << reg17; + } + } + if (rTop31 == NoReg) { + rTop31 = allocateRegNotConflictingWith(topRegistersMask19); + } + if (rNext18 == NoReg) { + rNext18 = allocateRegNotConflictingWith(1U << rTop31); + } + assert(!(((rTop31 == NoReg) + || (rNext18 == NoReg)))); + second6 = rTop31; + first6 = rNext18; + + nativePopToReg(ssNativeTop(), second6); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first6); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second6, first6); + /* begin JumpBelowOrEqual: */ + falseJump = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperand(MoveCqR, 1, first6); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperand(MoveCqR, 0, first6); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first6); + return 0; case 225: - return genLowcodeUint32GreatEqual(); + /* begin genLowcodeUint32GreatEqual */ + topRegistersMask20 = 0; + rTop32 = (rNext19 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop32 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext19 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext19 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg18 = (rNext19 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask20 = 1U << reg18; + } + } + if (rTop32 == NoReg) { + rTop32 = allocateRegNotConflictingWith(topRegistersMask20); + } + if (rNext19 == NoReg) { + rNext19 = allocateRegNotConflictingWith(1U << rTop32); + } + assert(!(((rTop32 == NoReg) + || (rNext19 == NoReg)))); + second7 = rTop32; + first7 = rNext19; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second7, first7); + /* begin JumpBelow: */ + falseJump1 = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction33 = genoperandoperand(MoveCqR, 1, first7); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction34 = genoperandoperand(MoveCqR, 0, first7); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first7); + return 0; case 226: - return genLowcodeUint32Less(); + /* begin genLowcodeUint32Less */ + topRegistersMask21 = 0; + rTop33 = (rNext20 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop33 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext20 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext20 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg19 = (rNext20 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask21 = 1U << reg19; + } + } + if (rTop33 == NoReg) { + rTop33 = allocateRegNotConflictingWith(topRegistersMask21); + } + if (rNext20 == NoReg) { + rNext20 = allocateRegNotConflictingWith(1U << rTop33); + } + assert(!(((rTop33 == NoReg) + || (rNext20 == NoReg)))); + second8 = rTop33; + first8 = rNext20; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second8, first8); + /* begin JumpAboveOrEqual: */ + falseJump2 = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction35 = genoperandoperand(MoveCqR, 1, first8); + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction36 = genoperandoperand(MoveCqR, 0, first8); + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first8); + return 0; case 227: - return genLowcodeUint32LessEqual(); + /* begin genLowcodeUint32LessEqual */ + topRegistersMask22 = 0; + rTop34 = (rNext21 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop34 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext21 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext21 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg20 = (rNext21 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask22 = 1U << reg20; + } + } + if (rTop34 == NoReg) { + rTop34 = allocateRegNotConflictingWith(topRegistersMask22); + } + if (rNext21 == NoReg) { + rNext21 = allocateRegNotConflictingWith(1U << rTop34); + } + assert(!(((rTop34 == NoReg) + || (rNext21 == NoReg)))); + second9 = rTop34; + first9 = rNext21; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second9, first9); + /* begin JumpAbove: */ + falseJump3 = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction37 = genoperandoperand(MoveCqR, 1, first9); + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction38 = genoperandoperand(MoveCqR, 0, first9); + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first9); + return 0; case 228: - return genLowcodeUint32ToFloat32(); + /* begin genLowcodeUint32ToFloat32 */ + rTop35 = NoReg; + frResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop35 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop35 == NoReg) { + rTop35 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop35 == NoReg) + || (frResult == NoReg)))); + value20 = rTop35; + result6 = frResult; + + nativePopToReg(ssNativeTop(), value20); + ssNativePop(1); + /* begin ConvertR:Rs: */ + genoperandoperand(ConvertRRs, value20, result6); + ssPushNativeRegisterSingleFloat(result6); + return 0; case 229: - return genLowcodeUint32ToFloat64(); + /* begin genLowcodeUint32ToFloat64 */ + rTop36 = NoReg; + frResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop36 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop36 == NoReg) { + rTop36 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop36 == NoReg) + || (frResult1 == NoReg)))); + value21 = rTop36; + result7 = frResult1; + + nativePopToReg(ssNativeTop(), value21); + ssNativePop(1); + /* begin ConvertR:Rd: */ + genoperandoperand(ConvertRRd, value21, result7); + ssPushNativeRegisterDoubleFloat(result7); + return 0; case 230: - return genLowcodeUint64Great(); + /* begin genLowcodeUint64Great */ + topRegistersMask23 = 0; + rTop37 = (rNext22 = NoReg); + rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop37 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext22 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext22 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg21 = (rNext22 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask23 = 1U << reg21; + } + } + if (rTop37 == NoReg) { + rTop37 = allocateRegNotConflictingWith(topRegistersMask23); + } + if (rNext22 == NoReg) { + rNext22 = allocateRegNotConflictingWith(1U << rTop37); + } + assert(!(((rTop37 == NoReg) + || (rNext22 == NoReg)))); + rResult7 = allocateFloatRegNotConflictingWith((1U << rTop37) | (1U << rNext22)); + assert(!((rResult7 == NoReg))); + second10 = rTop37; + first10 = rNext22; + value22 = rResult7; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + abort(); + return 0; case 231: - return genLowcodeUint64GreatEqual(); + /* begin genLowcodeUint64GreatEqual */ + topRegistersMask24 = 0; + rTop38 = (rNext23 = NoReg); + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop38 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext23 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext23 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg22 = (rNext23 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask24 = 1U << reg22; + } + } + if (rTop38 == NoReg) { + rTop38 = allocateRegNotConflictingWith(topRegistersMask24); + } + if (rNext23 == NoReg) { + rNext23 = allocateRegNotConflictingWith(1U << rTop38); + } + assert(!(((rTop38 == NoReg) + || (rNext23 == NoReg)))); + rResult8 = allocateFloatRegNotConflictingWith((1U << rTop38) | (1U << rNext23)); + assert(!((rResult8 == NoReg))); + second11 = rTop38; + first11 = rNext23; + value23 = rResult8; + + nativePopToReg(ssNativeTop(), second11); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first11); + ssNativePop(1); + abort(); + return 0; case 232: - return genLowcodeUint64Less(); + /* begin genLowcodeUint64Less */ + topRegistersMask25 = 0; + rTop39 = (rNext24 = NoReg); + rResult9 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop39 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext24 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext24 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg23 = (rNext24 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask25 = 1U << reg23; + } + } + if (rTop39 == NoReg) { + rTop39 = allocateRegNotConflictingWith(topRegistersMask25); + } + if (rNext24 == NoReg) { + rNext24 = allocateRegNotConflictingWith(1U << rTop39); + } + assert(!(((rTop39 == NoReg) + || (rNext24 == NoReg)))); + rResult9 = allocateFloatRegNotConflictingWith((1U << rTop39) | (1U << rNext24)); + assert(!((rResult9 == NoReg))); + second12 = rTop39; + first12 = rNext24; + value24 = rResult9; + + nativePopToReg(ssNativeTop(), second12); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first12); + ssNativePop(1); + abort(); + return 0; case 233: - return genLowcodeUint64LessEqual(); + /* begin genLowcodeUint64LessEqual */ + topRegistersMask26 = 0; + rTop40 = (rNext25 = NoReg); + rResult10 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop40 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext25 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext25 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg24 = (rNext25 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask26 = 1U << reg24; + } + } + if (rTop40 == NoReg) { + rTop40 = allocateRegNotConflictingWith(topRegistersMask26); + } + if (rNext25 == NoReg) { + rNext25 = allocateRegNotConflictingWith(1U << rTop40); + } + assert(!(((rTop40 == NoReg) + || (rNext25 == NoReg)))); + rResult10 = allocateFloatRegNotConflictingWith((1U << rTop40) | (1U << rNext25)); + assert(!((rResult10 == NoReg))); + second13 = rTop40; + first13 = rNext25; + value25 = rResult10; + + nativePopToReg(ssNativeTop(), second13); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first13); + ssNativePop(1); + abort(); + return 0; case 234: - return genLowcodeUint64ToFloat32(); + /* begin genLowcodeUint64ToFloat32 */ + rTop41 = NoReg; + frResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop41 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop41 == NoReg) { + rTop41 = allocateRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop41 == NoReg) + || (frResult2 == NoReg)))); + value26 = rTop41; + result8 = frResult2; + + nativePopToReg(ssNativeTop(), value26); + ssNativePop(1); + abort(); + return 0; case 235: - return genLowcodeUint64ToFloat64(); + /* begin genLowcodeUint64ToFloat64 */ + rTop42 = NoReg; + frResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop42 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop42 == NoReg) { + rTop42 = allocateRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop42 == NoReg) + || (frResult3 == NoReg)))); + value27 = rTop42; + result9 = frResult3; + + nativePopToReg(ssNativeTop(), value27); + ssNativePop(1); + abort(); + return 0; case 236: - return genLowcodeUmul32(); + /* begin genLowcodeUmul32 */ + topRegistersMask27 = 0; + rTop43 = (rNext26 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop43 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext26 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext26 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg25 = (rNext26 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask27 = 1U << reg25; + } + } + if (rTop43 == NoReg) { + rTop43 = allocateRegNotConflictingWith(topRegistersMask27); + } + if (rNext26 == NoReg) { + rNext26 = allocateRegNotConflictingWith(1U << rTop43); + } + assert(!(((rTop43 == NoReg) + || (rNext26 == NoReg)))); + second14 = rTop43; + first14 = rNext26; + + nativePopToReg(ssNativeTop(), second14); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first14); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, second14, first14); + ssPushNativeRegister(first14); + return 0; case 237: - return genLowcodeUmul64(); + /* begin genLowcodeUmul64 */ + topRegistersMask28 = 0; + rTop44 = (rNext27 = NoReg); + rResult14 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop44 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext27 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext27 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg26 = (rNext27 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask28 = 1U << reg26; + } + } + if (rTop44 == NoReg) { + rTop44 = allocateRegNotConflictingWith(topRegistersMask28); + } + if (rNext27 == NoReg) { + rNext27 = allocateRegNotConflictingWith(1U << rTop44); + } + assert(!(((rTop44 == NoReg) + || (rNext27 == NoReg)))); + rResult14 = allocateFloatRegNotConflictingWith((1U << rTop44) | (1U << rNext27)); + assert(!((rResult14 == NoReg))); + second15 = rTop44; + first15 = rNext27; + result10 = rResult14; + + nativePopToReg(ssNativeTop(), second15); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first15); + ssNativePop(1); + abort(); + return 0; case 238: return 0; case 239: - return genLowcodeUnlockVM(); + /* begin genLowcodeUnlockVM */ + abort(); + return 0; case 240: - return genLowcodeUrem32(); + /* begin genLowcodeUrem32 */ + topRegistersMask31 = 0; + rTop47 = (rNext30 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop47 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext30 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext30 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg29 = (rNext30 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask31 = 1U << reg29; + } + } + if (rTop47 == NoReg) { + rTop47 = allocateRegNotConflictingWith(topRegistersMask31); + } + if (rNext30 == NoReg) { + rNext30 = allocateRegNotConflictingWith(1U << rTop47); + } + assert(!(((rTop47 == NoReg) + || (rNext30 == NoReg)))); + second16 = rTop47; + first16 = rNext30; + + nativePopToReg(ssNativeTop(), second16); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first16); + ssNativePop(1); + gDivRRQuoRem(second16, first16, second16, first16); + ssPushNativeRegister(first16); + return 0; case 241: - return genLowcodeUrem64(); + /* begin genLowcodeUrem64 */ + topRegistersMask32 = 0; + rTop48 = (rNext31 = NoReg); + rResult15 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop48 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext31 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext31 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg30 = (rNext31 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask32 = 1U << reg30; + } + } + if (rTop48 == NoReg) { + rTop48 = allocateRegNotConflictingWith(topRegistersMask32); + } + if (rNext31 == NoReg) { + rNext31 = allocateRegNotConflictingWith(1U << rTop48); + } + assert(!(((rTop48 == NoReg) + || (rNext31 == NoReg)))); + rResult15 = allocateFloatRegNotConflictingWith((1U << rTop48) | (1U << rNext31)); + assert(!((rResult15 == NoReg))); + second17 = rTop48; + first17 = rNext31; + result11 = rResult15; + + nativePopToReg(ssNativeTop(), second17); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first17); + ssNativePop(1); + abort(); + return 0; case 242: - return genLowcodeXor32(); + /* begin genLowcodeXor32 */ + topRegistersMask33 = 0; + rTop49 = (rNext32 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop49 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext32 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext32 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg31 = (rNext32 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask33 = 1U << reg31; + } + } + if (rTop49 == NoReg) { + rTop49 = allocateRegNotConflictingWith(topRegistersMask33); + } + if (rNext32 == NoReg) { + rNext32 = allocateRegNotConflictingWith(1U << rTop49); + } + assert(!(((rTop49 == NoReg) + || (rNext32 == NoReg)))); + second18 = rTop49; + first18 = rNext32; + + nativePopToReg(ssNativeTop(), second18); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first18); + ssNativePop(1); + /* begin XorR:R: */ + genoperandoperand(XorRR, second18, first18); + ssPushNativeRegister(first18); + return 0; case 243: - return genLowcodeXor64(); + /* begin genLowcodeXor64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop50 = (rNext33 = (rNextNext2 = (rNextNextNext1 = NoReg))); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop50 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext33 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext33 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext33 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + nativeValueIndex2 += 1; + } + } + if (rTop50 == NoReg) { + registerMask2 = 0; + if (rNext33 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rNext33; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + if (rNextNextNext1 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNextNext1); + } + rTop50 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext33 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rTop50; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + if (rNextNextNext1 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNextNext1); + } + rNext33 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1U << rTop50) | (1U << rNext33); + if (rNextNextNext1 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNextNext1); + } + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNextNext1 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask2 = ((1U << rTop50) | (1U << rNext33)) | (1U << rNextNext2); + rNextNextNext1 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop50 == NoReg) + || ((rNext33 == NoReg) + || ((rNextNext2 == NoReg) + || (rNextNextNext1 == NoReg)))))); + secondLow9 = rTop50; + secondHigh9 = rNext33; + firstLow9 = rNextNext2; + firstHigh9 = rNextNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), secondLow9, secondHigh9); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow9, firstHigh9); + ssNativePop(1); + /* begin XorR:R: */ + genoperandoperand(XorRR, secondLow9, firstLow9); + /* begin XorR:R: */ + genoperandoperand(XorRR, secondHigh9, firstHigh9); + ssPushNativeRegistersecondRegister(firstLow9, firstHigh9); + + return 0; case 244: - return genLowcodeZeroExtend32From16(); + /* begin genLowcodeZeroExtend32From16 */ + rTop51 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop51 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop51 == NoReg) { + rTop51 = allocateRegNotConflictingWith(0); + } + assert(!((rTop51 == NoReg))); + value30 = rTop51; + + nativePopToReg(ssNativeTop(), value30); + ssNativePop(1); + /* begin ZeroExtend16R:R: */ + genoperandoperand(ZeroExtend16RR, value30, value30); + ssPushNativeRegister(value30); + return 0; case 245: - return genLowcodeZeroExtend32From8(); + /* begin genLowcodeZeroExtend32From8 */ + rTop52 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop52 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop52 == NoReg) { + rTop52 = allocateRegNotConflictingWith(0); + } + assert(!((rTop52 == NoReg))); + value31 = rTop52; + + nativePopToReg(ssNativeTop(), value31); + ssNativePop(1); + /* begin ZeroExtend8R:R: */ + genoperandoperand(ZeroExtend8RR, value31, value31); + ssPushNativeRegister(value31); + return 0; case 246: - return genLowcodeZeroExtend64From16(); + /* begin genLowcodeZeroExtend64From16 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask35 = 0; + rTop53 = (rNext34 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop53 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext34 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext34 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg33 = (rNext34 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask35 = 1U << reg33; + } + } + if (rTop53 == NoReg) { + rTop53 = allocateRegNotConflictingWith(topRegistersMask35); + } + if (rNext34 == NoReg) { + rNext34 = allocateRegNotConflictingWith(1U << rTop53); + } + assert(!(((rTop53 == NoReg) + || (rNext34 == NoReg)))); + valueLow10 = rTop53; + valueHigh10 = rNext34; + + nativePopToRegsecondReg(ssNativeTop(), valueLow10, valueHigh10); + ssNativePop(1); + /* begin ZeroExtend16R:R: */ + genoperandoperand(ZeroExtend16RR, valueLow10, valueLow10); + /* begin checkQuickConstant:forInstruction: */ + anInstruction39 = genoperandoperand(MoveCqR, 0, valueHigh10); + ssPushNativeRegistersecondRegister(valueLow10, valueHigh10); + + return 0; default: return genLowcodeUnaryInlinePrimitive5(prim); @@ -37315,213 +35748,2632 @@ genLowcodeUnaryInlinePrimitive4(sqInt prim) /* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive5: */ -static sqInt NoDbgRegParms -genLowcodeUnaryInlinePrimitive5(sqInt prim) -{ + /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive5: */ +static sqInt NoDbgRegParms +genLowcodeUnaryInlinePrimitive5(sqInt prim) +{ + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + sqInt reg; + sqInt resultHigh; + sqInt resultHighValue; + sqInt resultLow; + sqInt resultLowValue; + sqInt rNext; + sqInt rResult; + sqInt rResult2; + sqInt rTop; + sqInt rTop2; + sqInt topRegistersMask; + sqInt value; + sqInt valueHigh; + sqInt valueHighValue; + sqInt valueLow; + sqInt valueLowValue; + sqInt valueValue; + + + switch (prim) { + case 247: + /* begin genLowcodeZeroExtend64From32 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop = NoReg; + rResult = (rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rTop); + rResult2 = allocateRegNotConflictingWith((1U << rTop) | (1U << rResult)); + assert(!(((rTop == NoReg) + || ((rResult == NoReg) + || (rResult2 == NoReg))))); + value = rTop; + resultLow = rResult; + resultHigh = rResult2; + + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value, resultLow); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 0, resultHigh); + ssPushNativeRegistersecondRegister(resultLow, resultHigh); + + return 0; + + case 0xF8: + /* begin genLowcodeZeroExtend64From8 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask = 0; + rTop2 = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext == NoReg)))); + valueLow = rTop2; + valueHigh = rNext; + + nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); + ssNativePop(1); + /* begin ZeroExtend8R:R: */ + genoperandoperand(ZeroExtend8RR, valueLow, valueLow); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh); + ssPushNativeRegistersecondRegister(valueLow, valueHigh); + + return 0; + + default: + return EncounteredUnknownBytecode; + + } + return 0; +} + + +/* Lowcode instruction generator dispatch */ + + /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeUnaryInlinePrimitive(sqInt prim) +{ + AbstractInstruction *abstractInstruction; + sqInt address; + sqInt address1; + sqInt alignment; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction25; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction27; + AbstractInstruction *anInstruction28; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction30; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt base; + sqInt base1; + sqInt baseValue; + sqInt baseValue1; + sqInt check; + sqInt checkValue; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump10; + AbstractInstruction * contJump11; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + AbstractInstruction * contJump4; + AbstractInstruction * contJump5; + AbstractInstruction * contJump6; + AbstractInstruction * contJump7; + AbstractInstruction * contJump8; + AbstractInstruction * contJump9; + sqInt dup2; + sqInt dup21; + sqInt dup22; + sqInt dup24; + sqInt dup2High; + sqInt dup2HighValue; + sqInt dup2Low; + sqInt dup2LowValue; + sqInt dup2Value; + sqInt dup2Value1; + sqInt dup2Value2; + sqInt dup2Value4; + sqInt expectedSession; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump10; + AbstractInstruction * falseJump11; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump3; + AbstractInstruction * falseJump4; + AbstractInstruction * falseJump5; + AbstractInstruction * falseJump6; + AbstractInstruction * falseJump7; + AbstractInstruction * falseJump8; + AbstractInstruction * falseJump9; + sqInt first; + sqInt first10; + sqInt first11; + sqInt first12; + sqInt first13; + sqInt first14; + sqInt first15; + sqInt first16; + sqInt first17; + sqInt first18; + sqInt first19; + sqInt first2; + sqInt first20; + sqInt first21; + sqInt first22; + sqInt first23; + sqInt first24; + sqInt first25; + sqInt first4; + sqInt first5; + sqInt first6; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstHigh; + sqInt firstHigh1; + sqInt firstHighValue; + sqInt firstHighValue1; + sqInt firstLow; + sqInt firstLow1; + sqInt firstLowValue; + sqInt firstLowValue1; + sqInt firstValue; + sqInt firstValue10; + sqInt firstValue11; + sqInt firstValue12; + sqInt firstValue13; + sqInt firstValue14; + sqInt firstValue15; + sqInt firstValue16; + sqInt firstValue17; + sqInt firstValue18; + sqInt firstValue19; + sqInt firstValue2; + sqInt firstValue20; + sqInt firstValue21; + sqInt firstValue22; + sqInt firstValue23; + sqInt firstValue24; + sqInt firstValue25; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue6; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt frNext; + sqInt frNext1; + sqInt frNext10; + sqInt frNext11; + sqInt frNext2; + sqInt frNext3; + sqInt frNext4; + sqInt frNext5; + sqInt frNext6; + sqInt frNext7; + sqInt frNext8; + sqInt frNext9; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frTop; + sqInt frTop1; + sqInt frTop10; + sqInt frTop11; + sqInt frTop12; + sqInt frTop13; + sqInt frTop14; + sqInt frTop15; + sqInt frTop16; + sqInt frTop17; + sqInt frTop18; + sqInt frTop19; + sqInt frTop2; + sqInt frTop20; + sqInt frTop21; + sqInt frTop22; + sqInt frTop3; + sqInt frTop4; + sqInt frTop5; + sqInt frTop6; + sqInt frTop7; + sqInt frTop8; + sqInt frTop9; + sqInt function; + sqInt index; + sqInt index1; + sqInt indexValue; + sqInt indexValue1; + sqInt literal; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt nativeValueIndex2; + sqInt nativeValueIndex3; + sqInt nativeValueIndex4; + sqInt newValue; + sqInt newValueValue; + sqInt offset; + sqInt offset1; + sqInt offsetValue; + sqInt offsetValue1; + sqInt oldValue; + sqInt oldValueValue; + sqInt pointerValue; + sqInt pointerValueValue; + sqInt reg; + sqInt reg10; + sqInt reg11; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg16; + sqInt reg17; + sqInt reg18; + sqInt reg19; + sqInt reg2; + sqInt reg20; + sqInt reg21; + sqInt reg22; + sqInt reg23; + sqInt reg24; + sqInt reg25; + sqInt reg26; + sqInt reg27; + sqInt reg28; + sqInt reg29; + sqInt reg3; + sqInt reg5; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerID; + sqInt registerMask; + sqInt registerMask1; + sqInt registerMask2; + sqInt registerMask3; + sqInt registerMask4; + sqInt result; + sqInt result1; + sqInt result2; + sqInt result3; + sqInt result4; + sqInt result5; + sqInt result6; + sqInt result7; + sqInt result8; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue2; + sqInt resultValue3; + sqInt resultValue4; + sqInt resultValue5; + sqInt resultValue6; + sqInt resultValue7; + sqInt resultValue8; + sqInt rNext; + sqInt rNext10; + sqInt rNext12; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext17; + sqInt rNext18; + sqInt rNext19; + sqInt rNext2; + sqInt rNext20; + sqInt rNext21; + sqInt rNext22; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNext2; + sqInt rNextNext3; + sqInt rNextNext4; + sqInt rNextNextNext; + sqInt rNextNextNext1; + sqInt rNextNextNext2; + sqInt rNextNextNext3; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult12; + sqInt rResult13; + sqInt rResult14; + sqInt rResult15; + sqInt rResult16; + sqInt rResult17; + sqInt rResult18; + sqInt rResult19; + sqInt rResult2; + sqInt rResult20; + sqInt rResult21; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop10; + sqInt rTop13; + sqInt rTop15; + sqInt rTop16; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop3; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt scale; + sqInt scale1; + sqInt scaleValue; + sqInt scaleValue1; + sqInt second; + sqInt second10; + sqInt second11; + sqInt second12; + sqInt second13; + sqInt second14; + sqInt second15; + sqInt second16; + sqInt second17; + sqInt second18; + sqInt second19; + sqInt second2; + sqInt second20; + sqInt second21; + sqInt second22; + sqInt second23; + sqInt second24; + sqInt second25; + sqInt second4; + sqInt second5; + sqInt second6; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondHigh; + sqInt secondHigh1; + sqInt secondHighValue; + sqInt secondHighValue1; + sqInt secondLow; + sqInt secondLow1; + sqInt secondLowValue; + sqInt secondLowValue1; + sqInt secondValue; + sqInt secondValue10; + sqInt secondValue11; + sqInt secondValue12; + sqInt secondValue13; + sqInt secondValue14; + sqInt secondValue15; + sqInt secondValue16; + sqInt secondValue17; + sqInt secondValue18; + sqInt secondValue19; + sqInt secondValue2; + sqInt secondValue20; + sqInt secondValue21; + sqInt secondValue22; + sqInt secondValue23; + sqInt secondValue24; + sqInt secondValue25; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue6; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt singleFloatValue; + sqInt singleFloatValueValue; + sqInt size1; + sqInt sizeHigh; + sqInt sizeHighValue; + sqInt sizeLow; + sqInt sizeLowValue; + sqInt sizeValue1; + sqInt topRegistersMask; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask13; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask16; + sqInt topRegistersMask17; + sqInt topRegistersMask18; + sqInt topRegistersMask19; + sqInt topRegistersMask2; + sqInt topRegistersMask20; + sqInt topRegistersMask21; + sqInt topRegistersMask22; + sqInt topRegistersMask23; + sqInt topRegistersMask24; + sqInt topRegistersMask25; + sqInt topRegistersMask26; + sqInt topRegistersMask27; + sqInt topRegistersMask28; + sqInt topRegistersMask29; + sqInt topRegistersMask3; + sqInt topRegistersMask30; + sqInt topRegistersMask31; + sqInt topRegistersMask32; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value17; + sqInt value18; + sqInt value19; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueHigh1; + sqInt valueHighValue; + sqInt valueLow1; + sqInt valueLowValue; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue17; + sqInt valueValue18; + sqInt valueValue19; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + switch (prim) { - case 247: - return genLowcodeZeroExtend64From32(); - - case 0xF8: - return genLowcodeZeroExtend64From8(); + case 0: + /* begin genLowcodeAdd32 */ + topRegistersMask = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; - default: - return EncounteredUnknownBytecode; + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, second, first); + ssPushNativeRegister(first); + return 0; - } - return 0; -} + case 1: + /* begin genLowcodeAdd64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop2 = (rNext2 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop2 == NoReg) { + registerMask = 0; + if (rNext2 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext2; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop2 = allocateRegNotConflictingWith(registerMask); + } + if (rNext2 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop2; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext2 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop2) | (1U << rNext2); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop2) | (1U << rNext2)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop2 == NoReg) + || ((rNext2 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow = rTop2; + secondHigh = rNext2; + firstLow = rNextNext; + firstHigh = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, secondLow, firstLow); + /* begin AddcR:R: */ + genoperandoperand(AddcRR, secondHigh, firstHigh); + ssPushNativeRegistersecondRegister(firstLow, firstHigh); + return 0; -/* Lowcode instruction generator dispatch */ + case 2: + /* begin genLowcodeAlloca32 */ + rTop27 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(0); + } + assert(!((rTop27 == NoReg))); + size1 = rTop27; - /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeUnaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeAdd32(); + nativePopToReg(ssNativeTop(), size1); + ssNativePop(1); + /* begin MoveAw:R: */ + address = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction = genoperandoperand(MoveAwR, address, TempReg); + /* begin SubR:R: */ + genoperandoperand(SubRR, size1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(AndCqR, -16, TempReg); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, size1); + /* begin MoveR:Aw: */ + address1 = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction2 = genoperandoperand(MoveRAw, size1, address1); + ssPushNativeRegister(size1); + return 0; - case 1: - return genLowcodeAdd64(); + case 3: + /* begin genLowcodeAlloca64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask2 = 0; + rTop3 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + sizeLow = rTop3; + sizeHigh = rNext3; - case 2: - return genLowcodeAlloca32(); + nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, sizeLow, SPReg); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, SPReg, sizeLow); + ssPushNativeRegister(sizeLow); - case 3: - return genLowcodeAlloca64(); + return 0; case 4: - return genLowcodeAnd32(); + /* begin genLowcodeAnd32 */ + topRegistersMask3 = 0; + rTop4 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg3; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext4 == NoReg)))); + second2 = rTop4; + first2 = rNext4; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin AndR:R: */ + genoperandoperand(AndRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 5: - return genLowcodeAnd64(); + /* begin genLowcodeAnd64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop5 = (rNext5 = (rNextNext1 = (rNextNextNext1 = NoReg))); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext5 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + nativeValueIndex1 += 1; + } + } + if (rTop5 == NoReg) { + registerMask1 = 0; + if (rNext5 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext5; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rTop5 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext5 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop5; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNext5 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop5) | (1U << rNext5); + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNextNext1 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask1 = ((1U << rTop5) | (1U << rNext5)) | (1U << rNextNext1); + rNextNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop5 == NoReg) + || ((rNext5 == NoReg) + || ((rNextNext1 == NoReg) + || (rNextNextNext1 == NoReg)))))); + secondLow1 = rTop5; + secondHigh1 = rNext5; + firstLow1 = rNextNext1; + firstHigh1 = rNextNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), secondLow1, secondHigh1); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow1, firstHigh1); + ssNativePop(1); + /* begin AndR:R: */ + genoperandoperand(AndRR, secondLow1, firstLow1); + /* begin AndR:R: */ + genoperandoperand(AndRR, secondHigh1, firstHigh1); + ssPushNativeRegistersecondRegister(firstLow1, firstHigh1); + + return 0; case 6: - return genLowcodeArithmeticRightShift32(); + /* begin genLowcodeArithmeticRightShift32 */ + topRegistersMask5 = 0; + rTop6 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1U << reg5; + } + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1U << rTop6); + } + assert(!(((rTop6 == NoReg) + || (rNext6 == NoReg)))); + shiftAmount = rTop6; + value = rNext6; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin ArithmeticShiftRightR:R: */ + genoperandoperand(ArithmeticShiftRightRR, shiftAmount, value); + ssPushNativeRegister(value); + return 0; case 7: - return genLowcodeArithmeticRightShift64(); + /* begin genLowcodeArithmeticRightShift64 */ + topRegistersMask6 = 0; + rTop7 = (rNext7 = NoReg); + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop7 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext7 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg6; + } + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1U << rTop7); + } + assert(!(((rTop7 == NoReg) + || (rNext7 == NoReg)))); + rResult = allocateFloatRegNotConflictingWith((1U << rTop7) | (1U << rNext7)); + assert(!((rResult == NoReg))); + shiftAmount1 = rTop7; + value1 = rNext7; + result = rResult; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + abort(); + return 0; case 8: - return genLowcodeBeginCall(); + /* begin genLowcodeBeginCall */ + alignment = extA; + beginHighLevelCall(alignment); + extA = 0; + return 0; case 9: - return genLowcodeCallArgumentFloat32(); + /* begin genLowcodeCallArgumentFloat32 */ + nativeStackPopToReg(ssNativeTop(), DPFPReg0); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + literal = -BytesPerWord; + anInstruction3 = genoperandoperandoperand(MoveRsM32r, DPFPReg0, -BytesPerWord, SPReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(SubCqR, BytesPerWord, SPReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 10: - return genLowcodeCallArgumentFloat64(); + /* begin genLowcodeCallArgumentFloat64 */ + nativeStackPopToReg(ssNativeTop(), DPFPReg0); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperandoperand(MoveRdM64r, DPFPReg0, -8, SPReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperand(SubCqR, 8, SPReg); + currentCallCleanUpSize += 8; + return 0; case 11: - return genLowcodeCallArgumentInt32(); + /* begin genLowcodeCallArgumentInt32 */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 12: - return genLowcodeCallArgumentInt64(); + /* begin genLowcodeCallArgumentInt64 */ + nativeStackPopToRegsecondReg(ssNativeTop(), TempReg, ReceiverResultReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + /* begin PushR: */ + genoperand(PushR, ReceiverResultReg); + currentCallCleanUpSize += 8; + + return 0; case 13: - return genLowcodeCallArgumentPointer(); + /* begin genLowcodeCallArgumentPointer */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 14: - return genLowcodeCallArgumentSpace(); + /* begin genLowcodeCallArgumentSpace */ + anInstruction7 = genoperandoperand(SubCqR, extA, SPReg); + currentCallCleanUpSize += extA; + extA = 0; + return 0; case 15: - return genLowcodeCallArgumentStructure(); + /* begin genLowcodeCallArgumentStructure */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperand(SubCqR, extA, SPReg); + + /* Copy the structure */ + currentCallCleanUpSize += extA; + genMemCopytoconstantSize(backEnd, TempReg, SPReg, extA); + extA = 0; + return 0; case 16: - return genLowcodeCallInstruction(); + /* begin genLowcodeCallInstruction */ + function = extA; + /* begin CallRT: */ + abstractInstruction = genoperand(Call, function); + (abstractInstruction->annotation = IsRelativeCall); + extA = 0; + return 0; case 17: - return genLowcodeCallPhysical(); + /* begin genLowcodeCallPhysical */ + registerID = extA; + /* begin CallR: */ + genoperand(CallR, registerID); + extA = 0; + return 0; case 18: - return genLowcodeCheckSessionIdentifier(); + /* begin genLowcodeCheckSessionIdentifier */ + expectedSession = extA; + ssPushNativeConstantInt32((expectedSession == (getThisSessionID()) + ? 1 + : 0)); + extA = 0; + return 0; case 19: - return genLowcodeCompareAndSwap32(); + /* begin genLowcodeCompareAndSwap32 */ + rTop8 = (rNext8 = (rNextNext2 = NoReg)); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext8 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + } + if (rTop8 == NoReg) { + registerMask2 = 0; + if (rNext8 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rNext8; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rTop8 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext8 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rTop8; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rNext8 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1U << rTop8) | (1U << rNext8); + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop8 == NoReg) + || ((rNext8 == NoReg) + || (rNextNext2 == NoReg))))); + rResult1 = allocateRegNotConflictingWith(((1U << rTop8) | (1U << rNext8)) | (1U << rNextNext2)); + assert(!((rResult1 == NoReg))); + newValue = rTop8; + oldValue = rNext8; + check = rNextNext2; + value2 = rResult1; + + nativePopToReg(ssNativeTop(), newValue); + ssNativePop(1); + nativePopToReg(ssNativeTop(), oldValue); + ssNativePop(1); + nativePopToReg(ssNativeTop(), check); + ssNativePop(1); + abort(); + return 0; case 20: - return genLowcodeDiv32(); + /* begin genLowcodeDiv32 */ + topRegistersMask7 = 0; + rTop9 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1U << reg7; + } + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop9); + } + assert(!(((rTop9 == NoReg) + || (rNext9 == NoReg)))); + second4 = rTop9; + first4 = rNext9; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + gDivRRQuoRem(second4, first4, first4, second4); + ssPushNativeRegister(first4); + return 0; case 21: - return genLowcodeDiv64(); + /* begin genLowcodeDiv64 */ + topRegistersMask8 = 0; + rTop10 = (rNext10 = NoReg); + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg8; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext10 == NoReg)))); + rResult2 = allocateFloatRegNotConflictingWith((1U << rTop10) | (1U << rNext10)); + assert(!((rResult2 == NoReg))); + second5 = rTop10; + first5 = rNext10; + result1 = rResult2; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + abort(); + return 0; case 22: - return genLowcodeDuplicateFloat32(); + /* begin genLowcodeDuplicateFloat32 */ + frTop = NoReg; + + /* Float argument */ + frResult = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(1U << frTop); + assert(!(((frTop == NoReg) + || (frResult == NoReg)))); + value3 = frTop; + dup2 = frResult; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin MoveRs:Rs: */ + genoperandoperand(MoveRsRs, value3, dup2); + ssPushNativeRegisterSingleFloat(value3); + ssPushNativeRegisterSingleFloat(dup2); + return 0; case 23: - return genLowcodeDuplicateFloat64(); + /* begin genLowcodeDuplicateFloat64 */ + frTop1 = NoReg; + + /* Float argument */ + frResult1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(1U << frTop1); + assert(!(((frTop1 == NoReg) + || (frResult1 == NoReg)))); + value4 = frTop1; + dup21 = frResult1; + + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + /* begin MoveRd:Rd: */ + genoperandoperand(MoveRdRd, value4, dup21); + ssPushNativeRegisterDoubleFloat(value4); + ssPushNativeRegisterDoubleFloat(dup21); + return 0; case 24: - return genLowcodeDuplicateInt32(); + /* begin genLowcodeDuplicateInt32 */ + rTop13 = NoReg; + rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop13 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop13 == NoReg) { + rTop13 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rTop13); + assert(!(((rTop13 == NoReg) + || (rResult3 == NoReg)))); + value5 = rTop13; + dup22 = rResult3; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value5, dup22); + ssPushNativeRegister(value5); + ssPushNativeRegister(dup22); + return 0; case 25: - return genLowcodeDuplicateInt64(); + /* begin genLowcodeDuplicateInt64 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger2: */ + topRegistersMask9 = 0; + rTop15 = (rNext12 = NoReg); + rResult4 = (rResult21 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop15 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext12 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0)); + if (rNext12 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext12 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1U << reg9; + } + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext12 == NoReg) { + rNext12 = allocateRegNotConflictingWith(1U << rTop15); + } + assert(!(((rTop15 == NoReg) + || (rNext12 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop15) | (1U << rNext12)); + rResult21 = allocateFloatRegNotConflictingWith(((1U << rTop15) | (1U << rNext12)) | (1U << rResult4)); + assert(!(((rResult4 == NoReg) + || (rResult21 == NoReg)))); + valueLow1 = rTop15; + valueHigh1 = rNext12; + dup2Low = rResult4; + dup2High = rResult21; + + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, valueLow1, dup2Low); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, valueHigh1, dup2High); + ssPushNativeRegistersecondRegister(valueLow1, valueHigh1); + ssPushNativeRegistersecondRegister(dup2Low, dup2High); + + return 0; case 26: - return genLowcodeDuplicatePointer(); + /* begin genLowcodeDuplicatePointer */ + rTop16 = NoReg; + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop16 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(0); + } + rResult5 = allocateRegNotConflictingWith(1U << rTop16); + assert(!(((rTop16 == NoReg) + || (rResult5 == NoReg)))); + pointerValue = rTop16; + dup24 = rResult5; + + nativePopToReg(ssNativeTop(), pointerValue); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointerValue, dup24); + ssPushNativeRegister(pointerValue); + ssPushNativeRegister(dup24); + return 0; case 27: - return genLowcodeEffectiveAddress32(); + /* begin genLowcodeEffectiveAddress32 */ + rTop17 = (rNext13 = (rNextNext3 = (rNextNextNext2 = NoReg))); + nativeValueIndex3 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop17 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNext13 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + nativeValueIndex3 += 1; + } + } + if (rTop17 == NoReg) { + registerMask3 = 0; + if (rNext13 != NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rNext13; + } + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNextNext2); + } + rTop17 = allocateRegNotConflictingWith(registerMask3); + } + if (rNext13 == NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rTop17; + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNextNext2); + } + rNext13 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNext3 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask3 = (1U << rTop17) | (1U << rNext13); + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNextNext2); + } + rNextNext3 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNextNext2 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask3 = ((1U << rTop17) | (1U << rNext13)) | (1U << rNextNext3); + rNextNextNext2 = allocateRegNotConflictingWith(registerMask3); + } + assert(!(((rTop17 == NoReg) + || ((rNext13 == NoReg) + || ((rNextNext3 == NoReg) + || (rNextNextNext2 == NoReg)))))); + offset = rTop17; + scale = rNext13; + index = rNextNext3; + base = rNextNextNext2; + + nativePopToReg(ssNativeTop(), offset); + ssNativePop(1); + nativePopToReg(ssNativeTop(), scale); + ssNativePop(1); + nativePopToReg(ssNativeTop(), index); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, scale, index); + /* begin AddR:R: */ + genoperandoperand(AddRR, index, base); + /* begin AddR:R: */ + genoperandoperand(AddRR, offset, base); + ssPushNativeRegister(base); + return 0; case 28: - return genLowcodeEffectiveAddress64(); + /* begin genLowcodeEffectiveAddress64 */ + rTop18 = (rNext14 = (rNextNext4 = (rNextNextNext3 = NoReg))); + rResult6 = NoReg; + nativeValueIndex4 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNext14 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNext4 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + } + nativeValueIndex4 += 1; + } + } + if (rNextNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNext4 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNextNext3 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4)); + } + nativeValueIndex4 += 1; + } + } + if (rNextNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + nativeValueIndex4 += 1; + } + } + if (rTop18 == NoReg) { + registerMask4 = 0; + if (rNext14 != NoReg) { + /* begin registerMaskFor: */ + registerMask4 = 1U << rNext14; + } + if (rNextNext4 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNext4); + } + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNextNext3); + } + rTop18 = allocateRegNotConflictingWith(registerMask4); + } + if (rNext14 == NoReg) { + /* begin registerMaskFor: */ + registerMask4 = 1U << rTop18; + if (rNextNext4 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNext4); + } + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNextNext3); + } + rNext14 = allocateRegNotConflictingWith(registerMask4); + } + if (rNextNext4 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask4 = (1U << rTop18) | (1U << rNext14); + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNextNext3); + } + rNextNext4 = allocateRegNotConflictingWith(registerMask4); + } + if (rNextNextNext3 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask4 = ((1U << rTop18) | (1U << rNext14)) | (1U << rNextNext4); + rNextNextNext3 = allocateRegNotConflictingWith(registerMask4); + } + assert(!(((rTop18 == NoReg) + || ((rNext14 == NoReg) + || ((rNextNext4 == NoReg) + || (rNextNextNext3 == NoReg)))))); + rResult6 = allocateRegNotConflictingWith((((1U << rTop18) | (1U << rNext14)) | (1U << rNextNext4)) | (1U << rNextNextNext3)); + offset1 = rTop18; + scale1 = rNext14; + index1 = rNextNext4; + base1 = rNextNextNext3; + result2 = rResult6; + + nativePopToReg(ssNativeTop(), offset1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), scale1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), index1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base1); + ssNativePop(1); + abort(); + return 0; case 29: - return genLowcodeEndCall(); + /* begin genLowcodeEndCall */ + endHighLevelCallWithCleanup(); + return 0; case 30: - return genLowcodeEndCallNoCleanup(); + /* begin genLowcodeEndCallNoCleanup */ + endHighLevelCallWithoutCleanup(); + return 0; case 0x1F: - return genLowcodeFloat32Add(); + /* begin genLowcodeFloat32Add */ + topRegistersMask10 = 0; + rTop19 = (rNext15 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext15 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask10 = 1U << reg10; + } + if (rTop19 == NoReg) { + rTop19 = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + if (rNext15 == NoReg) { + rNext15 = allocateFloatRegNotConflictingWith(1U << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext15 == NoReg)))); + second6 = rTop19; + first6 = rNext15; + + nativePopToReg(ssNativeTop(), second6); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first6); + ssNativePop(1); + /* begin AddRs:Rs: */ + genoperandoperand(AddRsRs, second6, first6); + ssPushNativeRegisterSingleFloat(first6); + return 0; case 32: - return genLowcodeFloat32Div(); + /* begin genLowcodeFloat32Div */ + topRegistersMask11 = 0; + rTop20 = (rNext16 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg11 = (rNext16 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1U << reg11; + } + if (rTop20 == NoReg) { + rTop20 = allocateFloatRegNotConflictingWith(topRegistersMask11); + } + if (rNext16 == NoReg) { + rNext16 = allocateFloatRegNotConflictingWith(1U << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext16 == NoReg)))); + second7 = rTop20; + first7 = rNext16; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + /* begin DivRs:Rs: */ + genoperandoperand(DivRsRs, second7, first7); + ssPushNativeRegisterSingleFloat(first7); + return 0; case 33: - return genLowcodeFloat32Equal(); + /* begin genLowcodeFloat32Equal */ + topRegistersMask12 = 0; + frTop2 = (frNext = NoReg); + rResult7 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (frNext = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1U << reg12; + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(topRegistersMask12); + } + if (frNext == NoReg) { + frNext = allocateFloatRegNotConflictingWith(1U << frTop2); + } + rResult7 = allocateRegNotConflictingWith(0); + assert(!(((frTop2 == NoReg) + || ((frNext == NoReg) + || (rResult7))))); + second8 = frTop2; + first8 = frNext; + value7 = rResult7; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second8, first8); + + /* True result */ + falseJump = gJumpFPNotEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperand(MoveCqR, 1, value7); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperand(MoveCqR, 0, value7); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value7); + return 0; case 34: - return genLowcodeFloat32Great(); + /* begin genLowcodeFloat32Great */ + topRegistersMask13 = 0; + frTop3 = (frNext1 = NoReg); + rResult8 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (frNext1 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1U << reg13; + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(topRegistersMask13); + } + if (frNext1 == NoReg) { + frNext1 = allocateFloatRegNotConflictingWith(1U << frTop3); + } + rResult8 = allocateRegNotConflictingWith(0); + assert(!(((frTop3 == NoReg) + || ((frNext1 == NoReg) + || (rResult8))))); + second9 = frTop3; + first9 = frNext1; + value8 = rResult8; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second9, first9); + + /* True result */ + falseJump1 = gJumpFPLessOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperand(MoveCqR, 1, value8); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperand(MoveCqR, 0, value8); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value8); + return 0; case 35: - return genLowcodeFloat32GreatEqual(); + /* begin genLowcodeFloat32GreatEqual */ + topRegistersMask14 = 0; + frTop4 = (frNext2 = NoReg); + rResult9 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop4 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (frNext2 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1U << reg14; + } + if (frTop4 == NoReg) { + frTop4 = allocateFloatRegNotConflictingWith(topRegistersMask14); + } + if (frNext2 == NoReg) { + frNext2 = allocateFloatRegNotConflictingWith(1U << frTop4); + } + rResult9 = allocateRegNotConflictingWith(0); + assert(!(((frTop4 == NoReg) + || ((frNext2 == NoReg) + || (rResult9))))); + second10 = frTop4; + first10 = frNext2; + value9 = rResult9; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second10, first10); + + /* True result */ + falseJump2 = gJumpFPLess(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperand(MoveCqR, 1, value9); + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperand(MoveCqR, 0, value9); + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value9); + return 0; case 36: - return genLowcodeFloat32Less(); + /* begin genLowcodeFloat32Less */ + topRegistersMask15 = 0; + frTop5 = (frNext3 = NoReg); + rResult10 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop5 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (frNext3 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1U << reg15; + } + if (frTop5 == NoReg) { + frTop5 = allocateFloatRegNotConflictingWith(topRegistersMask15); + } + if (frNext3 == NoReg) { + frNext3 = allocateFloatRegNotConflictingWith(1U << frTop5); + } + rResult10 = allocateRegNotConflictingWith(0); + assert(!(((frTop5 == NoReg) + || ((frNext3 == NoReg) + || (rResult10))))); + second11 = frTop5; + first11 = frNext3; + value10 = rResult10; + + nativePopToReg(ssNativeTop(), second11); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first11); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second11, first11); + + /* True result */ + falseJump3 = gJumpFPGreaterOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperand(MoveCqR, 1, value10); + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCqR, 0, value10); + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value10); + return 0; case 37: - return genLowcodeFloat32LessEqual(); + /* begin genLowcodeFloat32LessEqual */ + topRegistersMask16 = 0; + frTop6 = (frNext4 = NoReg); + rResult12 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop6 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg16 = (frNext4 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask16 = 1U << reg16; + } + if (frTop6 == NoReg) { + frTop6 = allocateFloatRegNotConflictingWith(topRegistersMask16); + } + if (frNext4 == NoReg) { + frNext4 = allocateFloatRegNotConflictingWith(1U << frTop6); + } + rResult12 = allocateRegNotConflictingWith(0); + assert(!(((frTop6 == NoReg) + || ((frNext4 == NoReg) + || (rResult12))))); + second12 = frTop6; + first12 = frNext4; + value11 = rResult12; + + nativePopToReg(ssNativeTop(), second12); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first12); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second12, first12); + + /* True result */ + falseJump4 = gJumpFPGreater(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(MoveCqR, 1, value11); + /* begin Jump: */ + contJump4 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperand(MoveCqR, 0, value11); + jmpTarget(contJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value11); + return 0; case 38: - return genLowcodeFloat32Mul(); + /* begin genLowcodeFloat32Mul */ + topRegistersMask17 = 0; + rTop21 = (rNext17 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg17 = (rNext17 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask17 = 1U << reg17; + } + if (rTop21 == NoReg) { + rTop21 = allocateFloatRegNotConflictingWith(topRegistersMask17); + } + if (rNext17 == NoReg) { + rNext17 = allocateFloatRegNotConflictingWith(1U << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext17 == NoReg)))); + second13 = rTop21; + first13 = rNext17; + + nativePopToReg(ssNativeTop(), second13); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first13); + ssNativePop(1); + /* begin MulRs:Rs: */ + genoperandoperand(MulRsRs, second13, first13); + ssPushNativeRegisterSingleFloat(first13); + return 0; case 39: - return genLowcodeFloat32Neg(); + /* begin genLowcodeFloat32Neg */ + frTop7 = NoReg; + + /* Float argument */ + frResult2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop7 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop7 == NoReg) { + frTop7 = allocateFloatRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(1U << frTop7); + assert(!(((frTop7 == NoReg) + || (frResult2 == NoReg)))); + value12 = frTop7; + result3 = frResult2; + + nativePopToReg(ssNativeTop(), value12); + ssNativePop(1); + /* begin XorRs:Rs: */ + genoperandoperand(XorRsRs, result3, result3); + /* begin SubRs:Rs: */ + genoperandoperand(SubRsRs, value12, result3); + ssPushNativeRegisterSingleFloat(result3); + return 0; case 40: - return genLowcodeFloat32NotEqual(); + /* begin genLowcodeFloat32NotEqual */ + topRegistersMask18 = 0; + frTop8 = (frNext5 = NoReg); + rResult13 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop8 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg18 = (frNext5 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask18 = 1U << reg18; + } + if (frTop8 == NoReg) { + frTop8 = allocateFloatRegNotConflictingWith(topRegistersMask18); + } + if (frNext5 == NoReg) { + frNext5 = allocateFloatRegNotConflictingWith(1U << frTop8); + } + rResult13 = allocateRegNotConflictingWith(0); + assert(!(((frTop8 == NoReg) + || ((frNext5 == NoReg) + || (rResult13))))); + second14 = frTop8; + first14 = frNext5; + value13 = rResult13; + + nativePopToReg(ssNativeTop(), second14); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first14); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second14, first14); + + /* True result */ + falseJump5 = gJumpFPEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperand(MoveCqR, 1, value13); + /* begin Jump: */ + contJump5 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperand(MoveCqR, 0, value13); + jmpTarget(contJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value13); + return 0; case 41: - return genLowcodeFloat32Sqrt(); + /* begin genLowcodeFloat32Sqrt */ + topRegistersMask19 = 0; + frTop9 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop9 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop9 == NoReg) { + frTop9 = allocateFloatRegNotConflictingWith(topRegistersMask19); + } + assert(!((frTop9 == NoReg))); + value14 = frTop9; + + nativePopToReg(ssNativeTop(), value14); + ssNativePop(1); + /* begin SqrtRs: */ + genoperand(SqrtRs, value14); + ssPushNativeRegisterSingleFloat(value14); + return 0; case 42: - return genLowcodeFloat32Sub(); + /* begin genLowcodeFloat32Sub */ + topRegistersMask20 = 0; + rTop22 = (rNext18 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop22 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg19 = (rNext18 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask20 = 1U << reg19; + } + if (rTop22 == NoReg) { + rTop22 = allocateFloatRegNotConflictingWith(topRegistersMask20); + } + if (rNext18 == NoReg) { + rNext18 = allocateFloatRegNotConflictingWith(1U << rTop22); + } + assert(!(((rTop22 == NoReg) + || (rNext18 == NoReg)))); + second15 = rTop22; + first15 = rNext18; + + nativePopToReg(ssNativeTop(), second15); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first15); + ssNativePop(1); + /* begin SubRs:Rs: */ + genoperandoperand(SubRsRs, second15, first15); + ssPushNativeRegisterSingleFloat(first15); + return 0; case 43: - return genLowcodeFloat32ToFloat64(); + /* begin genLowcodeFloat32ToFloat64 */ + topRegistersMask21 = 0; + frTop10 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop10 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop10 == NoReg) { + frTop10 = allocateFloatRegNotConflictingWith(topRegistersMask21); + } + assert(!((frTop10 == NoReg))); + singleFloatValue = frTop10; + + nativePopToReg(ssNativeTop(), singleFloatValue); + ssNativePop(1); + /* begin ConvertRs:Rd: */ + genoperandoperand(ConvertRsRd, singleFloatValue, singleFloatValue); + ssPushNativeRegisterDoubleFloat(singleFloatValue); + return 0; case 44: - return genLowcodeFloat32ToInt32(); + /* begin genLowcodeFloat32ToInt32 */ + frTop11 = NoReg; + + /* Float argument */ + rResult14 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop11 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop11 == NoReg) { + frTop11 = allocateFloatRegNotConflictingWith(0); + } + rResult14 = allocateRegNotConflictingWith(0); + assert(!(((frTop11 == NoReg) + || (rResult14 == NoReg)))); + value15 = frTop11; + result4 = rResult14; + + nativePopToReg(ssNativeTop(), value15); + ssNativePop(1); + /* begin ConvertRs:R: */ + genoperandoperand(ConvertRsR, value15, result4); + ssPushNativeRegister(result4); + return 0; case 45: - return genLowcodeFloat32ToInt64(); + /* begin genLowcodeFloat32ToInt64 */ + frTop12 = NoReg; + + /* Float argument */ + rResult15 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop12 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop12 == NoReg) { + frTop12 = allocateFloatRegNotConflictingWith(0); + } + rResult15 = allocateRegNotConflictingWith(0); + assert(!(((frTop12 == NoReg) + || (rResult15 == NoReg)))); + value16 = frTop12; + result5 = rResult15; + + nativePopToReg(ssNativeTop(), value16); + ssNativePop(1); + abort(); + return 0; case 46: - return genLowcodeFloat32ToUInt32(); + /* begin genLowcodeFloat32ToUInt32 */ + frTop13 = NoReg; + + /* Float argument */ + rResult16 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop13 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop13 == NoReg) { + frTop13 = allocateFloatRegNotConflictingWith(0); + } + rResult16 = allocateRegNotConflictingWith(0); + assert(!(((frTop13 == NoReg) + || (rResult16 == NoReg)))); + value17 = frTop13; + result6 = rResult16; + + nativePopToReg(ssNativeTop(), value17); + ssNativePop(1); + /* begin ConvertRs:R: */ + genoperandoperand(ConvertRsR, value17, result6); + ssPushNativeRegister(result6); + return 0; case 47: - return genLowcodeFloat32ToUInt64(); + /* begin genLowcodeFloat32ToUInt64 */ + frTop14 = NoReg; + + /* Float argument */ + rResult17 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop14 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop14 == NoReg) { + frTop14 = allocateFloatRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(0); + assert(!(((frTop14 == NoReg) + || (rResult17 == NoReg)))); + value18 = frTop14; + result7 = rResult17; + + nativePopToReg(ssNativeTop(), value18); + ssNativePop(1); + abort(); + return 0; case 48: - return genLowcodeFloat64Add(); + /* begin genLowcodeFloat64Add */ + topRegistersMask22 = 0; + rTop23 = (rNext19 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg20 = (rNext19 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask22 = 1U << reg20; + } + if (rTop23 == NoReg) { + rTop23 = allocateFloatRegNotConflictingWith(topRegistersMask22); + } + if (rNext19 == NoReg) { + rNext19 = allocateFloatRegNotConflictingWith(1U << rTop23); + } + assert(!(((rTop23 == NoReg) + || (rNext19 == NoReg)))); + second16 = rTop23; + first16 = rNext19; + + nativePopToReg(ssNativeTop(), second16); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first16); + ssNativePop(1); + /* begin AddRd:Rd: */ + genoperandoperand(AddRdRd, second16, first16); + ssPushNativeRegisterDoubleFloat(first16); + return 0; case 49: - return genLowcodeFloat64Div(); + /* begin genLowcodeFloat64Div */ + topRegistersMask23 = 0; + rTop24 = (rNext20 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg21 = (rNext20 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask23 = 1U << reg21; + } + if (rTop24 == NoReg) { + rTop24 = allocateFloatRegNotConflictingWith(topRegistersMask23); + } + if (rNext20 == NoReg) { + rNext20 = allocateFloatRegNotConflictingWith(1U << rTop24); + } + assert(!(((rTop24 == NoReg) + || (rNext20 == NoReg)))); + second17 = rTop24; + first17 = rNext20; + + nativePopToReg(ssNativeTop(), second17); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first17); + ssNativePop(1); + /* begin DivRd:Rd: */ + genoperandoperand(DivRdRd, second17, first17); + ssPushNativeRegisterDoubleFloat(first17); + return 0; case 50: - return genLowcodeFloat64Equal(); + /* begin genLowcodeFloat64Equal */ + topRegistersMask24 = 0; + frTop15 = (frNext6 = NoReg); + rResult18 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop15 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg22 = (frNext6 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask24 = 1U << reg22; + } + if (frTop15 == NoReg) { + frTop15 = allocateFloatRegNotConflictingWith(topRegistersMask24); + } + if (frNext6 == NoReg) { + frNext6 = allocateFloatRegNotConflictingWith(1U << frTop15); + } + rResult18 = allocateRegNotConflictingWith(0); + assert(!(((frTop15 == NoReg) + || ((frNext6 == NoReg) + || (rResult18))))); + second18 = frTop15; + first18 = frNext6; + value19 = rResult18; + + nativePopToReg(ssNativeTop(), second18); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first18); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second18, first18); + + /* True result */ + falseJump6 = gJumpFPNotEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction21 = genoperandoperand(MoveCqR, 1, value19); + /* begin Jump: */ + contJump6 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperand(MoveCqR, 0, value19); + jmpTarget(contJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value19); + return 0; case 51: - return genLowcodeFloat64Great(); + /* begin genLowcodeFloat64Great */ + topRegistersMask25 = 0; + frTop16 = (frNext7 = NoReg); + rResult19 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop16 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg23 = (frNext7 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask25 = 1U << reg23; + } + if (frTop16 == NoReg) { + frTop16 = allocateFloatRegNotConflictingWith(topRegistersMask25); + } + if (frNext7 == NoReg) { + frNext7 = allocateFloatRegNotConflictingWith(1U << frTop16); + } + rResult19 = allocateRegNotConflictingWith(0); + assert(!(((frTop16 == NoReg) + || ((frNext7 == NoReg) + || (rResult19))))); + second19 = frTop16; + first19 = frNext7; + value20 = rResult19; + + nativePopToReg(ssNativeTop(), second19); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first19); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second19, first19); + + /* True result */ + falseJump7 = gJumpFPLessOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperand(MoveCqR, 1, value20); + /* begin Jump: */ + contJump7 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(MoveCqR, 0, value20); + jmpTarget(contJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value20); + return 0; case 52: - return genLowcodeFloat64GreatEqual(); + /* begin genLowcodeFloat64GreatEqual */ + topRegistersMask26 = 0; + frTop17 = (frNext8 = NoReg); + rResult20 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop17 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg24 = (frNext8 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask26 = 1U << reg24; + } + if (frTop17 == NoReg) { + frTop17 = allocateFloatRegNotConflictingWith(topRegistersMask26); + } + if (frNext8 == NoReg) { + frNext8 = allocateFloatRegNotConflictingWith(1U << frTop17); + } + rResult20 = allocateRegNotConflictingWith(0); + assert(!(((frTop17 == NoReg) + || ((frNext8 == NoReg) + || (rResult20))))); + second20 = frTop17; + first20 = frNext8; + value21 = rResult20; + + nativePopToReg(ssNativeTop(), second20); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first20); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second20, first20); + + /* True result */ + falseJump8 = gJumpFPLess(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction25 = genoperandoperand(MoveCqR, 1, value21); + /* begin Jump: */ + contJump8 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump8, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperand(MoveCqR, 0, value21); + jmpTarget(contJump8, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value21); + return 0; case 53: - return genLowcodeFloat64Less(); + /* begin genLowcodeFloat64Less */ + topRegistersMask27 = 0; + frTop18 = (frNext9 = NoReg); + rResult22 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop18 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg25 = (frNext9 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask27 = 1U << reg25; + } + if (frTop18 == NoReg) { + frTop18 = allocateFloatRegNotConflictingWith(topRegistersMask27); + } + if (frNext9 == NoReg) { + frNext9 = allocateFloatRegNotConflictingWith(1U << frTop18); + } + rResult22 = allocateRegNotConflictingWith(0); + assert(!(((frTop18 == NoReg) + || ((frNext9 == NoReg) + || (rResult22))))); + second21 = frTop18; + first21 = frNext9; + value22 = rResult22; + + nativePopToReg(ssNativeTop(), second21); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first21); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second21, first21); + + /* True result */ + falseJump9 = gJumpFPGreaterOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction27 = genoperandoperand(MoveCqR, 1, value22); + /* begin Jump: */ + contJump9 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump9, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction28 = genoperandoperand(MoveCqR, 0, value22); + jmpTarget(contJump9, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value22); + return 0; case 54: - return genLowcodeFloat64LessEqual(); + /* begin genLowcodeFloat64LessEqual */ + topRegistersMask28 = 0; + frTop19 = (frNext10 = NoReg); + rResult23 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop19 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg26 = (frNext10 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask28 = 1U << reg26; + } + if (frTop19 == NoReg) { + frTop19 = allocateFloatRegNotConflictingWith(topRegistersMask28); + } + if (frNext10 == NoReg) { + frNext10 = allocateFloatRegNotConflictingWith(1U << frTop19); + } + rResult23 = allocateRegNotConflictingWith(0); + assert(!(((frTop19 == NoReg) + || ((frNext10 == NoReg) + || (rResult23))))); + second22 = frTop19; + first22 = frNext10; + value23 = rResult23; + + nativePopToReg(ssNativeTop(), second22); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first22); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second22, first22); + + /* True result */ + falseJump10 = gJumpFPGreater(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperand(MoveCqR, 1, value23); + /* begin Jump: */ + contJump10 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump10, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction30 = genoperandoperand(MoveCqR, 0, value23); + jmpTarget(contJump10, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value23); + return 0; case 55: - return genLowcodeFloat64Mul(); + /* begin genLowcodeFloat64Mul */ + topRegistersMask29 = 0; + rTop25 = (rNext21 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg27 = (rNext21 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask29 = 1U << reg27; + } + if (rTop25 == NoReg) { + rTop25 = allocateFloatRegNotConflictingWith(topRegistersMask29); + } + if (rNext21 == NoReg) { + rNext21 = allocateFloatRegNotConflictingWith(1U << rTop25); + } + assert(!(((rTop25 == NoReg) + || (rNext21 == NoReg)))); + second23 = rTop25; + first23 = rNext21; + + nativePopToReg(ssNativeTop(), second23); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first23); + ssNativePop(1); + /* begin MulRd:Rd: */ + genoperandoperand(MulRdRd, second23, first23); + ssPushNativeRegisterDoubleFloat(first23); + return 0; case 56: - return genLowcodeFloat64Neg(); + /* begin genLowcodeFloat64Neg */ + frTop20 = NoReg; + + /* Float argument */ + frResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop20 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop20 == NoReg) { + frTop20 = allocateFloatRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(1U << frTop20); + assert(!(((frTop20 == NoReg) + || (frResult3 == NoReg)))); + value24 = frTop20; + result8 = frResult3; + + nativePopToReg(ssNativeTop(), value24); + ssNativePop(1); + /* begin XorRd:Rd: */ + genoperandoperand(XorRdRd, result8, result8); + /* begin SubRd:Rd: */ + genoperandoperand(SubRdRd, value24, result8); + ssPushNativeRegisterDoubleFloat(result8); + return 0; case 57: - return genLowcodeFloat64NotEqual(); + /* begin genLowcodeFloat64NotEqual */ + topRegistersMask30 = 0; + frTop21 = (frNext11 = NoReg); + rResult24 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop21 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg28 = (frNext11 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask30 = 1U << reg28; + } + if (frTop21 == NoReg) { + frTop21 = allocateFloatRegNotConflictingWith(topRegistersMask30); + } + if (frNext11 == NoReg) { + frNext11 = allocateFloatRegNotConflictingWith(1U << frTop21); + } + rResult24 = allocateRegNotConflictingWith(0); + assert(!(((frTop21 == NoReg) + || ((frNext11 == NoReg) + || (rResult24))))); + second24 = frTop21; + first24 = frNext11; + value25 = rResult24; + + nativePopToReg(ssNativeTop(), second24); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first24); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second24, first24); + + /* True result */ + falseJump11 = gJumpFPEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperand(MoveCqR, 1, value25); + /* begin Jump: */ + contJump11 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump11, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperand(MoveCqR, 0, value25); + jmpTarget(contJump11, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value25); + return 0; case 58: - return genLowcodeFloat64Sqrt(); + /* begin genLowcodeFloat64Sqrt */ + topRegistersMask31 = 0; + frTop22 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop22 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop22 == NoReg) { + frTop22 = allocateFloatRegNotConflictingWith(topRegistersMask31); + } + assert(!((frTop22 == NoReg))); + value26 = frTop22; + + nativePopToReg(ssNativeTop(), value26); + ssNativePop(1); + /* begin SqrtRd: */ + genoperand(SqrtRd, value26); + ssPushNativeRegisterDoubleFloat(value26); + return 0; case 59: - return genLowcodeFloat64Sub(); + /* begin genLowcodeFloat64Sub */ + topRegistersMask32 = 0; + rTop26 = (rNext22 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop26 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg29 = (rNext22 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask32 = 1U << reg29; + } + if (rTop26 == NoReg) { + rTop26 = allocateFloatRegNotConflictingWith(topRegistersMask32); + } + if (rNext22 == NoReg) { + rNext22 = allocateFloatRegNotConflictingWith(1U << rTop26); + } + assert(!(((rTop26 == NoReg) + || (rNext22 == NoReg)))); + second25 = rTop26; + first25 = rNext22; + + nativePopToReg(ssNativeTop(), second25); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first25); + ssNativePop(1); + /* begin SubRd:Rd: */ + genoperandoperand(SubRdRd, second25, first25); + ssPushNativeRegisterDoubleFloat(first25); + return 0; default: return genLowcodeUnaryInlinePrimitive2(prim); @@ -37530,340 +38382,6 @@ genLowcodeUnaryInlinePrimitive(sqInt prim) return 0; } - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnlockVM */ -static sqInt -genLowcodeUnlockVM(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnpin */ -static sqInt -genLowcodeUnpin(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUrem32 */ -static sqInt -genLowcodeUrem32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUrem64 */ -static sqInt -genLowcodeUrem64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeXor32 */ -static sqInt -genLowcodeXor32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin XorR:R: */ - genoperandoperand(XorRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeXor64 */ -static sqInt -genLowcodeXor64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin XorR:R: */ - genoperandoperand(XorRR, secondLow, firstLow); - /* begin XorR:R: */ - genoperandoperand(XorRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend32From16 */ -static sqInt -genLowcodeZeroExtend32From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend16R:R: */ - genoperandoperand(ZeroExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend32From8 */ -static sqInt -genLowcodeZeroExtend32From8(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend8R:R: */ - genoperandoperand(ZeroExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From16 */ -static sqInt -genLowcodeZeroExtend64From16(void) -{ - AbstractInstruction *anInstruction; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin ZeroExtend16R:R: */ - genoperandoperand(ZeroExtend16RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From32 */ -static sqInt -genLowcodeZeroExtend64From32(void) -{ - AbstractInstruction *anInstruction; - sqInt resultHigh; - sqInt resultLow; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((resultLow = Arg1Reg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << value)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, resultLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, resultHigh); - ssPushNativeRegistersecondRegister(resultLow, resultHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From8 */ -static sqInt -genLowcodeZeroExtend64From8(void) -{ - AbstractInstruction *anInstruction; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin ZeroExtend8R:R: */ - genoperandoperand(ZeroExtend8RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - /* StackToRegisterMappingCogit>>#genMarshalledSend:numArgs:sendTable: */ static sqInt NoDbgRegParms genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable) @@ -38399,7 +38917,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -38685,7 +39204,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -38874,7 +39394,8 @@ genSpecialSelectorComparison(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -39068,7 +39589,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -39139,7 +39661,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -39212,7 +39735,8 @@ genStorePopMaybeContextRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCh ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -39249,7 +39773,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -39274,7 +39799,8 @@ genStorePopRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCheck(sqInt po if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -39417,21 +39943,20 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; (fixup->simNativeStackPtr) = UnknownSimStackPtrFlag; (fixup->simNativeStackSize) = 0; - return fixup; } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ @@ -39660,7 +40185,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -39670,7 +40196,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -39678,7 +40205,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -39717,7 +40245,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -39785,7 +40313,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -39929,9 +40458,8 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; - (self_in_reinitialize->simNativeStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); + (self_in_reinitialize->simNativeStackPtr) = ((self_in_reinitialize->simNativeStackSize) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); @@ -40335,20 +40863,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1U << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushAll */ -static void -ssFlushAll(void) -{ - ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); -} - - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -40394,7 +40908,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -40420,7 +40935,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -40504,6 +41020,13 @@ ssNativeTop(void) return simNativeStackAt(simNativeStackPtr); } + /* StackToRegisterMappingCogit>>#ssNativeValue: */ +static CogSimStackNativeEntry * NoDbgRegParms +ssNativeValue(sqInt n) +{ + return simNativeStackAt(simStackPtr - n); +} + /* StackToRegisterMappingCogit>>#ssPopNativeSize: */ static void NoDbgRegParms ssPopNativeSize(sqInt popSize) @@ -40993,6 +41516,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/spurlowcodesrc/vm/cogitMIPSEL.c b/spurlowcodesrc/vm/cogitMIPSEL.c index 726299a43..f88eefd33 100644 --- a/spurlowcodesrc/vm/cogitMIPSEL.c +++ b/spurlowcodesrc/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -298,7 +298,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 83 : 78) +#define NumTrampolines (IMMUTABILITY ? 84 : 79) #define OneInstruction 4 #define OR 37 #define ORI 13 @@ -317,6 +317,7 @@ char *__cogitBuildInfo = __buildInfo; #define PrimCallMayCallBack 4 #define PrimCallNeedsNewMethod 1 #define PrimCallNeedsPrimitiveFunction 2 +#define PrimErrBadArgument 3 #define PrimErrNoMemory 9 #define PrimErrWritePastObject 17 #define PushCq 83 @@ -415,10 +416,10 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; - usqIntptr_t machineCode [7]; + unsigned int machineCode [7]; } AbstractInstruction; #define CogMIPSELCompiler AbstractInstruction @@ -485,10 +486,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -642,7 +645,7 @@ static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static usqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -662,7 +665,7 @@ static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointe static void generateClosedPICPrototype(void); static CogMethod * generateCogFullBlock(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateOpenPICPrototype(void); static void generateRunTimeTrampolines(void); static void generateStackPointerCapture(void); @@ -720,7 +723,7 @@ static BytecodeDescriptor * loadBytesAndGetDescriptor(void); static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc); static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); -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); @@ -802,7 +805,7 @@ static sqInt NoDbgRegParms counters(CogMethod * self_in_counters); extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void NoDbgRegParms clearSavedPICUsageCount(CogMethod *cogMethod); static void compactCompiledCode(void); @@ -811,7 +814,6 @@ static void followForwardedLiteralsInOpenPICList(void); extern void freeMethod(CogMethod *cogMethod); static void freeOlderMethodsForCompaction(void); static sqInt kosherYoungReferrers(void); -static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); extern CogMethod * methodFor(void *address); extern sqInt methodsCompiledToMachineCodeInto(sqInt arrayObj); extern sqInt numMethods(void); @@ -991,7 +993,7 @@ static sqInt NoDbgRegParms lhRbaseoffset(AbstractInstruction * self_in_lhRbaseof static sqInt NoDbgRegParms lhuRbaseoffset(AbstractInstruction * self_in_lhuRbaseoffset, sqInt destReg, sqInt baseReg, sqInt offset); static usqInt NoDbgRegParms literalAtAddress(AbstractInstruction * self_in_literalAtAddress, sqInt mcpc); static sqInt NoDbgRegParms literalAtAddressput(AbstractInstruction * self_in_literalAtAddressput, sqInt mcpc, sqInt newLiteral); -static sqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); +static usqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); static sqInt NoDbgRegParms loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize); static sqInt NoDbgRegParms loadPICLiteralByteSize(AbstractInstruction * self_in_loadPICLiteralByteSize); static usqInt NoDbgRegParms low16BitsOf(AbstractInstruction * self_in_low16BitsOf, usqInt word); @@ -1019,7 +1021,7 @@ static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFoll static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta); static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteConditionalJumpLongAttarget(AbstractInstruction * self_in_rewriteConditionalJumpLongAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); -static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress); +static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr); static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, usqInt callSiteReturnAddress); static AbstractInstruction * NoDbgRegParms rewriteITypeBranchAtAddresstarget(AbstractInstruction * self_in_rewriteITypeBranchAtAddresstarget, sqInt mcpc, sqInt newTarget); @@ -1234,9 +1236,12 @@ static SimStackEntry * NoDbgRegParms storeToReg(SimStackEntry * self_in_storeToR static CogSimStackNativeEntry * NoDbgRegParms ensureIsMarkedAsSpilled(CogSimStackNativeEntry * self_in_ensureIsMarkedAsSpilled); static CogSimStackNativeEntry * NoDbgRegParms ensureSpilledSPscratchRegister(CogSimStackNativeEntry * self_in_ensureSpilledSPscratchRegister, sqInt spRegister, sqInt scratchRegister); static sqInt NoDbgRegParms nativeFloatRegisterMask(CogSimStackNativeEntry * self_in_nativeFloatRegisterMask); +static sqInt NoDbgRegParms nativeFloatRegisterOrNone(CogSimStackNativeEntry * self_in_nativeFloatRegisterOrNone); static CogSimStackNativeEntry * NoDbgRegParms nativePopToReg(CogSimStackNativeEntry * self_in_nativePopToReg, sqInt reg); static CogSimStackNativeEntry * NoDbgRegParms nativePopToRegsecondReg(CogSimStackNativeEntry * self_in_nativePopToRegsecondReg, sqInt reg, sqInt secondReg); static sqInt NoDbgRegParms nativeRegisterMask(CogSimStackNativeEntry * self_in_nativeRegisterMask); +static sqInt NoDbgRegParms nativeRegisterOrNone(CogSimStackNativeEntry * self_in_nativeRegisterOrNone); +static sqInt NoDbgRegParms nativeRegisterSecondOrNone(CogSimStackNativeEntry * self_in_nativeRegisterSecondOrNone); static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToReg(CogSimStackNativeEntry * self_in_nativeStackPopToReg, sqInt reg); static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToRegsecondReg(CogSimStackNativeEntry * self_in_nativeStackPopToRegsecondReg, sqInt reg, sqInt secondReg); static sqInt NoDbgRegParms spillingNeedsScratchRegister(CogSimStackNativeEntry * self_in_spillingNeedsScratchRegister); @@ -1349,8 +1354,12 @@ static sqInt NoDbgRegParms v4LongForwardBranchDistance(BytecodeDescriptor *descr static sqInt NoDbgRegParms v4LongBranchIfNotInstanceOfDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj); static sqInt NoDbgRegParms v4LongBranchDistance(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj); extern void voidCogCompiledCode(void); +extern double getCogCodeZoneThreshold(void); +static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); +extern sqInt setCogCodeZoneThreshold(double ratio); static BlockStart * NoDbgRegParms addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span); static void NoDbgRegParms adjustArgumentsForPerform(sqInt numArgs); +static sqInt NoDbgRegParms allocateFloatRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask); static sqInt NoDbgRegParms allocateRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms anyReferencesToRegisterinTopNItems(sqInt reg, sqInt n); @@ -1383,6 +1392,7 @@ static BytecodeFixup * NoDbgRegParms ensureNonMergeFixupAt(sqInt targetPC); static void ensureReceiverResultRegContainsSelf(void); static void NoDbgRegParms evaluateat(BytecodeDescriptor *descriptor, sqInt pc); static sqInt NoDbgRegParms eventualTargetOf(sqInt targetBytecodePC); +static sqInt NoDbgRegParms freeAnyFloatRegNotConflictingWith(sqInt regMask); static sqInt NoDbgRegParms freeAnyRegNotConflictingWith(sqInt regMask); static sqInt genBlockReturn(void); static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void) ; @@ -1404,294 +1414,14 @@ static sqInt NoDbgRegParms genJumpBackTo(sqInt targetBytecodePC); static sqInt NoDbgRegParms genJumpIfto(sqInt boolean, sqInt targetBytecodePC); static sqInt NoDbgRegParms genJumpTo(sqInt targetBytecodePC); static void NoDbgRegParms genLoadTempin(sqInt objectIndex, sqInt destReg); -static sqInt genLowcodeAdd32(void); -static sqInt genLowcodeAdd64(void); -static sqInt genLowcodeAlloca32(void); -static sqInt genLowcodeAlloca64(void); -static sqInt genLowcodeAnd32(void); -static sqInt genLowcodeAnd64(void); -static sqInt genLowcodeArithmeticRightShift32(void); -static sqInt genLowcodeArithmeticRightShift64(void); -static sqInt genLowcodeBeginCall(void); static sqInt NoDbgRegParms genLowcodeBinaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeBoolean32ToOop(void); -static sqInt genLowcodeBoolean64ToOop(void); -static sqInt genLowcodeByteSizeOf(void); -static sqInt genLowcodeCallArgumentFloat32(void); -static sqInt genLowcodeCallArgumentFloat64(void); -static sqInt genLowcodeCallArgumentInt32(void); -static sqInt genLowcodeCallArgumentInt64(void); -static sqInt genLowcodeCallArgumentPointer(void); -static sqInt genLowcodeCallArgumentSpace(void); -static sqInt genLowcodeCallArgumentStructure(void); -static sqInt genLowcodeCallInstruction(void); -static sqInt genLowcodeCallPhysical(void); -static sqInt genLowcodeCheckSessionIdentifier(void); -static sqInt genLowcodeCompareAndSwap32(void); -static sqInt genLowcodeDiv32(void); -static sqInt genLowcodeDiv64(void); -static sqInt genLowcodeDuplicateFloat32(void); -static sqInt genLowcodeDuplicateFloat64(void); -static sqInt genLowcodeDuplicateInt32(void); -static sqInt genLowcodeDuplicateInt64(void); -static sqInt genLowcodeDuplicatePointer(void); -static sqInt genLowcodeEffectiveAddress32(void); -static sqInt genLowcodeEffectiveAddress64(void); -static sqInt genLowcodeEndCall(void); -static sqInt genLowcodeEndCallNoCleanup(void); -static sqInt genLowcodeFirstFieldPointer(void); -static sqInt genLowcodeFirstIndexableFieldPointer(void); -static sqInt genLowcodeFloat32Add(void); -static sqInt genLowcodeFloat32Div(void); -static sqInt genLowcodeFloat32Equal(void); -static sqInt genLowcodeFloat32Great(void); -static sqInt genLowcodeFloat32GreatEqual(void); -static sqInt genLowcodeFloat32Less(void); -static sqInt genLowcodeFloat32LessEqual(void); -static sqInt genLowcodeFloat32Mul(void); -static sqInt genLowcodeFloat32Neg(void); -static sqInt genLowcodeFloat32NotEqual(void); -static sqInt genLowcodeFloat32Sqrt(void); -static sqInt genLowcodeFloat32Sub(void); -static sqInt genLowcodeFloat32ToFloat64(void); -static sqInt genLowcodeFloat32ToInt32(void); -static sqInt genLowcodeFloat32ToInt64(void); -static sqInt genLowcodeFloat32ToOop(void); -static sqInt genLowcodeFloat32ToUInt32(void); -static sqInt genLowcodeFloat32ToUInt64(void); -static sqInt genLowcodeFloat64Add(void); -static sqInt genLowcodeFloat64Div(void); -static sqInt genLowcodeFloat64Equal(void); -static sqInt genLowcodeFloat64Great(void); -static sqInt genLowcodeFloat64GreatEqual(void); -static sqInt genLowcodeFloat64Less(void); -static sqInt genLowcodeFloat64LessEqual(void); -static sqInt genLowcodeFloat64Mul(void); -static sqInt genLowcodeFloat64Neg(void); -static sqInt genLowcodeFloat64NotEqual(void); -static sqInt genLowcodeFloat64Sqrt(void); -static sqInt genLowcodeFloat64Sub(void); -static sqInt genLowcodeFloat64ToFloat32(void); -static sqInt genLowcodeFloat64ToInt32(void); -static sqInt genLowcodeFloat64ToInt64(void); -static sqInt genLowcodeFloat64ToOop(void); -static sqInt genLowcodeFloat64ToUInt32(void); -static sqInt genLowcodeFloat64ToUInt64(void); -static sqInt genLowcodeFree(void); -static sqInt genLowcodeInstantiateIndexable32Oop(void); -static sqInt genLowcodeInstantiateIndexableOop(void); -static sqInt genLowcodeInstantiateOop(void); -static sqInt genLowcodeInt32Equal(void); -static sqInt genLowcodeInt32Great(void); -static sqInt genLowcodeInt32GreatEqual(void); -static sqInt genLowcodeInt32Less(void); -static sqInt genLowcodeInt32LessEqual(void); -static sqInt genLowcodeInt32NotEqual(void); -static sqInt genLowcodeInt32ToFloat32(void); -static sqInt genLowcodeInt32ToFloat64(void); -static sqInt genLowcodeInt32ToOop(void); -static sqInt genLowcodeInt32ToPointer(void); -static sqInt genLowcodeInt64Equal(void); -static sqInt genLowcodeInt64Great(void); -static sqInt genLowcodeInt64GreatEqual(void); -static sqInt genLowcodeInt64Less(void); -static sqInt genLowcodeInt64LessEqual(void); -static sqInt genLowcodeInt64NotEqual(void); -static sqInt genLowcodeInt64ToFloat32(void); -static sqInt genLowcodeInt64ToFloat64(void); -static sqInt genLowcodeInt64ToOop(void); -static sqInt genLowcodeInt64ToPointer(void); -static sqInt genLowcodeIsBytes(void); -static sqInt genLowcodeIsFloatObject(void); -static sqInt genLowcodeIsIndexable(void); -static sqInt genLowcodeIsIntegerObject(void); -static sqInt genLowcodeIsPointers(void); -static sqInt genLowcodeIsWords(void); -static sqInt genLowcodeIsWordsOrBytes(void); -static sqInt genLowcodeLeftShift32(void); -static sqInt genLowcodeLeftShift64(void); -static sqInt genLowcodeLoadArgumentAddress(void); -static sqInt genLowcodeLoadArgumentFloat32(void); -static sqInt genLowcodeLoadArgumentFloat64(void); -static sqInt genLowcodeLoadArgumentInt16(void); -static sqInt genLowcodeLoadArgumentInt32(void); -static sqInt genLowcodeLoadArgumentInt64(void); -static sqInt genLowcodeLoadArgumentInt8(void); -static sqInt genLowcodeLoadArgumentPointer(void); -static sqInt genLowcodeLoadArgumentUInt16(void); -static sqInt genLowcodeLoadArgumentUInt32(void); -static sqInt genLowcodeLoadArgumentUInt64(void); -static sqInt genLowcodeLoadArgumentUInt8(void); -static sqInt genLowcodeLoadFloat32FromMemory(void); -static sqInt genLowcodeLoadFloat64FromMemory(void); -static sqInt genLowcodeLoadInt16FromMemory(void); -static sqInt genLowcodeLoadInt32FromMemory(void); -static sqInt genLowcodeLoadInt64FromMemory(void); -static sqInt genLowcodeLoadInt8FromMemory(void); -static sqInt genLowcodeLoadLocalAddress(void); -static sqInt genLowcodeLoadLocalFloat32(void); -static sqInt genLowcodeLoadLocalFloat64(void); -static sqInt genLowcodeLoadLocalInt16(void); -static sqInt genLowcodeLoadLocalInt32(void); -static sqInt genLowcodeLoadLocalInt64(void); -static sqInt genLowcodeLoadLocalInt8(void); -static sqInt genLowcodeLoadLocalPointer(void); -static sqInt genLowcodeLoadLocalUInt16(void); -static sqInt genLowcodeLoadLocalUInt32(void); -static sqInt genLowcodeLoadLocalUInt64(void); -static sqInt genLowcodeLoadLocalUInt8(void); -static sqInt genLowcodeLoadObjectAt(void); -static sqInt genLowcodeLoadObjectField(void); -static sqInt genLowcodeLoadPointerFromMemory(void); -static sqInt genLowcodeLoadUInt16FromMemory(void); -static sqInt genLowcodeLoadUInt32FromMemory(void); -static sqInt genLowcodeLoadUInt64FromMemory(void); -static sqInt genLowcodeLoadUInt8FromMemory(void); -static sqInt genLowcodeLocalFrameSize(void); -static sqInt genLowcodeLockRegisters(void); -static sqInt genLowcodeLockVM(void); -static sqInt genLowcodeMalloc32(void); -static sqInt genLowcodeMalloc64(void); -static sqInt genLowcodeMemcpy32(void); -static sqInt genLowcodeMemcpy64(void); -static sqInt genLowcodeMemcpyFixed(void); -static sqInt genLowcodeMoveFloat32ToPhysical(void); -static sqInt genLowcodeMoveFloat64ToPhysical(void); -static sqInt genLowcodeMoveInt32ToPhysical(void); -static sqInt genLowcodeMoveInt64ToPhysical(void); -static sqInt genLowcodeMovePointerToPhysical(void); -static sqInt genLowcodeMul32(void); -static sqInt genLowcodeMul64(void); -static sqInt genLowcodeNeg32(void); -static sqInt genLowcodeNeg64(void); -static sqInt genLowcodeNot32(void); -static sqInt genLowcodeNot64(void); static sqInt NoDbgRegParms genLowcodeNullaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeOopEqual(void); -static sqInt genLowcodeOopNotEqual(void); -static sqInt genLowcodeOopSmallIntegerToInt32(void); -static sqInt genLowcodeOopSmallIntegerToInt64(void); -static sqInt genLowcodeOopToBoolean32(void); -static sqInt genLowcodeOopToBoolean64(void); -static sqInt genLowcodeOopToFloat32(void); -static sqInt genLowcodeOopToFloat64(void); -static sqInt genLowcodeOopToInt32(void); -static sqInt genLowcodeOopToInt64(void); -static sqInt genLowcodeOopToPointer(void); -static sqInt genLowcodeOopToPointerReinterpret(void); -static sqInt genLowcodeOopToUInt32(void); -static sqInt genLowcodeOopToUInt64(void); -static sqInt genLowcodeOr32(void); -static sqInt genLowcodeOr64(void); -static sqInt genLowcodePerformCallout(void); -static sqInt genLowcodePerformCalloutIndirect(void); -static sqInt genLowcodePin(void); -static sqInt genLowcodePlaftormCode(void); -static sqInt genLowcodePointerAddConstantOffset(void); -static sqInt genLowcodePointerAddOffset32(void); -static sqInt genLowcodePointerAddOffset64(void); -static sqInt genLowcodePointerEqual(void); -static sqInt genLowcodePointerNotEqual(void); -static sqInt genLowcodePointerToInt32(void); -static sqInt genLowcodePointerToInt64(void); -static sqInt genLowcodePointerToOop(void); -static sqInt genLowcodePointerToOopReinterprer(void); -static sqInt genLowcodePopFloat32(void); -static sqInt genLowcodePopFloat64(void); -static sqInt genLowcodePopInt32(void); -static sqInt genLowcodePopInt64(void); -static sqInt genLowcodePopMultipleNative(void); -static sqInt genLowcodePopPointer(void); -static sqInt genLowcodePushCalloutResultFloat32(void); -static sqInt genLowcodePushCalloutResultFloat64(void); -static sqInt genLowcodePushCalloutResultInt32(void); -static sqInt genLowcodePushCalloutResultInt64(void); -static sqInt genLowcodePushCalloutResultPointer(void); -static sqInt genLowcodePushConstantUInt32(void); -static sqInt genLowcodePushConstantUInt64(void); -static sqInt genLowcodePushNullPointer(void); -static sqInt genLowcodePushOne32(void); -static sqInt genLowcodePushOne64(void); -static sqInt genLowcodePushOneFloat32(void); -static sqInt genLowcodePushOneFloat64(void); -static sqInt genLowcodePushPhysicalFloat32(void); -static sqInt genLowcodePushPhysicalFloat64(void); -static sqInt genLowcodePushPhysicalInt32(void); -static sqInt genLowcodePushPhysicalInt64(void); -static sqInt genLowcodePushPhysicalPointer(void); -static sqInt genLowcodePushSessionIdentifier(void); -static sqInt genLowcodePushZero32(void); -static sqInt genLowcodePushZero64(void); -static sqInt genLowcodePushZeroFloat32(void); -static sqInt genLowcodePushZeroFloat64(void); -static sqInt genLowcodeRem32(void); -static sqInt genLowcodeRem64(void); -static sqInt genLowcodeRightShift32(void); -static sqInt genLowcodeRightShift64(void); -static sqInt genLowcodeSignExtend32From16(void); -static sqInt genLowcodeSignExtend32From8(void); -static sqInt genLowcodeSignExtend64From16(void); -static sqInt genLowcodeSignExtend64From32(void); -static sqInt genLowcodeSignExtend64From8(void); -static sqInt genLowcodeSmallInt32ToOop(void); -static sqInt genLowcodeStoreFloat32ToMemory(void); -static sqInt genLowcodeStoreFloat64ToMemory(void); -static sqInt genLowcodeStoreInt16ToMemory(void); -static sqInt genLowcodeStoreInt32ToMemory(void); -static sqInt genLowcodeStoreInt64ToMemory(void); -static sqInt genLowcodeStoreInt8ToMemory(void); -static sqInt genLowcodeStoreLocalFloat32(void); -static sqInt genLowcodeStoreLocalFloat64(void); -static sqInt genLowcodeStoreLocalInt16(void); -static sqInt genLowcodeStoreLocalInt32(void); -static sqInt genLowcodeStoreLocalInt64(void); -static sqInt genLowcodeStoreLocalInt8(void); -static sqInt genLowcodeStoreLocalPointer(void); -static sqInt genLowcodeStoreObjectField(void); -static sqInt genLowcodeStoreObjectFieldAt(void); -static sqInt genLowcodeStorePointerToMemory(void); -static sqInt genLowcodeSub32(void); -static sqInt genLowcodeSub64(void); static sqInt NoDbgRegParms genLowcodeTrinaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeTruncate32To16(void); -static sqInt genLowcodeTruncate32To8(void); -static sqInt genLowcodeTruncate64To16(void); -static sqInt genLowcodeTruncate64To32(void); -static sqInt genLowcodeTruncate64To8(void); -static sqInt genLowcodeUdiv32(void); -static sqInt genLowcodeUdiv64(void); -static sqInt genLowcodeUint32Great(void); -static sqInt genLowcodeUint32GreatEqual(void); -static sqInt genLowcodeUint32Less(void); -static sqInt genLowcodeUint32LessEqual(void); -static sqInt genLowcodeUint32ToFloat32(void); -static sqInt genLowcodeUint32ToFloat64(void); -static sqInt genLowcodeUint32ToOop(void); -static sqInt genLowcodeUint64Great(void); -static sqInt genLowcodeUint64GreatEqual(void); -static sqInt genLowcodeUint64Less(void); -static sqInt genLowcodeUint64LessEqual(void); -static sqInt genLowcodeUint64ToFloat32(void); -static sqInt genLowcodeUint64ToFloat64(void); -static sqInt genLowcodeUint64ToOop(void); -static sqInt genLowcodeUmul32(void); -static sqInt genLowcodeUmul64(void); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive2(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive3(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive4(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive5(sqInt prim); static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive(sqInt prim); -static sqInt genLowcodeUnlockVM(void); -static sqInt genLowcodeUnpin(void); -static sqInt genLowcodeUrem32(void); -static sqInt genLowcodeUrem64(void); -static sqInt genLowcodeXor32(void); -static sqInt genLowcodeXor64(void); -static sqInt genLowcodeZeroExtend32From16(void); -static sqInt genLowcodeZeroExtend32From8(void); -static sqInt genLowcodeZeroExtend64From16(void); -static sqInt genLowcodeZeroExtend64From32(void); -static sqInt genLowcodeZeroExtend64From8(void); static sqInt NoDbgRegParms genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable); static sqInt NoDbgRegParms genMethodAbortTrampolineFor(sqInt numArgs); static sqInt NoDbgRegParms genPICAbortTrampolineFor(sqInt numArgs); @@ -1733,7 +1463,7 @@ static sqInt NoDbgRegParms genStorePopRemoteInstVarofObjectAtneedsStoreCheckneed static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1766,8 +1496,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void ssFlushAll(void); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1775,6 +1503,7 @@ static void NoDbgRegParms ssNativeFlushTo(sqInt index); static void NoDbgRegParms ssNativePop(sqInt n); static void NoDbgRegParms ssNativePush(sqInt n); static CogSimStackNativeEntry * ssNativeTop(void); +static CogSimStackNativeEntry * NoDbgRegParms ssNativeValue(sqInt n); static void NoDbgRegParms ssPopNativeSize(sqInt popSize); static void NoDbgRegParms ssPop(sqInt n); static sqInt NoDbgRegParms ssPushAnnotatedConstant(sqInt literal); @@ -1804,6 +1533,7 @@ static void voidReceiverResultRegContainsSelf(void); /*** Variables ***/ static AbstractInstruction * abstractOpcodes; +static usqInt allocationThreshold; static AbstractInstruction aMethodLabel; static AbstractInstruction * const backEnd = &aMethodLabel; static usqInt baseAddress; @@ -1811,7 +1541,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt breakBlock; static sqInt breakMethod; @@ -1849,6 +1578,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1895,6 +1625,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt cPICCaseSize; static sqInt cPICEndOfCodeOffset; @@ -2504,6 +2235,7 @@ static AbstractInstruction * stackCheckLabel; static AbstractInstruction * stackOverflowCall; static sqInt superSendTrampolines[NumSendTrampolines]; static sqInt tempOop; +static float thresholdRatio = 0.5f; int traceFlags = 8 /* prim trace log on by default */; sqInt traceStores; static char *trampolineAddresses[NumTrampolines*2]; @@ -2541,6 +2273,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -3663,7 +3396,7 @@ checkIfValidOopRefAndTargetpccogMethod(sqInt annotation, char *mcpc, sqInt cogMe sqInt entryPoint; usqInt entryPoint1; sqInt entryPt; - sqInt literal; + usqInt literal; sqInt sendTable; sqInt *sendTable1; sqInt tagCouldBeObj; @@ -3765,7 +3498,7 @@ static sqInt NoDbgRegParms checkIfValidOopRefpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod) { usqInt entryPoint; - sqInt literal; + usqInt literal; sqInt off; usqInt offset; sqInt offset1; @@ -3993,7 +3726,7 @@ static sqInt NoDbgRegParms closedPICRefersToUnmarkedObject(CogMethod *cPIC) { sqInt i; - sqInt object; + usqInt object; sqInt pc; if (!((isImmediate((cPIC->selector))) @@ -4328,7 +4061,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -4386,7 +4119,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -4453,7 +4186,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -5652,7 +5385,7 @@ cPICCompactAndIsNowEmpty(CogMethod *cPIC) static sqInt NoDbgRegParms cPICHasForwardedClass(CogMethod *cPIC) { - sqInt classIndex; + usqInt classIndex; sqInt i; sqInt pc; @@ -5677,7 +5410,7 @@ cPICHasForwardedClass(CogMethod *cPIC) static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC) { - usqInt entryPoint; + sqInt entryPoint; sqInt i; sqInt pc; CogMethod *targetMethod; @@ -5789,7 +5522,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -5874,13 +5607,13 @@ entryPointTagIsSelector(sqInt entryPoint) static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { - sqInt classTag; - usqInt classTagPC; + usqInt classTag; + sqInt classTagPC; usqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; - sqInt object; + sqInt methodObjPC; + usqInt object; usqInt pc; errors = 0; @@ -6074,8 +5807,8 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) } /* Cogit>>#findMapLocationForMcpc:inMethod: */ -static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +static usqInt NoDbgRegParms +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -6269,7 +6002,7 @@ followForwardedMethods(void) static sqInt NoDbgRegParms followMaybeObjRefInClosedPICAt(sqInt mcpc) { - sqInt object; + usqInt object; sqInt subject; object = literalBeforeFollowingAddress(backEnd, mcpc); @@ -6612,7 +6345,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -6629,7 +6362,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, operandOne, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -6675,7 +6408,7 @@ generateCogFullBlock(void) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -6724,7 +6457,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -6770,17 +6503,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; - usqIntptr_t delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqIntptr_t location; - usqIntptr_t mapEntry; + usqInt location; + sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -7974,7 +7707,7 @@ gMoveCwR(sqInt wordConstant, sqInt reg) /* 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; @@ -8069,7 +7802,7 @@ static void mapObjectReferencesInGeneratedRuntime(void) { sqInt i; - sqInt literal; + usqInt literal; sqInt mappedLiteral; usqInt mcpc; @@ -8533,7 +8266,7 @@ static void markAndTraceObjectReferencesInGeneratedRuntime(void) { sqInt i; - sqInt literal; + usqInt literal; usqInt mcpc; for (i = 0; i < runtimeObjectRefIndex; i += 1) { @@ -8673,7 +8406,7 @@ markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt sqInt cacheTagMarked; sqInt entryPoint; usqInt entryPoint1; - sqInt literal; + usqInt literal; sqInt sendTable; sqInt *sendTable1; sqInt tagCouldBeObj; @@ -8763,7 +8496,7 @@ markLiteralspcmethod(sqInt annotation, char *mcpc, sqInt cogMethod) usqInt cacheTag1; sqInt entryPoint; usqInt entryPoint1; - sqInt literal; + usqInt literal; sqInt tagCouldBeObj; sqInt tagCouldBeObj1; @@ -9567,7 +9300,7 @@ static void NoDbgRegParms relocateCallsInClosedPIC(CogMethod *cPIC) { sqLong callDelta; - usqInt entryPoint; + sqInt entryPoint; sqInt i; sqInt pc; sqLong refDelta; @@ -9687,7 +9420,7 @@ remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr) sqInt entryPoint; usqInt entryPoint1; sqInt ignored; - sqInt literal; + usqInt literal; sqInt mappedCacheTag; sqInt mappedLiteral; sqInt *sendTable; @@ -9782,7 +9515,7 @@ remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr) static sqInt NoDbgRegParms remapMaybeObjRefInClosedPICAt(sqInt mcpc) { - sqInt object; + usqInt object; sqInt subject; object = literalBeforeFollowingAddress(backEnd, mcpc); @@ -9895,7 +9628,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -10699,14 +10432,14 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; sqInt roundedBytes; roundedBytes = (numBytes + 7) & -8; - if ((mzFreeStart + roundedBytes) >= (limitAddress - (methodCount * BytesPerWord))) { + if ((mzFreeStart + roundedBytes) >= ((((limitAddress - (methodCount * BytesPerWord)) < allocationThreshold) ? (limitAddress - (methodCount * BytesPerWord)) : allocationThreshold))) { return 0; } allocation = mzFreeStart; @@ -10889,15 +10622,15 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; - zoneSize = limitAddress - baseAddress; - initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; + zoneSize = ((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - baseAddress; + initialFreeSpace = (((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - mzFreeStart) + methodBytesFreedSinceLastCompaction; freedSoFar = initialFreeSpace; /* 4 needs to be e.g. a start-up parameter */ @@ -10948,17 +10681,6 @@ kosherYoungReferrers(void) return 1; } - /* CogMethodZone>>#manageFrom:to: */ -static void NoDbgRegParms -manageFromto(sqInt theStartAddress, sqInt theLimitAddress) -{ - mzFreeStart = (baseAddress = theStartAddress); - youngReferrers = (limitAddress = theLimitAddress); - openPICList = null; - methodBytesFreedSinceLastCompaction = 0; - methodCount = 0; -} - /* CogMethodZone>>#methodFor: */ CogMethod * methodFor(void *address) @@ -11775,8 +11497,8 @@ concretizeAddCheckOverflowCqR(AbstractInstruction * self_in_concretizeAddCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAddCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCheckOverflowCqR->operands))[1]); @@ -11814,8 +11536,8 @@ concretizeAddCheckOverflowRR(AbstractInstruction * self_in_concretizeAddCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeAddCheckOverflowRR->operands))[0]; @@ -11845,8 +11567,8 @@ concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAddCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCqR->operands))[1]); @@ -11867,8 +11589,8 @@ concretizeAddCwR(AbstractInstruction * self_in_concretizeAddCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAddCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCwR->operands))[1]); @@ -11890,8 +11612,8 @@ concretizeAddRR(AbstractInstruction * self_in_concretizeAddRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeAddRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddRR->operands))[1]); @@ -11921,8 +11643,8 @@ concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAndCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCqR->operands))[1]); @@ -11942,9 +11664,9 @@ concretizeAndCqRR(AbstractInstruction * self_in_concretizeAndCqRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t dstReg; - usqIntptr_t srcReg; - usqIntptr_t value; + usqInt dstReg; + usqInt srcReg; + usqInt value; value = ((self_in_concretizeAndCqRR->operands))[0]; srcReg = ((self_in_concretizeAndCqRR->operands))[1]; @@ -11969,8 +11691,8 @@ concretizeAndCwR(AbstractInstruction * self_in_concretizeAndCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAndCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCwR->operands))[1]); @@ -11992,8 +11714,8 @@ concretizeAndRR(AbstractInstruction * self_in_concretizeAndRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeAndRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndRR->operands))[1]); @@ -12009,7 +11731,7 @@ concretizeArithmeticShiftRightCqR(AbstractInstruction * self_in_concretizeArithm { sqInt aWord; sqInt distance; - usqIntptr_t reg; + usqInt reg; distance = (((((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeArithmeticShiftRightCqR->operands))[1]; @@ -12024,8 +11746,8 @@ static usqInt NoDbgRegParms concretizeArithmeticShiftRightRR(AbstractInstruction * self_in_concretizeArithmeticShiftRightRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t distReg; + usqInt destReg; + usqInt distReg; distReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[0]; destReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[1]; @@ -12060,9 +11782,9 @@ concretizeBrEqualRR(AbstractInstruction * self_in_concretizeBrEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrEqualRR->operands))[0])); @@ -12093,8 +11815,8 @@ concretizeBrLongEqualRR(AbstractInstruction * self_in_concretizeBrLongEqualRR) AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongEqualRR->operands))[0])); @@ -12130,8 +11852,8 @@ concretizeBrLongNotEqualRR(AbstractInstruction * self_in_concretizeBrLongNotEqua AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongNotEqualRR->operands))[0])); @@ -12165,9 +11887,9 @@ concretizeBrNotEqualRR(AbstractInstruction * self_in_concretizeBrNotEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrNotEqualRR->operands))[0])); @@ -12197,9 +11919,9 @@ concretizeBrSignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrSigne sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterEqualRR->operands))[0])); @@ -12234,9 +11956,9 @@ concretizeBrSignedGreaterRR(AbstractInstruction * self_in_concretizeBrSignedGrea sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterRR->operands))[0])); @@ -12271,9 +11993,9 @@ concretizeBrSignedLessEqualRR(AbstractInstruction * self_in_concretizeBrSignedLe sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessEqualRR->operands))[0])); @@ -12308,9 +12030,9 @@ concretizeBrSignedLessRR(AbstractInstruction * self_in_concretizeBrSignedLessRR) sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessRR->operands))[0])); @@ -12345,9 +12067,9 @@ concretizeBrUnsignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrUns sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterEqualRR->operands))[0])); @@ -12382,9 +12104,9 @@ concretizeBrUnsignedGreaterRR(AbstractInstruction * self_in_concretizeBrUnsigned sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterRR->operands))[0])); @@ -12419,9 +12141,9 @@ concretizeBrUnsignedLessEqualRR(AbstractInstruction * self_in_concretizeBrUnsign sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessEqualRR->operands))[0])); @@ -12456,9 +12178,9 @@ concretizeBrUnsignedLessRR(AbstractInstruction * self_in_concretizeBrUnsignedLes sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessRR->operands))[0])); @@ -12564,8 +12286,8 @@ static usqInt NoDbgRegParms concretizeDivRR(AbstractInstruction * self_in_concretizeDivRR) { sqInt aWord; - usqIntptr_t dividendReg; - usqIntptr_t divisorReg; + usqInt dividendReg; + usqInt divisorReg; dividendReg = ((self_in_concretizeDivRR->operands))[0]; divisorReg = ((self_in_concretizeDivRR->operands))[1]; @@ -12714,7 +12436,7 @@ static usqInt NoDbgRegParms concretizeJumpR(AbstractInstruction * self_in_concretizeJumpR) { sqInt aWord; - usqIntptr_t reg; + usqInt reg; flag("OABI"); reg = ((self_in_concretizeJumpR->operands))[0]; @@ -12815,8 +12537,8 @@ concretizeLoadEffectiveAddressMwrR(AbstractInstruction * self_in_concretizeLoadE sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t baseReg; - usqIntptr_t destReg; + usqInt baseReg; + usqInt destReg; sqInt offset; offset = ((self_in_concretizeLoadEffectiveAddressMwrR->operands))[0]; @@ -12846,7 +12568,7 @@ concretizeLogicalShiftLeftCqR(AbstractInstruction * self_in_concretizeLogicalShi { sqInt aWord; sqInt distance; - usqIntptr_t reg; + usqInt reg; distance = (((((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftLeftCqR->operands))[1]; @@ -12861,8 +12583,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftLeftRR(AbstractInstruction * self_in_concretizeLogicalShiftLeftRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t distReg; + usqInt destReg; + usqInt distReg; distReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[1]; @@ -12878,7 +12600,7 @@ concretizeLogicalShiftRightCqR(AbstractInstruction * self_in_concretizeLogicalSh { sqInt aWord; sqInt distance; - usqIntptr_t reg; + usqInt reg; distance = (((((self_in_concretizeLogicalShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftRightCqR->operands))[1]; @@ -12893,8 +12615,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftRightRR(AbstractInstruction * self_in_concretizeLogicalShiftRightRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t distReg; + usqInt destReg; + usqInt distReg; distReg = ((self_in_concretizeLogicalShiftRightRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftRightRR->operands))[1]; @@ -12912,8 +12634,8 @@ concretizeMoveAbR(AbstractInstruction * self_in_concretizeMoveAbR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destReg; - usqIntptr_t srcAddr; + usqInt destReg; + usqInt srcAddr; srcAddr = ((self_in_concretizeMoveAbR->operands))[0]; destReg = ((self_in_concretizeMoveAbR->operands))[1]; @@ -12945,8 +12667,8 @@ concretizeMoveAwR(AbstractInstruction * self_in_concretizeMoveAwR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destReg; - usqIntptr_t srcAddr; + usqInt destReg; + usqInt srcAddr; srcAddr = ((self_in_concretizeMoveAwR->operands))[0]; destReg = ((self_in_concretizeMoveAwR->operands))[1]; @@ -12975,7 +12697,7 @@ static usqInt NoDbgRegParms concretizeMoveCqR(AbstractInstruction * self_in_concretizeMoveCqR) { sqInt aWord; - usqIntptr_t reg; + usqInt reg; sqInt word; word = ((self_in_concretizeMoveCqR->operands))[0]; @@ -12995,7 +12717,7 @@ concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { sqInt aWord; sqInt aWord1; - usqIntptr_t reg; + usqInt reg; sqInt word; word = ((self_in_concretizeMoveCwR->operands))[0]; @@ -13014,7 +12736,7 @@ static usqInt NoDbgRegParms concretizeMoveHighR(AbstractInstruction * self_in_concretizeMoveHighR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; destReg = ((self_in_concretizeMoveHighR->operands))[0]; /* begin machineCodeAt:put: */ @@ -13028,7 +12750,7 @@ static usqInt NoDbgRegParms concretizeMoveLowR(AbstractInstruction * self_in_concretizeMoveLowR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; destReg = ((self_in_concretizeMoveLowR->operands))[0]; /* begin machineCodeAt:put: */ @@ -13042,9 +12764,9 @@ static usqInt NoDbgRegParms concretizeMoveM16rR(AbstractInstruction * self_in_concretizeMoveM16rR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; offset = ((self_in_concretizeMoveM16rR->operands))[0]; srcReg = ((self_in_concretizeMoveM16rR->operands))[1]; @@ -13060,9 +12782,9 @@ static usqInt NoDbgRegParms concretizeMoveMbrR(AbstractInstruction * self_in_concretizeMoveMbrR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; offset = ((self_in_concretizeMoveMbrR->operands))[0]; srcReg = ((self_in_concretizeMoveMbrR->operands))[1]; @@ -13082,8 +12804,8 @@ concretizeMoveMwrR(AbstractInstruction * self_in_concretizeMoveMwrR) sqInt aWord2; sqInt aWord3; sqInt aWord4; - usqIntptr_t baseReg; - usqIntptr_t destReg; + usqInt baseReg; + usqInt destReg; sqInt offset; offset = ((self_in_concretizeMoveMwrR->operands))[0]; @@ -13118,8 +12840,8 @@ concretizeMoveRAb(AbstractInstruction * self_in_concretizeMoveRAb) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destAddr; - usqIntptr_t srcReg; + usqInt destAddr; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRAb->operands))[0]; destAddr = ((self_in_concretizeMoveRAb->operands))[1]; @@ -13151,8 +12873,8 @@ concretizeMoveRAw(AbstractInstruction * self_in_concretizeMoveRAw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destAddr; - usqIntptr_t srcReg; + usqInt destAddr; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRAw->operands))[0]; destAddr = ((self_in_concretizeMoveRAw->operands))[1]; @@ -13181,9 +12903,9 @@ static usqInt NoDbgRegParms concretizeMoveRM16r(AbstractInstruction * self_in_concretizeMoveRM16r) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRM16r->operands))[0]; offset = ((self_in_concretizeMoveRM16r->operands))[1]; @@ -13199,9 +12921,9 @@ static usqInt NoDbgRegParms concretizeMoveRMbr(AbstractInstruction * self_in_concretizeMoveRMbr) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRMbr->operands))[0]; offset = ((self_in_concretizeMoveRMbr->operands))[1]; @@ -13217,9 +12939,9 @@ static usqInt NoDbgRegParms concretizeMoveRMwr(AbstractInstruction * self_in_concretizeMoveRMwr) { sqInt aWord; - usqIntptr_t baseReg; + usqInt baseReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRMwr->operands))[0]; offset = ((self_in_concretizeMoveRMwr->operands))[1]; @@ -13235,8 +12957,8 @@ static usqInt NoDbgRegParms concretizeMoveRR(AbstractInstruction * self_in_concretizeMoveRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t srcReg; + usqInt destReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRR->operands))[0]; destReg = ((self_in_concretizeMoveRR->operands))[1]; @@ -13252,9 +12974,9 @@ concretizeMoveRXbrR(AbstractInstruction * self_in_concretizeMoveRXbrR) { sqInt aWord; sqInt aWord1; - usqIntptr_t baseReg; - usqIntptr_t indexReg; - usqIntptr_t srcReg; + usqInt baseReg; + usqInt indexReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRXbrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXbrR->operands))[1]; @@ -13275,9 +12997,9 @@ concretizeMoveRXwrR(AbstractInstruction * self_in_concretizeMoveRXwrR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t baseReg; - usqIntptr_t indexReg; - usqIntptr_t srcReg; + usqInt baseReg; + usqInt indexReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRXwrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXwrR->operands))[1]; @@ -13300,9 +13022,9 @@ concretizeMoveXbrRR(AbstractInstruction * self_in_concretizeMoveXbrRR) { sqInt aWord; sqInt aWord1; - usqIntptr_t baseReg; - usqIntptr_t destReg; - usqIntptr_t indexReg; + usqInt baseReg; + usqInt destReg; + usqInt indexReg; /* index is number of *bytes* */ @@ -13325,9 +13047,9 @@ concretizeMoveXwrRR(AbstractInstruction * self_in_concretizeMoveXwrRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t baseReg; - usqIntptr_t destReg; - usqIntptr_t indexReg; + usqInt baseReg; + usqInt destReg; + usqInt indexReg; indexReg = ((self_in_concretizeMoveXwrRR->operands))[0]; baseReg = ((self_in_concretizeMoveXwrRR->operands))[1]; @@ -13353,8 +13075,8 @@ concretizeMulCheckOverflowRR(AbstractInstruction * self_in_concretizeMulCheckOve sqInt aWord2; sqInt aWord3; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeMulCheckOverflowRR->operands))[0]; @@ -13380,7 +13102,7 @@ static usqInt NoDbgRegParms concretizeNegateR(AbstractInstruction * self_in_concretizeNegateR) { sqInt aWord; - usqIntptr_t reg; + usqInt reg; reg = ((self_in_concretizeNegateR->operands))[0]; /* begin machineCodeAt:put: */ @@ -13404,8 +13126,8 @@ concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeOrCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCqR->operands))[1]); @@ -13426,8 +13148,8 @@ concretizeOrCwR(AbstractInstruction * self_in_concretizeOrCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeOrCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCwR->operands))[1]); @@ -13449,8 +13171,8 @@ concretizeOrRR(AbstractInstruction * self_in_concretizeOrRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeOrRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrRR->operands))[1]); @@ -13466,7 +13188,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) { sqInt aWord; sqInt aWord1; - usqIntptr_t destReg; + usqInt destReg; destReg = ((self_in_concretizePopR->operands))[0]; /* begin machineCodeAt:put: */ @@ -13482,7 +13204,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - usqIntptr_t addressOperand; + usqInt addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord2; @@ -13515,7 +13237,7 @@ concretizePushCw(AbstractInstruction * self_in_concretizePushCw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t value; + usqInt value; value = ((self_in_concretizePushCw->operands))[0]; /* begin machineCodeAt:put: */ @@ -13539,7 +13261,7 @@ concretizePushR(AbstractInstruction * self_in_concretizePushR) { sqInt aWord; sqInt aWord1; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizePushR->operands))[0]; /* begin machineCodeAt:put: */ @@ -13599,8 +13321,8 @@ concretizeSubCheckOverflowCqR(AbstractInstruction * self_in_concretizeSubCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeSubCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCheckOverflowCqR->operands))[1]); @@ -13638,8 +13360,8 @@ concretizeSubCheckOverflowRR(AbstractInstruction * self_in_concretizeSubCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeSubCheckOverflowRR->operands))[0]; @@ -13669,8 +13391,8 @@ concretizeSubCqR(AbstractInstruction * self_in_concretizeSubCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeSubCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCqR->operands))[1]); @@ -13691,8 +13413,8 @@ concretizeSubCwR(AbstractInstruction * self_in_concretizeSubCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeSubCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCwR->operands))[1]); @@ -13714,8 +13436,8 @@ concretizeSubRR(AbstractInstruction * self_in_concretizeSubRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeSubRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubRR->operands))[1]); @@ -13730,8 +13452,8 @@ static usqInt NoDbgRegParms concretizeTstCqR(AbstractInstruction * self_in_concretizeTstCqR) { sqInt aWord; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeTstCqR->operands))[0]; leftReg = ((self_in_concretizeTstCqR->operands))[1]; @@ -13751,8 +13473,8 @@ concretizeTstCwR(AbstractInstruction * self_in_concretizeTstCwR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeTstCwR->operands))[0]; leftReg = ((self_in_concretizeTstCwR->operands))[1]; @@ -13784,8 +13506,8 @@ concretizeXorCwR(AbstractInstruction * self_in_concretizeXorCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeXorCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorCwR->operands))[1]); @@ -13807,8 +13529,8 @@ concretizeXorRR(AbstractInstruction * self_in_concretizeXorRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeXorRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorRR->operands))[1]); @@ -14924,7 +14646,7 @@ literalAtAddressput(AbstractInstruction * self_in_literalAtAddressput, sqInt mcp pc-4 ori rx, rx, lower */ /* CogMIPSELCompiler>>#literalBeforeFollowingAddress: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress) { if ((opcodeAtAddress(self_in_literalBeforeFollowingAddress, followingAddress - 4)) == ORI) { @@ -15048,9 +14770,9 @@ nop(AbstractInstruction * self_in_nop) static AbstractInstruction * NoDbgRegParms noteFollowingConditionalBranch(AbstractInstruction * self_in_noteFollowingConditionalBranch, AbstractInstruction *branch) { - usqIntptr_t newBranchLeft; + usqInt newBranchLeft; sqInt newBranchOpcode; - usqIntptr_t newBranchRight; + usqInt newBranchRight; if ((((branch->opcode)) == JumpOverflow) || (((branch->opcode)) == JumpNoOverflow)) { @@ -15482,11 +15204,11 @@ rewriteConditionalJumpLongAttarget(AbstractInstruction * self_in_rewriteConditio /* CogMIPSELCompiler>>#rewriteCPICJumpAt:target: */ static AbstractInstruction * NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { assert((opcodeAtAddress(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8)) == BNE); assert((longAt(addressFollowingJump - 4)) == (nop(self_in_rewriteCPICJumpAttarget))); - rewriteITypeBranchAtAddresstarget(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8, jumpTargetAddress); + rewriteITypeBranchAtAddresstarget(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8, jumpTargetAddr); assert((opcodeAtAddress(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8)) == BNE); assert((longAt(addressFollowingJump - 4)) == (nop(self_in_rewriteCPICJumpAttarget))); return self_in_rewriteCPICJumpAttarget; @@ -15717,7 +15439,7 @@ shRbaseoffset(AbstractInstruction * self_in_shRbaseoffset, sqInt srcReg, sqInt b static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - usqIntptr_t alignment; + usqInt alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -18003,6 +17725,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *jumpImm; AbstractInstruction *jumpNotSet; @@ -18028,7 +17751,17 @@ genPrimitiveIdentityHash(void) /* begin Jump: */ genoperand(Jump, ((sqInt)ret)); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } @@ -19524,7 +19257,9 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ - ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(1, "newHashTrampoline", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 1); + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); + ceInlineNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceInlineNewHash", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { @@ -22040,6 +21775,16 @@ nativeFloatRegisterMask(CogSimStackNativeEntry * self_in_nativeFloatRegisterMask : 0); } + /* CogSimStackNativeEntry>>#nativeFloatRegisterOrNone */ +static sqInt NoDbgRegParms +nativeFloatRegisterOrNone(CogSimStackNativeEntry * self_in_nativeFloatRegisterOrNone) +{ + return ((((self_in_nativeFloatRegisterOrNone->type)) == SSRegisterSingleFloat) + || (((self_in_nativeFloatRegisterOrNone->type)) == SSRegisterDoubleFloat) + ? (self_in_nativeFloatRegisterOrNone->registerr) + : NoReg); +} + /* CogSimStackNativeEntry>>#nativePopToReg: */ static CogSimStackNativeEntry * NoDbgRegParms nativePopToReg(CogSimStackNativeEntry * self_in_nativePopToReg, sqInt reg) @@ -22233,6 +21978,25 @@ nativeRegisterMask(CogSimStackNativeEntry * self_in_nativeRegisterMask) : 0)); } + /* CogSimStackNativeEntry>>#nativeRegisterOrNone */ +static sqInt NoDbgRegParms +nativeRegisterOrNone(CogSimStackNativeEntry * self_in_nativeRegisterOrNone) +{ + return ((((self_in_nativeRegisterOrNone->type)) == SSRegister) + || (((self_in_nativeRegisterOrNone->type)) == SSRegisterPair) + ? (self_in_nativeRegisterOrNone->registerr) + : NoReg); +} + + /* CogSimStackNativeEntry>>#nativeRegisterSecondOrNone */ +static sqInt NoDbgRegParms +nativeRegisterSecondOrNone(CogSimStackNativeEntry * self_in_nativeRegisterSecondOrNone) +{ + return (((self_in_nativeRegisterSecondOrNone->type)) == SSRegisterPair + ? (self_in_nativeRegisterSecondOrNone->registerSecond) + : NoReg); +} + /* CogSimStackNativeEntry>>#nativeStackPopToReg: */ static CogSimStackNativeEntry * NoDbgRegParms nativeStackPopToReg(CogSimStackNativeEntry * self_in_nativeStackPopToReg, sqInt reg) @@ -24516,7 +24280,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -24545,7 +24309,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1)); introspectionDataIndex += 2; } return 0; @@ -24803,7 +24567,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -25098,6 +24862,41 @@ voidCogCompiledCode(void) } } + /* SistaMethodZone>>#getCogCodeZoneThreshold */ +double +getCogCodeZoneThreshold(void) +{ + return thresholdRatio; +} + + /* SistaMethodZone>>#manageFrom:to: */ +static void NoDbgRegParms +manageFromto(sqInt theStartAddress, sqInt theLimitAddress) +{ + mzFreeStart = (baseAddress = theStartAddress); + youngReferrers = (limitAddress = theLimitAddress); + openPICList = null; + methodBytesFreedSinceLastCompaction = 0; + methodCount = 0; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; +} + + /* SistaMethodZone>>#setCogCodeZoneThreshold: */ +sqInt +setCogCodeZoneThreshold(double ratio) +{ + /* send of break elided */; + if (!((ratio >= 0.1) + && (ratio <= 1.0))) { + return PrimErrBadArgument; + } + thresholdRatio = ratio; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; + return 0; +} + /* Add a blockStart for an embedded block. For a binary tree walk block dispatch blocks must be compiled in pc/depth-first order but are scanned @@ -25212,6 +25011,24 @@ adjustArgumentsForPerform(sqInt numArgs) } +/* if there's a free register, use it */ + + /* StackToRegisterMappingCogit>>#allocateFloatRegNotConflictingWith: */ +static sqInt NoDbgRegParms +allocateFloatRegNotConflictingWith(sqInt regMask) +{ + sqInt reg; + + reg = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | regMask); + if (reg == NoReg) { + + /* No free register, choose one that does not conflict with regMask */ + reg = freeAnyFloatRegNotConflictingWith(regMask); + } + return reg; +} + + /* If the stack entry is already in a register not conflicting with regMask, answers it, else allocate a new register not conflicting with reg mask @@ -25295,7 +25112,8 @@ beginHighLevelCall(sqInt alignment) sqInt mask; sqInt offset; - ssFlushAll(); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin MoveR:Aw: */ address1 = stackPointerAddress(); /* begin checkLiteral:forInstruction: */ @@ -25488,7 +25306,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -25507,8 +25325,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -25711,7 +25529,11 @@ compileCogFullBlockMethod(sqInt numCopied) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -25785,7 +25607,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -26587,6 +26413,39 @@ eventualTargetOf(sqInt targetBytecodePC) } +/* Spill the closest register on stack not conflicting with regMask. + Assertion Failure if regMask has already all the registers */ + + /* StackToRegisterMappingCogit>>#freeAnyFloatRegNotConflictingWith: */ +static sqInt NoDbgRegParms +freeAnyFloatRegNotConflictingWith(sqInt regMask) +{ + CogSimStackEntry *desc; + sqInt index; + sqInt reg; + + assert(needsFrame); + reg = NoReg; + index = ((simSpillBase < 0) ? 0 : simSpillBase); + index = ((simNativeSpillBase < 0) ? 0 : simNativeSpillBase); + while ((reg == NoReg) + && (index < simNativeStackPtr)) { + desc = simNativeStackAt(index); + if ((((desc->type)) == SSRegisterSingleFloat) + || (((desc->type)) == SSRegisterDoubleFloat)) { + if (!(regMask & (registerMaskFor((desc->registerr))))) { + reg = (desc->registerr); + } + } + index += 1; + } + + assert(!((reg == NoReg))); + ssAllocateRequiredFloatReg(reg); + return reg; +} + + /* Spill the closest register on stack not conflicting with regMask. Assertion Failure if regMask has already all the registers */ @@ -27250,7 +27109,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -27484,7 +27344,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -27525,7 +27386,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc = ssTop(); ssPop(1); if ((((desc->type)) == SSConstant) @@ -27596,7 +27458,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -27624,396 +27487,658 @@ genLoadTempin(sqInt objectIndex, sqInt destReg) } -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAdd32 */ -static sqInt -genLowcodeAdd32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAdd64 */ -static sqInt -genLowcodeAdd64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, secondLow, firstLow); - /* begin AddcR:R: */ - genoperandoperand(AddcRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAlloca32 */ -static sqInt -genLowcodeAlloca32(void) -{ - sqInt address; - sqInt address1; - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction *anInstruction2; - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (size == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - /* begin MoveAw:R: */ - address = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction = genoperandoperand(MoveAwR, address, TempReg); - /* begin SubR:R: */ - genoperandoperand(SubRR, size, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(AndCqR, -16, TempReg); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, size); - /* begin MoveR:Aw: */ - address1 = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction2 = genoperandoperand(MoveRAw, size, address1); - ssPushNativeRegister(size); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAlloca64 */ -static sqInt -genLowcodeAlloca64(void) -{ - sqInt sizeHigh; - sqInt sizeLow; - - if (((sizeLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((sizeLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((sizeHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << sizeLow)))) == NoReg) { - ssAllocateRequiredReg((sizeHigh = Arg1Reg)); - } - if ((sizeLow == ReceiverResultReg) - || (sizeHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, sizeLow, SPReg); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, SPReg, sizeLow); - ssPushNativeRegister(sizeLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAnd32 */ -static sqInt -genLowcodeAnd32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AndR:R: */ - genoperandoperand(AndRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeAnd64 */ -static sqInt -genLowcodeAnd64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin AndR:R: */ - genoperandoperand(AndRR, secondLow, firstLow); - /* begin AndR:R: */ - genoperandoperand(AndRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeArithmeticRightShift32 */ -static sqInt -genLowcodeArithmeticRightShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ArithmeticShiftRightR:R: */ - genoperandoperand(ArithmeticShiftRightRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeArithmeticRightShift64 */ -static sqInt -genLowcodeArithmeticRightShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << shiftAmount)) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeBeginCall */ -static sqInt -genLowcodeBeginCall(void) -{ - sqInt alignment; - - alignment = extA; - beginHighLevelCall(alignment); - extA = 0; - return 0; -} - - /* Lowcode instruction generator dispatch */ /* StackToRegisterMappingCogit>>#genLowcodeBinaryInlinePrimitive: */ static sqInt NoDbgRegParms genLowcodeBinaryInlinePrimitive(sqInt prim) { + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + sqInt frResult; + sqInt frResult1; + sqInt object; + sqInt object1; + sqInt object10; + sqInt object11; + sqInt object12; + sqInt object13; + sqInt object14; + sqInt object15; + sqInt object16; + sqInt object17; + sqInt object18; + sqInt object19; + sqInt object2; + sqInt object20; + sqInt object21; + sqInt object22; + sqInt object23; + sqInt object3; + sqInt object4; + sqInt object5; + sqInt object6; + sqInt object7; + sqInt object8; + sqInt object9; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue10; + sqInt objectValue11; + sqInt objectValue12; + sqInt objectValue13; + sqInt objectValue14; + sqInt objectValue15; + sqInt objectValue16; + sqInt objectValue17; + sqInt objectValue18; + sqInt objectValue19; + sqInt objectValue2; + sqInt objectValue20; + sqInt objectValue21; + sqInt objectValue22; + sqInt objectValue23; + sqInt objectValue3; + sqInt objectValue4; + sqInt objectValue5; + sqInt objectValue6; + sqInt objectValue7; + sqInt objectValue8; + sqInt objectValue9; + sqInt pointer; + sqInt pointerValue; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop10; + sqInt rOopTop12; + sqInt rOopTop13; + sqInt rOopTop14; + sqInt rOopTop15; + sqInt rOopTop16; + sqInt rOopTop17; + sqInt rOopTop18; + sqInt rOopTop2; + sqInt rOopTop20; + sqInt rOopTop21; + sqInt rOopTop22; + sqInt rOopTop23; + sqInt rOopTop24; + sqInt rOopTop25; + sqInt rOopTop3; + sqInt rOopTop4; + sqInt rOopTop5; + sqInt rOopTop6; + sqInt rOopTop7; + sqInt rOopTop8; + sqInt rOopTop9; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult14; + sqInt rResult15; + sqInt rResult17; + sqInt rResult2; + sqInt rResult21; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value13; + sqInt value2; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value8; + sqInt valueHigh; + sqInt valueHigh1; + sqInt valueHigh2; + sqInt valueHigh3; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueHighValue3; + sqInt valueLow; + sqInt valueLow1; + sqInt valueLow2; + sqInt valueLow3; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueLowValue3; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue13; + sqInt valueValue2; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue8; + switch (prim) { case 0: - return genLowcodeByteSizeOf(); + /* begin genLowcodeByteSizeOf */ + rOopTop16 = NoReg; + rResult9 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop16 = registerOrNone(ssTop()); + } + if (rOopTop16 == NoReg) { + rOopTop16 = allocateRegNotConflictingWith(0); + } + rResult9 = allocateRegNotConflictingWith(1U << rOopTop16); + assert(!(((rOopTop16 == NoReg) + || (rResult9 == NoReg)))); + object15 = rOopTop16; + value8 = rResult9; + + popToReg(ssTop(), object15); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcByteSizeOfto(object15, value8); + return 0; case 1: - return genLowcodeFirstFieldPointer(); + /* begin genLowcodeFirstFieldPointer */ + rOopTop = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop == NoReg))); + object = rOopTop; + + popToReg(ssTop(), object); + ssPop(1); + genLcFirstFieldPointer(object); + return 0; case 2: - return genLowcodeFirstIndexableFieldPointer(); + /* begin genLowcodeFirstIndexableFieldPointer */ + rOopTop1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop1 == NoReg))); + object1 = rOopTop1; + + popToReg(ssTop(), object1); + ssPop(1); + genLcFirstIndexableFieldPointer(object1); + return 0; case 3: - return genLowcodeIsBytes(); + /* begin genLowcodeIsBytes */ + rOopTop2 = NoReg; + rResult = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rOopTop2); + assert(!(((rOopTop2 == NoReg) + || (rResult == NoReg)))); + object2 = rOopTop2; + value = rResult; + + popToReg(ssTop(), object2); + ssPop(1); + genLcIsBytesto(object2, value); + return 0; case 4: - return genLowcodeIsFloatObject(); + /* begin genLowcodeIsFloatObject */ + rOopTop3 = NoReg; + rResult1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1U << rOopTop3); + assert(!(((rOopTop3 == NoReg) + || (rResult1 == NoReg)))); + object3 = rOopTop3; + value1 = rResult1; + + popToReg(ssTop(), object3); + ssPop(1); + genLcIsFloatObjectto(object3, value1); + return 0; case 5: - return genLowcodeIsIndexable(); + /* begin genLowcodeIsIndexable */ + rOopTop4 = NoReg; + rResult2 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop4 = registerOrNone(ssTop()); + } + if (rOopTop4 == NoReg) { + rOopTop4 = allocateRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(1U << rOopTop4); + assert(!(((rOopTop4 == NoReg) + || (rResult2 == NoReg)))); + object4 = rOopTop4; + value2 = rResult2; + + popToReg(ssTop(), object4); + ssPop(1); + genLcIsIndexableto(object4, value2); + return 0; case 6: - return genLowcodeIsIntegerObject(); + /* begin genLowcodeIsIntegerObject */ + rOopTop5 = NoReg; + rResult3 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop5 = registerOrNone(ssTop()); + } + if (rOopTop5 == NoReg) { + rOopTop5 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rOopTop5); + assert(!(((rOopTop5 == NoReg) + || (rResult3 == NoReg)))); + object5 = rOopTop5; + value3 = rResult3; + + popToReg(ssTop(), object5); + ssPop(1); + genLcIsIntegerObjectto(object5, value3); + return 0; case 7: - return genLowcodeIsPointers(); + /* begin genLowcodeIsPointers */ + rOopTop6 = NoReg; + rResult4 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop6 = registerOrNone(ssTop()); + } + if (rOopTop6 == NoReg) { + rOopTop6 = allocateRegNotConflictingWith(0); + } + rResult4 = allocateRegNotConflictingWith(1U << rOopTop6); + assert(!(((rOopTop6 == NoReg) + || (rResult4 == NoReg)))); + object6 = rOopTop6; + value4 = rResult4; + + popToReg(ssTop(), object6); + ssPop(1); + genLcIsPointersto(object6, value4); + return 0; case 8: - return genLowcodeIsWords(); + /* begin genLowcodeIsWords */ + rOopTop7 = NoReg; + rResult5 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop7 = registerOrNone(ssTop()); + } + if (rOopTop7 == NoReg) { + rOopTop7 = allocateRegNotConflictingWith(0); + } + rResult5 = allocateRegNotConflictingWith(1U << rOopTop7); + assert(!(((rOopTop7 == NoReg) + || (rResult5 == NoReg)))); + object7 = rOopTop7; + value5 = rResult5; + + popToReg(ssTop(), object7); + ssPop(1); + genLcIsWordsto(object7, value5); + return 0; case 9: - return genLowcodeIsWordsOrBytes(); + /* begin genLowcodeIsWordsOrBytes */ + rOopTop8 = NoReg; + rResult6 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop8 = registerOrNone(ssTop()); + } + if (rOopTop8 == NoReg) { + rOopTop8 = allocateRegNotConflictingWith(0); + } + rResult6 = allocateRegNotConflictingWith(1U << rOopTop8); + assert(!(((rOopTop8 == NoReg) + || (rResult6 == NoReg)))); + object8 = rOopTop8; + value6 = rResult6; + + popToReg(ssTop(), object8); + ssPop(1); + genLcIsWordsOrBytesto(object8, value6); + return 0; case 10: - return genLowcodeOopSmallIntegerToInt32(); + /* begin genLowcodeOopSmallIntegerToInt32 */ + rOopTop9 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop9 = registerOrNone(ssTop()); + } + if (rOopTop9 == NoReg) { + rOopTop9 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop9 == NoReg))); + object9 = rOopTop9; + + popToReg(ssTop(), object9); + ssPop(1); + genConvertSmallIntegerToIntegerInReg(object9); + ssPushNativeRegister(object9); + return 0; case 11: - return genLowcodeOopSmallIntegerToInt64(); + /* begin genLowcodeOopSmallIntegerToInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop10 = NoReg; + rResult7 = (rResult21 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop10 = registerOrNone(ssTop()); + } + if (rOopTop10 == NoReg) { + rOopTop10 = allocateRegNotConflictingWith(0); + } + rResult7 = allocateRegNotConflictingWith(1U << rOopTop10); + rResult21 = allocateRegNotConflictingWith((1U << rOopTop10) | (1U << rResult7)); + assert(!(((rOopTop10 == NoReg) + || (rResult7 == NoReg)))); + object10 = rOopTop10; + valueLow = rResult7; + valueHigh = rResult21; + + popToReg(ssTop(), object10); + ssPop(1); + genConvertSmallIntegerToIntegerInReg(object10); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); + ssPushNativeRegistersecondRegister(object10, valueHigh); + + return 0; case 12: - return genLowcodeOopToBoolean32(); + /* begin genLowcodeOopToBoolean32 */ + rOopTop17 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop17 = registerOrNone(ssTop()); + } + if (rOopTop17 == NoReg) { + rOopTop17 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop17 == NoReg))); + object16 = rOopTop17; + + popToReg(ssTop(), object16); + ssPop(1); + annotateobjRef(gSubCwR(falseObject(), object16), falseObject()); + ssPushNativeRegister(object16); + return 0; case 13: - return genLowcodeOopToBoolean64(); + /* begin genLowcodeOopToBoolean64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop18 = NoReg; + rResult10 = (rResult22 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop18 = registerOrNone(ssTop()); + } + if (rOopTop18 == NoReg) { + rOopTop18 = allocateRegNotConflictingWith(0); + } + rResult10 = allocateRegNotConflictingWith(1U << rOopTop18); + rResult22 = allocateRegNotConflictingWith((1U << rOopTop18) | (1U << rResult10)); + assert(!(((rOopTop18 == NoReg) + || (rResult10 == NoReg)))); + object17 = rOopTop18; + valueLow1 = rResult10; + valueHigh1 = rResult22; + + popToReg(ssTop(), object17); + ssPop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh1); + annotateobjRef(gSubCwR(falseObject(), object17), falseObject()); + ssPushNativeRegistersecondRegister(object17, valueHigh1); + + return 0; case 14: - return genLowcodeOopToFloat32(); + /* begin genLowcodeOopToFloat32 */ + rOopTop20 = NoReg; + frResult = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop20 = registerOrNone(ssTop()); + } + if (rOopTop20 == NoReg) { + rOopTop20 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rOopTop20 == NoReg) + || (frResult == NoReg)))); + object18 = rOopTop20; + value10 = frResult; + + popToReg(ssTop(), object18); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoFloat32(object18, value10); + return 0; case 15: - return genLowcodeOopToFloat64(); + /* begin genLowcodeOopToFloat64 */ + rOopTop21 = NoReg; + frResult1 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop21 = registerOrNone(ssTop()); + } + if (rOopTop21 == NoReg) { + rOopTop21 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rOopTop21 == NoReg) + || (frResult1 == NoReg)))); + object19 = rOopTop21; + value11 = frResult1; + + popToReg(ssTop(), object19); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoFloat64(object19, value11); + return 0; case 16: - return genLowcodeOopToInt32(); + /* begin genLowcodeOopToInt32 */ + rOopTop22 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop22 = registerOrNone(ssTop()); + } + if (rOopTop22 == NoReg) { + rOopTop22 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop22 == NoReg))); + object20 = rOopTop22; + + popToReg(ssTop(), object20); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToInt32(object20); + return 0; case 17: - return genLowcodeOopToInt64(); + /* begin genLowcodeOopToInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop23 = NoReg; + rResult14 = (rResult23 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop23 = registerOrNone(ssTop()); + } + if (rOopTop23 == NoReg) { + rOopTop23 = allocateRegNotConflictingWith(0); + } + rResult14 = allocateRegNotConflictingWith(1U << rOopTop23); + rResult23 = allocateRegNotConflictingWith((1U << rOopTop23) | (1U << rResult14)); + assert(!(((rOopTop23 == NoReg) + || (rResult14 == NoReg)))); + object21 = rOopTop23; + valueLow2 = rResult14; + valueHigh2 = rResult23; + + popToReg(ssTop(), object21); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoInt64highPart(object21, valueLow2, valueHigh2); + + return 0; case 18: - return genLowcodeOopToPointer(); + /* begin genLowcodeOopToPointer */ + rOopTop12 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop12 = registerOrNone(ssTop()); + } + if (rOopTop12 == NoReg) { + rOopTop12 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop12 == NoReg))); + object11 = rOopTop12; + + popToReg(ssTop(), object11); + ssPop(1); + genLcOopToPointer(object11); + return 0; case 19: - return genLowcodeOopToPointerReinterpret(); + /* begin genLowcodeOopToPointerReinterpret */ + rOopTop13 = NoReg; + rResult8 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop13 = registerOrNone(ssTop()); + } + if (rOopTop13 == NoReg) { + rOopTop13 = allocateRegNotConflictingWith(0); + } + rResult8 = allocateRegNotConflictingWith(1U << rOopTop13); + assert(!(((rOopTop13 == NoReg) + || (rResult8 == NoReg)))); + object12 = rOopTop13; + pointer = rResult8; + + popToReg(ssTop(), object12); + ssPop(1); + ssPushNativeRegister(object12); + return 0; case 20: - return genLowcodeOopToUInt32(); + /* begin genLowcodeOopToUInt32 */ + rOopTop24 = NoReg; + rResult15 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop24 = registerOrNone(ssTop()); + } + if (rOopTop24 == NoReg) { + rOopTop24 = allocateRegNotConflictingWith(0); + } + rResult15 = allocateRegNotConflictingWith(1U << rOopTop24); + assert(!(((rOopTop24 == NoReg) + || (rResult15 == NoReg)))); + object22 = rOopTop24; + value13 = rResult15; + + popToReg(ssTop(), object22); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOopToUInt32(object22); + return 0; case 21: - return genLowcodeOopToUInt64(); + /* begin genLowcodeOopToUInt64 */ + /* begin allocateRegistersForLowcodeOopResultInteger2: */ + rOopTop25 = NoReg; + rResult17 = (rResult24 = NoReg); + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop25 = registerOrNone(ssTop()); + } + if (rOopTop25 == NoReg) { + rOopTop25 = allocateRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(1U << rOopTop25); + rResult24 = allocateRegNotConflictingWith((1U << rOopTop25) | (1U << rResult17)); + assert(!(((rOopTop25 == NoReg) + || (rResult17 == NoReg)))); + object23 = rOopTop25; + valueLow3 = rResult17; + valueHigh3 = rResult24; + + popToReg(ssTop(), object23); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcOoptoUInt64highPart(object23, valueLow3, valueHigh3); + + return 0; case 22: - return genLowcodePin(); + /* begin genLowcodePin */ + rOopTop14 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop14 = registerOrNone(ssTop()); + } + if (rOopTop14 == NoReg) { + rOopTop14 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop14 == NoReg))); + object13 = rOopTop14; + + popToReg(ssTop(), object13); + ssPop(1); + abort(); + return 0; case 23: - return genLowcodeUnpin(); + /* begin genLowcodeUnpin */ + rOopTop15 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop15 = registerOrNone(ssTop()); + } + if (rOopTop15 == NoReg) { + rOopTop15 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop15 == NoReg))); + object14 = rOopTop15; + + popToReg(ssTop(), object14); + ssPop(1); + abort(); + return 0; default: return EncounteredUnknownBytecode; @@ -28023,7901 +28148,630 @@ genLowcodeBinaryInlinePrimitive(sqInt prim) } -/* Lowcode instruction generator */ +/* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeBoolean32ToOop */ -static sqInt -genLowcodeBoolean32ToOop(void) + /* StackToRegisterMappingCogit>>#genLowcodeNullaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeNullaryInlinePrimitive(sqInt prim) { AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction3; AbstractInstruction * cont; + AbstractInstruction * cont1; + sqInt floatValue; + sqInt floatValueValue; + sqInt frTop; + sqInt frTop1; AbstractInstruction * inst; + AbstractInstruction * inst1; sqInt object; + sqInt object1; + sqInt object2; + sqInt object3; + sqInt object4; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue2; + sqInt objectValue3; + sqInt objectValue4; + sqInt pointer; + sqInt pointer1; + sqInt pointerClassLiteral; + sqInt pointerValue; + sqInt pointerValue1; + sqInt reg; + sqInt reg1; + sqInt reg2; + sqInt rNext; + sqInt rNext1; + sqInt rNext2; + sqInt rResult; + sqInt rResult2; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rTop; + sqInt rTop2; + sqInt rTop3; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt singleFloatValue; + sqInt singleFloatValueValue; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask2; AbstractInstruction * trueJump; + AbstractInstruction * trueJump1; sqInt value; - sqInt wordConstant; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, value); - /* begin JumpNonZero: */ - trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - annotateobjRef(gMoveCwR(falseObject(), value), falseObject()); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - /* begin MoveCw:R: */ - wordConstant = trueObject(); - /* begin checkLiteral:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCwR, wordConstant, value); - inst = anInstruction1; - jmpTarget(trueJump, inst); - annotateobjRef(inst, trueObject()); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeBoolean64ToOop */ -static sqInt -genLowcodeBoolean64ToOop(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction * cont; - AbstractInstruction * inst; - sqInt object; - AbstractInstruction * trueJump; + sqInt value2; + sqInt value4; + sqInt value5; sqInt valueHigh; + sqInt valueHigh1; + sqInt valueHigh2; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; sqInt valueLow; + sqInt valueLow1; + sqInt valueLow2; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueValue; + sqInt valueValue2; + sqInt valueValue4; + sqInt valueValue5; sqInt wordConstant; + sqInt wordConstant2; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, valueLow, valueHigh); - /* begin JumpNonZero: */ - trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - annotateobjRef(gMoveCwR(falseObject(), valueLow), falseObject()); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - /* begin MoveCw:R: */ - wordConstant = trueObject(); - /* begin checkLiteral:forInstruction: */ - anInstruction = genoperandoperand(MoveCwR, wordConstant, valueLow); - inst = anInstruction; - jmpTarget(trueJump, inst); - annotateobjRef(inst, trueObject()); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushRegister(valueLow); + + switch (prim) { + case 0: + /* begin genLowcodeBoolean32ToOop */ + rTop = NoReg; + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rTop); + assert(!(((rTop == NoReg) + || (rResult == NoReg)))); + value = rTop; + object = rResult; - return 0; -} + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(CmpCqR, 0, value); + /* begin JumpNonZero: */ + trueJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + annotateobjRef(gMoveCwR(falseObject(), value), falseObject()); + /* begin Jump: */ + cont = genoperand(Jump, ((sqInt)0)); + /* begin MoveCw:R: */ + wordConstant = trueObject(); + /* begin checkLiteral:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCwR, wordConstant, value); + inst = anInstruction1; + jmpTarget(trueJump, inst); + annotateobjRef(inst, trueObject()); + jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushRegister(value); + return 0; + case 1: + /* begin genLowcodeBoolean64ToOop */ + /* begin allocateRegistersForLowcodeInteger2ResultOop: */ + topRegistersMask = 0; + rTop2 = (rNext = NoReg); + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop2 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext == NoReg)))); + rResult2 = allocateFloatRegNotConflictingWith((1U << rTop2) | (1U << rNext)); + assert(!((rResult2 == NoReg))); + valueLow = rTop2; + valueHigh = rNext; + object1 = rResult2; -/* Lowcode instruction generator */ + nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, valueLow, valueHigh); + /* begin JumpNonZero: */ + trueJump1 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + annotateobjRef(gMoveCwR(falseObject(), valueLow), falseObject()); + /* begin Jump: */ + cont1 = genoperand(Jump, ((sqInt)0)); + /* begin MoveCw:R: */ + wordConstant2 = trueObject(); + /* begin checkLiteral:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCwR, wordConstant2, valueLow); + inst1 = anInstruction3; + jmpTarget(trueJump1, inst1); + annotateobjRef(inst1, trueObject()); + jmpTarget(cont1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushRegister(valueLow); - /* StackToRegisterMappingCogit>>#genLowcodeByteSizeOf */ -static sqInt -genLowcodeByteSizeOf(void) -{ - sqInt object; - sqInt value; + return 0; - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcByteSizeOfto(object, value); - return 0; -} + case 2: + /* begin genLowcodeFloat32ToOop */ + frTop = NoReg; + + /* Float argument */ + rResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(0); + assert(!(((frTop == NoReg) + || (rResult3 == NoReg)))); + singleFloatValue = frTop; + object2 = rResult3; + + nativePopToReg(ssNativeTop(), singleFloatValue); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcFloat32toOop(singleFloatValue, object2); + return 0; + case 3: + /* begin genLowcodeFloat64ToOop */ + frTop1 = NoReg; + + /* Float argument */ + rResult4 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + rResult4 = allocateRegNotConflictingWith(0); + assert(!(((frTop1 == NoReg) + || (rResult4 == NoReg)))); + floatValue = frTop1; + object3 = rResult4; + + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcFloat64toOop(floatValue, object3); + return 0; -/* Lowcode instruction generator */ + case 4: + /* begin genLowcodeInt32ToOop */ + rTop3 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(0); + } + assert(!((rTop3 == NoReg))); + value2 = rTop3; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInt32ToOop(value2); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentFloat32 */ -static sqInt -genLowcodeCallArgumentFloat32(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt literal; + case 5: + /* begin genLowcodeInt64ToOop */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask1 = 0; + rTop4 = (rNext1 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext1 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg1; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext1 == NoReg)))); + valueLow1 = rTop4; + valueHigh1 = rNext1; - nativeStackPopToReg(ssNativeTop(), DPFPReg0); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - literal = -BytesPerWord; - anInstruction = genoperandoperandoperand(MoveRsM32r, DPFPReg0, -BytesPerWord, SPReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(SubCqR, BytesPerWord, SPReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInt64ToOophighPart(valueLow1, valueHigh1); + return 0; -/* Lowcode instruction generator */ + case 6: + /* begin genLowcodePointerToOop */ + pointerClassLiteral = getLiteral(extA); + /* begin allocateRegistersForLowcodeInteger: */ + rTop7 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop7 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + assert(!((rTop7 == NoReg))); + pointer1 = rTop7; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcPointerToOopclass(pointer1, pointerClassLiteral); + extA = 0; + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentFloat64 */ -static sqInt -genLowcodeCallArgumentFloat64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; + case 7: + /* begin genLowcodePointerToOopReinterprer */ + rTop5 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(0); + } + assert(!((rTop5 == NoReg))); + pointer = rTop5; - nativeStackPopToReg(ssNativeTop(), DPFPReg0); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, DPFPReg0, -8, SPReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(SubCqR, 8, SPReg); - currentCallCleanUpSize += 8; - return 0; -} + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + ssPushRegister(pointer); + return 0; + case 8: + /* begin genLowcodeSmallInt32ToOop */ + rTop6 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + assert(!((rTop6 == NoReg))); + value4 = rTop6; -/* Lowcode instruction generator */ + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + genConvertIntegerToSmallIntegerInReg(value4); + ssPushRegister(value4); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentInt32 */ -static sqInt -genLowcodeCallArgumentInt32(void) -{ - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} + case 9: + /* begin genLowcodeUint32ToOop */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value5 = rTop8; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcUInt32ToOop(value5); + return 0; + case 10: + /* begin genLowcodeUint64ToOop */ + /* begin allocateRegistersForLowcodeInteger2ResultOop: */ + topRegistersMask2 = 0; + rTop9 = (rNext2 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop9 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext2 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop9); + } + assert(!(((rTop9 == NoReg) + || (rNext2 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop9) | (1U << rNext2)); + assert(!((rResult5 == NoReg))); + valueLow2 = rTop9; + valueHigh2 = rNext2; + object4 = rResult5; -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentInt64 */ -static sqInt -genLowcodeCallArgumentInt64(void) -{ - nativeStackPopToRegsecondReg(ssNativeTop(), TempReg, ReceiverResultReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - /* begin PushR: */ - genoperand(PushR, ReceiverResultReg); - currentCallCleanUpSize += 8; - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentPointer */ -static sqInt -genLowcodeCallArgumentPointer(void) -{ - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin PushR: */ - genoperand(PushR, TempReg); - currentCallCleanUpSize += BytesPerWord; - return 0; -} - - -/* Lowcode instruction generator */ -/* Allocate space */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentSpace */ -static sqInt -genLowcodeCallArgumentSpace(void) -{ - AbstractInstruction *anInstruction; - - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(SubCqR, extA, SPReg); - currentCallCleanUpSize += extA; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ -/* Fetch the pointer */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallArgumentStructure */ -static sqInt -genLowcodeCallArgumentStructure(void) -{ - AbstractInstruction *anInstruction; - - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(SubCqR, extA, SPReg); - - /* Copy the structure */ - currentCallCleanUpSize += extA; - genMemCopytoconstantSize(backEnd, TempReg, SPReg, extA); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallInstruction */ -static sqInt -genLowcodeCallInstruction(void) -{ - AbstractInstruction *abstractInstruction; - sqInt function; - - function = extA; - /* begin CallRT: */ - abstractInstruction = genoperand(Call, function); - (abstractInstruction->annotation = IsRelativeCall); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCallPhysical */ -static sqInt -genLowcodeCallPhysical(void) -{ - sqInt registerID; - - registerID = extA; - /* begin CallR: */ - genoperand(CallR, registerID); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCheckSessionIdentifier */ -static sqInt -genLowcodeCheckSessionIdentifier(void) -{ - sqInt expectedSession; - - expectedSession = extA; - ssPushNativeConstantInt32((expectedSession == (getThisSessionID()) - ? 1 - : 0)); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeCompareAndSwap32 */ -static sqInt -genLowcodeCompareAndSwap32(void) -{ - sqInt check; - sqInt newValue; - sqInt oldValue; - sqInt value; - - if (((newValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((newValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((oldValue = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << newValue)))) == NoReg) { - ssAllocateRequiredReg((oldValue = Arg1Reg)); - } - if (((check = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << newValue)) | (1U << oldValue)))) == NoReg) { - ssAllocateRequiredReg((check = SendNumArgsReg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << newValue)) | (1U << oldValue)) | (1U << check)))) == NoReg) { - ssAllocateRequiredReg((value = ClassReg)); - } - if ((((newValue == ReceiverResultReg) - || (oldValue == ReceiverResultReg)) - || (check == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), newValue); - ssNativePop(1); - nativePopToReg(ssNativeTop(), oldValue); - ssNativePop(1); - nativePopToReg(ssNativeTop(), check); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDiv32 */ -static sqInt -genLowcodeDiv32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, first, second); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDiv64 */ -static sqInt -genLowcodeDiv64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateFloat32 */ -static sqInt -genLowcodeDuplicateFloat32(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((dup2 = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((dup2 = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveRs:Rs: */ - genoperandoperand(MoveRsRs, value, dup2); - ssPushNativeRegisterSingleFloat(value); - ssPushNativeRegisterSingleFloat(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateFloat64 */ -static sqInt -genLowcodeDuplicateFloat64(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((dup2 = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((dup2 = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveRd:Rd: */ - genoperandoperand(MoveRdRd, value, dup2); - ssPushNativeRegisterDoubleFloat(value); - ssPushNativeRegisterDoubleFloat(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateInt32 */ -static sqInt -genLowcodeDuplicateInt32(void) -{ - sqInt dup2; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dup2 = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((dup2 = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (dup2 == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, dup2); - ssPushNativeRegister(value); - ssPushNativeRegister(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicateInt64 */ -static sqInt -genLowcodeDuplicateInt64(void) -{ - sqInt dup2High; - sqInt dup2Low; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((dup2Low = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((dup2Low = SendNumArgsReg)); - } - if (((dup2High = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)) | (1U << dup2Low)))) == NoReg) { - ssAllocateRequiredReg((dup2High = ClassReg)); - } - if ((((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (dup2Low == ReceiverResultReg)) - || (dup2High == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, valueLow, dup2Low); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, valueHigh, dup2High); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - ssPushNativeRegistersecondRegister(dup2Low, dup2High); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeDuplicatePointer */ -static sqInt -genLowcodeDuplicatePointer(void) -{ - sqInt dup2; - sqInt pointerValue; - - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dup2 = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointerValue)))) == NoReg) { - ssAllocateRequiredReg((dup2 = Arg1Reg)); - } - if ((pointerValue == ReceiverResultReg) - || (dup2 == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointerValue, dup2); - ssPushNativeRegister(pointerValue); - ssPushNativeRegister(dup2); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEffectiveAddress32 */ -static sqInt -genLowcodeEffectiveAddress32(void) -{ - sqInt base; - sqInt index; - sqInt offset; - sqInt scale; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((scale = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offset)))) == NoReg) { - ssAllocateRequiredReg((scale = Arg1Reg)); - } - if (((index = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << offset)) | (1U << scale)))) == NoReg) { - ssAllocateRequiredReg((index = SendNumArgsReg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << offset)) | (1U << scale)) | (1U << index)))) == NoReg) { - ssAllocateRequiredReg((base = ClassReg)); - } - if ((((offset == ReceiverResultReg) - || (scale == ReceiverResultReg)) - || (index == ReceiverResultReg)) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), scale); - ssNativePop(1); - nativePopToReg(ssNativeTop(), index); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, scale, index); - /* begin AddR:R: */ - genoperandoperand(AddRR, index, base); - /* begin AddR:R: */ - genoperandoperand(AddRR, offset, base); - ssPushNativeRegister(base); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEffectiveAddress64 */ -static sqInt -genLowcodeEffectiveAddress64(void) -{ - sqInt base; - sqInt index; - sqInt offset; - sqInt result; - sqInt scale; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((scale = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offset)))) == NoReg) { - ssAllocateRequiredReg((scale = Arg1Reg)); - } - if (((index = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << offset)) | (1U << scale)))) == NoReg) { - ssAllocateRequiredReg((index = SendNumArgsReg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << offset)) | (1U << scale)) | (1U << index)))) == NoReg) { - ssAllocateRequiredReg((base = ClassReg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((((liveRegisters()) | (1U << offset)) | (1U << scale)) | (1U << index)) | (1U << base)))) == NoReg) { - ssAllocateRequiredReg((result = ReceiverResultReg)); - } - if (((((offset == ReceiverResultReg) - || (scale == ReceiverResultReg)) - || (index == ReceiverResultReg)) - || (base == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), scale); - ssNativePop(1); - nativePopToReg(ssNativeTop(), index); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEndCall */ -static sqInt -genLowcodeEndCall(void) -{ - endHighLevelCallWithCleanup(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeEndCallNoCleanup */ -static sqInt -genLowcodeEndCallNoCleanup(void) -{ - endHighLevelCallWithoutCleanup(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFirstFieldPointer */ -static sqInt -genLowcodeFirstFieldPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcFirstFieldPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFirstIndexableFieldPointer */ -static sqInt -genLowcodeFirstIndexableFieldPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcFirstIndexableFieldPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Add */ -static sqInt -genLowcodeFloat32Add(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddRs:Rs: */ - genoperandoperand(AddRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Div */ -static sqInt -genLowcodeFloat32Div(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin DivRs:Rs: */ - genoperandoperand(DivRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Equal */ -static sqInt -genLowcodeFloat32Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPNotEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Great */ -static sqInt -genLowcodeFloat32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPLessOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32GreatEqual */ -static sqInt -genLowcodeFloat32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPLess(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Less */ -static sqInt -genLowcodeFloat32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPGreaterOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32LessEqual */ -static sqInt -genLowcodeFloat32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPGreater(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Mul */ -static sqInt -genLowcodeFloat32Mul(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulRs:Rs: */ - genoperandoperand(MulRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Neg */ -static sqInt -genLowcodeFloat32Neg(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin XorRs:Rs: */ - genoperandoperand(XorRsRs, result, result); - /* begin SubRs:Rs: */ - genoperandoperand(SubRsRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32NotEqual */ -static sqInt -genLowcodeFloat32NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRs:Rs: */ - genoperandoperand(CmpRsRs, second, first); - - /* True result */ - falseJump = gJumpFPEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Sqrt */ -static sqInt -genLowcodeFloat32Sqrt(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SqrtRs: */ - genoperand(SqrtRs, value); - ssPushNativeRegisterSingleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32Sub */ -static sqInt -genLowcodeFloat32Sub(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubRs:Rs: */ - genoperandoperand(SubRsRs, second, first); - ssPushNativeRegisterSingleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToFloat64 */ -static sqInt -genLowcodeFloat32ToFloat64(void) -{ - sqInt singleFloatValue; - - if (((singleFloatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((singleFloatValue = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), singleFloatValue); - ssNativePop(1); - /* begin ConvertRs:Rd: */ - genoperandoperand(ConvertRsRd, singleFloatValue, singleFloatValue); - ssPushNativeRegisterDoubleFloat(singleFloatValue); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToInt32 */ -static sqInt -genLowcodeFloat32ToInt32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertRs:R: */ - genoperandoperand(ConvertRsR, value, result); - ssPushNativeRegister(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToInt64 */ -static sqInt -genLowcodeFloat32ToInt64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToOop */ -static sqInt -genLowcodeFloat32ToOop(void) -{ - sqInt object; - sqInt singleFloatValue; - - if (((singleFloatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((singleFloatValue = DPFPReg0)); - } - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), singleFloatValue); - ssNativePop(1); - ssFlushAll(); - genLcFloat32toOop(singleFloatValue, object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToUInt32 */ -static sqInt -genLowcodeFloat32ToUInt32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertRs:R: */ - genoperandoperand(ConvertRsR, value, result); - ssPushNativeRegister(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat32ToUInt64 */ -static sqInt -genLowcodeFloat32ToUInt64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Add */ -static sqInt -genLowcodeFloat64Add(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin AddRd:Rd: */ - genoperandoperand(AddRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Div */ -static sqInt -genLowcodeFloat64Div(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin DivRd:Rd: */ - genoperandoperand(DivRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Equal */ -static sqInt -genLowcodeFloat64Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPNotEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Great */ -static sqInt -genLowcodeFloat64Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPLessOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64GreatEqual */ -static sqInt -genLowcodeFloat64GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPLess(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Less */ -static sqInt -genLowcodeFloat64Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPGreaterOrEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64LessEqual */ -static sqInt -genLowcodeFloat64LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPGreater(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Mul */ -static sqInt -genLowcodeFloat64Mul(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulRd:Rd: */ - genoperandoperand(MulRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Neg */ -static sqInt -genLowcodeFloat64Neg(void) -{ - sqInt result; - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin XorRd:Rd: */ - genoperandoperand(XorRdRd, result, result); - /* begin SubRd:Rd: */ - genoperandoperand(SubRdRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64NotEqual */ -static sqInt -genLowcodeFloat64NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpRd:Rd: */ - genoperandoperand(CmpRdRd, second, first); - - /* True result */ - falseJump = gJumpFPEqual(0); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, value); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, value); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Sqrt */ -static sqInt -genLowcodeFloat64Sqrt(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SqrtRd: */ - genoperand(SqrtRd, value); - ssPushNativeRegisterDoubleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64Sub */ -static sqInt -genLowcodeFloat64Sub(void) -{ - sqInt first; - sqInt second; - - if (((second = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((second = DPFPReg0)); - } - if (((first = availableFloatRegisterOrNoneFor(backEnd, (liveFloatRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredFloatReg((first = DPFPReg1)); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubRd:Rd: */ - genoperandoperand(SubRdRd, second, first); - ssPushNativeRegisterDoubleFloat(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToFloat32 */ -static sqInt -genLowcodeFloat64ToFloat32(void) -{ - sqInt floatValue; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:Rs: */ - genoperandoperand(ConvertRdRs, floatValue, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToInt32 */ -static sqInt -genLowcodeFloat64ToInt32(void) -{ - sqInt floatValue; - sqInt int32Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int32Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int32Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int32Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:R: */ - genoperandoperand(ConvertRdR, floatValue, int32Result); - ssPushNativeRegister(int32Result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToInt64 */ -static sqInt -genLowcodeFloat64ToInt64(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToOop */ -static sqInt -genLowcodeFloat64ToOop(void) -{ - sqInt floatValue; - sqInt object; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - ssFlushAll(); - genLcFloat64toOop(floatValue, object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToUInt32 */ -static sqInt -genLowcodeFloat64ToUInt32(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin ConvertRd:R: */ - genoperandoperand(ConvertRdR, floatValue, int64Result); - ssPushNativeRegister(int64Result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFloat64ToUInt64 */ -static sqInt -genLowcodeFloat64ToUInt64(void) -{ - sqInt floatValue; - sqInt int64Result; - - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (((int64Result = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((int64Result = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (int64Result == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeFree */ -static sqInt -genLowcodeFree(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssFlushAll(); - if (pointer != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointer, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFreeTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateIndexable32Oop */ -static sqInt -genLowcodeInstantiateIndexable32Oop(void) -{ - sqInt classOop; - sqInt indexableSize; - sqInt object; - - if (((indexableSize = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((indexableSize = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((classOop = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << indexableSize)))) == NoReg) { - ssAllocateRequiredReg((classOop = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << indexableSize)) | (1U << classOop)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((indexableSize == ReceiverResultReg) - || (classOop == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), indexableSize); - ssNativePop(1); - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOopindexableSize(classOop, indexableSize); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateIndexableOop */ -static sqInt -genLowcodeInstantiateIndexableOop(void) -{ - sqInt classOop; - sqInt indexableSize; - sqInt object; - - indexableSize = extA; - if (((classOop = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((classOop = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << classOop)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((classOop == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOopconstantIndexableSize(classOop, indexableSize); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInstantiateOop */ -static sqInt -genLowcodeInstantiateOop(void) -{ - sqInt classOop; - - if (((classOop = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((classOop = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (classOop == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), classOop); - ssPop(1); - ssFlushAll(); - genLcInstantiateOop(classOop); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Equal */ -static sqInt -genLowcodeInt32Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Great */ -static sqInt -genLowcodeInt32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpLessOrEqual: */ - falseJump = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32GreatEqual */ -static sqInt -genLowcodeInt32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpLess: */ - falseJump = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32Less */ -static sqInt -genLowcodeInt32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpGreaterOrEqual: */ - falseJump = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32LessEqual */ -static sqInt -genLowcodeInt32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpGreater: */ - falseJump = genConditionalBranchoperand(JumpGreater, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32NotEqual */ -static sqInt -genLowcodeInt32NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToFloat32 */ -static sqInt -genLowcodeInt32ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rs: */ - genoperandoperand(ConvertRRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToFloat64 */ -static sqInt -genLowcodeInt32ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rd: */ - genoperandoperand(ConvertRRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToOop */ -static sqInt -genLowcodeInt32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcInt32ToOop(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt32ToPointer */ -static sqInt -genLowcodeInt32ToPointer(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Equal */ -static sqInt -genLowcodeInt64Equal(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - AbstractInstruction * falseJump2; - AbstractInstruction * falseLabel; - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondHigh, firstHigh); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondLow, firstLow); - /* begin JumpNonZero: */ - falseJump2 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, firstLow); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, firstLow); - falseLabel = anInstruction1; - jmpTarget(falseJump, falseLabel); - jmpTarget(falseJump2, falseLabel); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(firstLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Great */ -static sqInt -genLowcodeInt64Great(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64GreatEqual */ -static sqInt -genLowcodeInt64GreatEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64Less */ -static sqInt -genLowcodeInt64Less(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64LessEqual */ -static sqInt -genLowcodeInt64LessEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64NotEqual */ -static sqInt -genLowcodeInt64NotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - AbstractInstruction * falseJump2; - AbstractInstruction * falseLabel; - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondHigh, firstHigh); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, secondLow, firstLow); - /* begin JumpNonZero: */ - falseJump2 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, firstLow); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 1, firstLow); - falseLabel = anInstruction1; - jmpTarget(falseJump, falseLabel); - jmpTarget(falseJump2, falseLabel); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(firstLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToFloat32 */ -static sqInt -genLowcodeInt64ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToFloat64 */ -static sqInt -genLowcodeInt64ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToOop */ -static sqInt -genLowcodeInt64ToOop(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssFlushAll(); - genLcInt64ToOophighPart(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeInt64ToPointer */ -static sqInt -genLowcodeInt64ToPointer(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsBytes */ -static sqInt -genLowcodeIsBytes(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsBytesto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsFloatObject */ -static sqInt -genLowcodeIsFloatObject(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsFloatObjectto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsIndexable */ -static sqInt -genLowcodeIsIndexable(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsIndexableto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsIntegerObject */ -static sqInt -genLowcodeIsIntegerObject(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsIntegerObjectto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsPointers */ -static sqInt -genLowcodeIsPointers(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsPointersto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsWords */ -static sqInt -genLowcodeIsWords(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsWordsto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeIsWordsOrBytes */ -static sqInt -genLowcodeIsWordsOrBytes(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcIsWordsOrBytesto(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLeftShift32 */ -static sqInt -genLowcodeLeftShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin LogicalShiftLeftR:R: */ - genoperandoperand(LogicalShiftLeftRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLeftShift64 */ -static sqInt -genLowcodeLeftShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << shiftAmount)) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentAddress */ -static sqInt -genLowcodeLoadArgumentAddress(void) -{ - sqInt baseOffset; - sqInt pointer; - - baseOffset = extA; - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, pointer); - ssPushNativeRegister(pointer); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentFloat32 */ -static sqInt -genLowcodeLoadArgumentFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt floatValue; - - baseOffset = extA; - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentFloat64 */ -static sqInt -genLowcodeLoadArgumentFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt doubleValue; - - baseOffset = extA; - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); - ssPushNativeRegisterDoubleFloat(doubleValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt16 */ -static sqInt -genLowcodeLoadArgumentInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt32 */ -static sqInt -genLowcodeLoadArgumentInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt64 */ -static sqInt -genLowcodeLoadArgumentInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentInt8 */ -static sqInt -genLowcodeLoadArgumentInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentPointer */ -static sqInt -genLowcodeLoadArgumentPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerResult; - - baseOffset = extA; - if (((pointerResult = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerResult = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerResult == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); - ssPushNativeRegister(pointerResult); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt16 */ -static sqInt -genLowcodeLoadArgumentUInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt32 */ -static sqInt -genLowcodeLoadArgumentUInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt64 */ -static sqInt -genLowcodeLoadArgumentUInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadArgumentUInt8 */ -static sqInt -genLowcodeLoadArgumentUInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeArgumentAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadFloat32FromMemory */ -static sqInt -genLowcodeLoadFloat32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, pointer, value); - ssPushNativeRegisterSingleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadFloat64FromMemory */ -static sqInt -genLowcodeLoadFloat64FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, pointer, value); - ssPushNativeRegisterDoubleFloat(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt16FromMemory */ -static sqInt -genLowcodeLoadInt16FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, pointer, value); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt32FromMemory */ -static sqInt -genLowcodeLoadInt32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt64FromMemory */ -static sqInt -genLowcodeLoadInt64FromMemory(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt pointer; - sqInt valueHigh; - sqInt valueLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, pointer, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadInt8FromMemory */ -static sqInt -genLowcodeLoadInt8FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, pointer, value); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalAddress */ -static sqInt -genLowcodeLoadLocalAddress(void) -{ - sqInt baseOffset; - sqInt pointer; - - baseOffset = extA; - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, pointer); - ssPushNativeRegister(pointer); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalFloat32 */ -static sqInt -genLowcodeLoadLocalFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt floatValue; - - baseOffset = extA; - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue); - ssPushNativeRegisterSingleFloat(floatValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalFloat64 */ -static sqInt -genLowcodeLoadLocalFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt doubleValue; - - baseOffset = extA; - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); - ssPushNativeRegisterDoubleFloat(doubleValue); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt16 */ -static sqInt -genLowcodeLoadLocalInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt32 */ -static sqInt -genLowcodeLoadLocalInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt64 */ -static sqInt -genLowcodeLoadLocalInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalInt8 */ -static sqInt -genLowcodeLoadLocalInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalPointer */ -static sqInt -genLowcodeLoadLocalPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerResult; - - baseOffset = extA; - if (((pointerResult = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerResult = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerResult == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); - ssPushNativeRegister(pointerResult); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt16 */ -static sqInt -genLowcodeLoadLocalUInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt32 */ -static sqInt -genLowcodeLoadLocalUInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt64 */ -static sqInt -genLowcodeLoadLocalUInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadLocalUInt8 */ -static sqInt -genLowcodeLoadLocalUInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, TempReg, value); - ssPushNativeRegister(value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadObjectAt */ -static sqInt -genLowcodeLoadObjectAt(void) -{ - sqInt fieldIndex; - sqInt object; - - if (((fieldIndex = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((fieldIndex = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << fieldIndex)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((fieldIndex == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), fieldIndex); - ssNativePop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcLoadObjectat(object, fieldIndex); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadObjectField */ -static sqInt -genLowcodeLoadObjectField(void) -{ - sqInt fieldIndex; - sqInt object; - - fieldIndex = extA; - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcLoadObjectfield(object, fieldIndex); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadPointerFromMemory */ -static sqInt -genLowcodeLoadPointerFromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt pointerResult; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointerResult = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((pointerResult = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (pointerResult == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, pointer, pointerResult); - ssPushNativeRegister(pointerResult); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt16FromMemory */ -static sqInt -genLowcodeLoadUInt16FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM16rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt32FromMemory */ -static sqInt -genLowcodeLoadUInt32FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt64FromMemory */ -static sqInt -genLowcodeLoadUInt64FromMemory(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt pointer; - sqInt valueHigh; - sqInt valueLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM32rR, 0, pointer, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveM32rR, 4, pointer, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLoadUInt8FromMemory */ -static sqInt -genLowcodeLoadUInt8FromMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveM8rR, 0, pointer, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLocalFrameSize */ -static sqInt -genLowcodeLocalFrameSize(void) -{ - sqInt address; - sqInt address1; - sqInt alignedSize; - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction *anInstruction2; - AbstractInstruction *anInstruction3; - AbstractInstruction *anInstruction4; - AbstractInstruction *anInstruction5; - AbstractInstruction *anInstruction6; - AbstractInstruction *anInstruction7; - AbstractInstruction *anInstruction8; - sqInt offset; - sqInt offset1; - sqInt offset2; - sqInt offset3; - sqInt quickConstant; - sqInt size; - - size = extA; - assert(needsFrame); - - /* Align the size to 16 bytes. */ - hasNativeFrame = 1; - - /* Mark the stack frame */ - alignedSize = (size + 15) & -16; - annotateobjRef(gMoveCwR(splObj(LowcodeContextMark), TempReg), splObj(LowcodeContextMark)); - /* begin MoveR:Mw:r: */ - offset = frameOffsetOfNativeFrameMark(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, TempReg, offset, FPReg); - /* begin MoveAw:R: */ - address = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction1 = genoperandoperand(MoveAwR, address, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction2 = genoperandoperand(AddCqR, 1, TempReg); - /* begin MoveR:Mw:r: */ - offset1 = frameOffsetOfPreviousNativeStackPointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction3 = genoperandoperandoperand(MoveRMwr, TempReg, offset1, FPReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction4 = genoperandoperand(SubCqR, alignedSize, TempReg); - /* begin MoveR:Mw:r: */ - offset2 = frameOffsetOfNativeFramePointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction5 = genoperandoperandoperand(MoveRMwr, TempReg, offset2, FPReg); - /* begin MoveR:Mw:r: */ - offset3 = frameOffsetOfNativeStackPointer(); - /* begin checkQuickConstant:forInstruction: */ - anInstruction6 = genoperandoperandoperand(MoveRMwr, TempReg, offset3, FPReg); - /* begin SubCq:R: */ - quickConstant = 1 + (defaultNativeStackFrameSize()); - /* begin checkQuickConstant:forInstruction: */ - anInstruction7 = genoperandoperand(SubCqR, quickConstant, TempReg); - /* begin MoveR:Aw: */ - address1 = nativeStackPointerAddress(); - /* begin checkLiteral:forInstruction: */ - anInstruction8 = genoperandoperand(MoveRAw, TempReg, address1); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLockRegisters */ -static sqInt -genLowcodeLockRegisters(void) -{ - ssFlushAll(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeLockVM */ -static sqInt -genLowcodeLockVM(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMalloc32 */ -static sqInt -genLowcodeMalloc32(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - sqInt size; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << size)))) == NoReg) { - ssAllocateRequiredReg((pointer = Arg1Reg)); - } - if ((size == ReceiverResultReg) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - ssFlushAll(); - if (size != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, size, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceMallocTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, pointer); - ssPushNativeRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMalloc64 */ -static sqInt -genLowcodeMalloc64(void) -{ - AbstractInstruction *abstractInstruction; - sqInt pointer; - sqInt sizeHigh; - sqInt sizeLow; - - if (((sizeLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((sizeLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((sizeHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << sizeLow)))) == NoReg) { - ssAllocateRequiredReg((sizeHigh = Arg1Reg)); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << sizeLow)) | (1U << sizeHigh)))) == NoReg) { - ssAllocateRequiredReg((pointer = SendNumArgsReg)); - } - if (((sizeLow == ReceiverResultReg) - || (sizeHigh == ReceiverResultReg)) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); - ssNativePop(1); - ssFlushAll(); - if (sizeLow != ReceiverResultReg) { - /* begin MoveR:R: */ - genoperandoperand(MoveRR, sizeLow, ReceiverResultReg); - } - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceMallocTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, TempReg, pointer); - ssPushNativeRegister(pointer); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpy32 */ -static sqInt -genLowcodeMemcpy32(void) -{ - sqInt dest; - sqInt size; - sqInt source; - - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((source = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << size)))) == NoReg) { - ssAllocateRequiredReg((source = Arg1Reg)); - } - if (((dest = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << size)) | (1U << source)))) == NoReg) { - ssAllocateRequiredReg((dest = SendNumArgsReg)); - } - if (((size == ReceiverResultReg) - || (source == ReceiverResultReg)) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - ssFlushAll(); - genMemCopytosize(backEnd, source, dest, size); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpy64 */ -static sqInt -genLowcodeMemcpy64(void) -{ - sqInt dest; - sqInt size; - sqInt sizeLow; - sqInt source; - - sizeLow = 0; - if (((size = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((size = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((source = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << size)))) == NoReg) { - ssAllocateRequiredReg((source = Arg1Reg)); - } - if (((dest = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << size)) | (1U << source)))) == NoReg) { - ssAllocateRequiredReg((dest = SendNumArgsReg)); - } - if (((size == ReceiverResultReg) - || (source == ReceiverResultReg)) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), size); - ssNativePop(1); - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - ssFlushAll(); - genMemCopytosize(backEnd, source, dest, sizeLow); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMemcpyFixed */ -static sqInt -genLowcodeMemcpyFixed(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt dest; - sqInt size; - sqInt source; - - size = extA; - if (((source = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((source = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((dest = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << source)))) == NoReg) { - ssAllocateRequiredReg((dest = Arg1Reg)); - } - if ((source == ReceiverResultReg) - || (dest == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), source); - ssNativePop(1); - nativePopToReg(ssNativeTop(), dest); - ssNativePop(1); - if (size == BytesPerWord) { - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveMwrR, 0, source, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRMwr, TempReg, 0, dest); - } - else { - ssFlushAll(); - genMemCopytoconstantSize(backEnd, source, dest, size); - } - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveFloat32ToPhysical */ -static sqInt -genLowcodeMoveFloat32ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveFloat64ToPhysical */ -static sqInt -genLowcodeMoveFloat64ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += 8; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveInt32ToPhysical */ -static sqInt -genLowcodeMoveInt32ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMoveInt64ToPhysical */ -static sqInt -genLowcodeMoveInt64ToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += 8; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMovePointerToPhysical */ -static sqInt -genLowcodeMovePointerToPhysical(void) -{ - nativeStackPopToReg(ssNativeTop(), extA); - ssNativePop(1); - currentCallCleanUpSize += BytesPerWord; - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMul32 */ -static sqInt -genLowcodeMul32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeMul64 */ -static sqInt -genLowcodeMul64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNeg32 */ -static sqInt -genLowcodeNeg32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NegateR: */ - genoperand(NegateR, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNeg64 */ -static sqInt -genLowcodeNeg64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, valueLow); - /* begin NotR: */ - genoperand(NotR, valueHigh); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AddCqR, 1, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(AddcCqR, 0, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNot32 */ -static sqInt -genLowcodeNot32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeNot64 */ -static sqInt -genLowcodeNot64(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin NotR: */ - genoperand(NotR, valueLow); - /* begin NotR: */ - genoperand(NotR, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator dispatch */ - - /* StackToRegisterMappingCogit>>#genLowcodeNullaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeNullaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeBoolean32ToOop(); - - case 1: - return genLowcodeBoolean64ToOop(); - - case 2: - return genLowcodeFloat32ToOop(); - - case 3: - return genLowcodeFloat64ToOop(); - - case 4: - return genLowcodeInt32ToOop(); - - case 5: - return genLowcodeInt64ToOop(); - - case 6: - return genLowcodePointerToOop(); - - case 7: - return genLowcodePointerToOopReinterprer(); - - case 8: - return genLowcodeSmallInt32ToOop(); - - case 9: - return genLowcodeUint32ToOop(); - - case 10: - return genLowcodeUint64ToOop(); - - default: - return EncounteredUnknownBytecode; - - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopEqual */ -static sqInt -genLowcodeOopEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), second); - ssPop(1); - popToReg(ssTop(), first); - ssPop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopNotEqual */ -static sqInt -genLowcodeOopNotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), second); - ssPop(1); - popToReg(ssTop(), first); - ssPop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopSmallIntegerToInt32 */ -static sqInt -genLowcodeOopSmallIntegerToInt32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genConvertSmallIntegerToIntegerInReg(object); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopSmallIntegerToInt64 */ -static sqInt -genLowcodeOopSmallIntegerToInt64(void) -{ - AbstractInstruction *anInstruction; - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genConvertSmallIntegerToIntegerInReg(object); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - ssPushNativeRegistersecondRegister(object, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToBoolean32 */ -static sqInt -genLowcodeOopToBoolean32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - annotateobjRef(gSubCwR(falseObject(), object), falseObject()); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToBoolean64 */ -static sqInt -genLowcodeOopToBoolean64(void) -{ - AbstractInstruction *anInstruction; - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - annotateobjRef(gSubCwR(falseObject(), object), falseObject()); - ssPushNativeRegistersecondRegister(object, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToFloat32 */ -static sqInt -genLowcodeOopToFloat32(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoFloat32(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToFloat64 */ -static sqInt -genLowcodeOopToFloat64(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoFloat64(object, value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToInt32 */ -static sqInt -genLowcodeOopToInt32(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToInt32(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToInt64 */ -static sqInt -genLowcodeOopToInt64(void) -{ - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoInt64highPart(object, valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToPointer */ -static sqInt -genLowcodeOopToPointer(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - genLcOopToPointer(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToPointerReinterpret */ -static sqInt -genLowcodeOopToPointerReinterpret(void) -{ - sqInt object; - sqInt pointer; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointer = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((pointer = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (pointer == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssPushNativeRegister(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToUInt32 */ -static sqInt -genLowcodeOopToUInt32(void) -{ - sqInt object; - sqInt value; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((object == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOopToUInt32(object); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOopToUInt64 */ -static sqInt -genLowcodeOopToUInt64(void) -{ - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << object)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << object)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((object == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - ssFlushAll(); - genLcOoptoUInt64highPart(object, valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOr32 */ -static sqInt -genLowcodeOr32(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeOr64 */ -static sqInt -genLowcodeOr64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin OrR:R: */ - genoperandoperand(OrRR, secondLow, firstLow); - /* begin OrR:R: */ - genoperandoperand(OrRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePerformCallout */ -static sqInt -genLowcodePerformCallout(void) -{ - AbstractInstruction *abstractInstruction; - AbstractInstruction *abstractInstruction1; - AbstractInstruction *anInstruction; - - callSwitchToCStack(); - /* begin checkLiteral:forInstruction: */ - anInstruction = genoperandoperand(MoveCwR, extA, TempReg); - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin annotateBytecode: */ - abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); - (abstractInstruction1->annotation = HasBytecodePC); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePerformCalloutIndirect */ -static sqInt -genLowcodePerformCalloutIndirect(void) -{ - AbstractInstruction *abstractInstruction; - AbstractInstruction *abstractInstruction1; - - nativeStackPopToReg(ssNativeTop(), TempReg); - ssNativePop(1); - callSwitchToCStack(); - /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); - (abstractInstruction->annotation = IsRelativeCall); - /* begin annotateBytecode: */ - abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); - (abstractInstruction1->annotation = HasBytecodePC); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePin */ -static sqInt -genLowcodePin(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePlaftormCode */ -static sqInt -genLowcodePlaftormCode(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddConstantOffset */ -static sqInt -genLowcodePointerAddConstantOffset(void) -{ - AbstractInstruction *anInstruction; - sqInt base; - sqInt offset; - - offset = extB; - if (((base = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((base = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (base == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AddCqR, offset, base); - ssPushNativeRegister(base); - extB = 0; - numExtB = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddOffset32 */ -static sqInt -genLowcodePointerAddOffset32(void) -{ - sqInt base; - sqInt offset; - - if (((offset = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offset = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((base = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offset)))) == NoReg) { - ssAllocateRequiredReg((base = Arg1Reg)); - } - if ((offset == ReceiverResultReg) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), offset); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, offset, base); - ssPushNativeRegister(base); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerAddOffset64 */ -static sqInt -genLowcodePointerAddOffset64(void) -{ - sqInt base; - sqInt offsetHigh; - sqInt offsetLow; - - if (((offsetLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((offsetLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((offsetHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << offsetLow)))) == NoReg) { - ssAllocateRequiredReg((offsetHigh = Arg1Reg)); - } - if (((base = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << offsetLow)) | (1U << offsetHigh)))) == NoReg) { - ssAllocateRequiredReg((base = SendNumArgsReg)); - } - if (((offsetLow == ReceiverResultReg) - || (offsetHigh == ReceiverResultReg)) - || (base == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), offsetLow, offsetHigh); - ssNativePop(1); - nativePopToReg(ssNativeTop(), base); - ssNativePop(1); - /* begin AddR:R: */ - genoperandoperand(AddRR, offsetLow, base); - ssPushNativeRegister(base); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerEqual */ -static sqInt -genLowcodePointerEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpNonZero: */ - falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerNotEqual */ -static sqInt -genLowcodePointerNotEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpZero: */ - falseJump = genConditionalBranchoperand(JumpZero, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToInt32 */ -static sqInt -genLowcodePointerToInt32(void) -{ - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssPushNativeRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToInt64 */ -static sqInt -genLowcodePointerToInt64(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt resultHigh; - sqInt resultLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((resultLow = Arg1Reg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, pointer, resultLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, resultHigh); - ssPushNativeRegistersecondRegister(resultLow, resultHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToOop */ -static sqInt -genLowcodePointerToOop(void) -{ - sqInt pointer; - sqInt pointerClassLiteral; - - pointerClassLiteral = getLiteral(extA); - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssFlushAll(); - genLcPointerToOopclass(pointer, pointerClassLiteral); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePointerToOopReinterprer */ -static sqInt -genLowcodePointerToOopReinterprer(void) -{ - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - ssPushRegister(pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopFloat32 */ -static sqInt -genLowcodePopFloat32(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopFloat64 */ -static sqInt -genLowcodePopFloat64(void) -{ - sqInt value; - - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopInt32 */ -static sqInt -genLowcodePopInt32(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopInt64 */ -static sqInt -genLowcodePopInt64(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopMultipleNative */ -static sqInt -genLowcodePopMultipleNative(void) -{ - ssPopNativeSize(extA); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePopPointer */ -static sqInt -genLowcodePopPointer(void) -{ - sqInt pointerValue; - - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerValue == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultFloat32 */ -static sqInt -genLowcodePushCalloutResultFloat32(void) -{ - cFloatResultToRs(backEnd, DPFPReg0); - ssPushNativeRegisterSingleFloat(DPFPReg0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultFloat64 */ -static sqInt -genLowcodePushCalloutResultFloat64(void) -{ - cFloatResultToRd(backEnd, DPFPReg0); - ssPushNativeRegisterDoubleFloat(DPFPReg0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultInt32 */ -static sqInt -genLowcodePushCalloutResultInt32(void) -{ - sqInt reg1; - - /* begin MoveR:R: */ - reg1 = V0; - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - ssPushNativeRegister(ReceiverResultReg); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultInt64 */ -static sqInt -genLowcodePushCalloutResultInt64(void) -{ - sqInt reg1; - sqInt reg11; - - /* begin MoveR:R: */ - reg1 = cResultRegisterLow(backEnd); - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - /* begin MoveR:R: */ - reg11 = cResultRegisterHigh(backEnd); - genoperandoperand(MoveRR, reg11, Arg0Reg); - ssPushNativeRegistersecondRegister(ReceiverResultReg, Arg0Reg); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushCalloutResultPointer */ -static sqInt -genLowcodePushCalloutResultPointer(void) -{ - sqInt reg1; - - /* begin MoveR:R: */ - reg1 = V0; - genoperandoperand(MoveRR, reg1, ReceiverResultReg); - ssPushNativeRegister(ReceiverResultReg); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushConstantUInt32 */ -static sqInt -genLowcodePushConstantUInt32(void) -{ - sqInt constant; - - constant = extA; - ssPushNativeConstantInt32(constant); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushConstantUInt64 */ -static sqInt -genLowcodePushConstantUInt64(void) -{ - sqInt constant; - - constant = extA; - ssPushNativeConstantInt64(constant); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushNullPointer */ -static sqInt -genLowcodePushNullPointer(void) -{ - ssPushNativeConstantPointer(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOne32 */ -static sqInt -genLowcodePushOne32(void) -{ - ssPushNativeConstantInt32(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOne64 */ -static sqInt -genLowcodePushOne64(void) -{ - ssPushNativeConstantInt64(1); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOneFloat32 */ -static sqInt -genLowcodePushOneFloat32(void) -{ - ssPushNativeConstantFloat32(1.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushOneFloat64 */ -static sqInt -genLowcodePushOneFloat64(void) -{ - ssPushNativeConstantFloat64(1.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalFloat32 */ -static sqInt -genLowcodePushPhysicalFloat32(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalFloat64 */ -static sqInt -genLowcodePushPhysicalFloat64(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalInt32 */ -static sqInt -genLowcodePushPhysicalInt32(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalInt64 */ -static sqInt -genLowcodePushPhysicalInt64(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushPhysicalPointer */ -static sqInt -genLowcodePushPhysicalPointer(void) -{ - sqInt registerID; - - registerID = extA; - abort(); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushSessionIdentifier */ -static sqInt -genLowcodePushSessionIdentifier(void) -{ - ssPushNativeConstantInt32(getThisSessionID()); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZero32 */ -static sqInt -genLowcodePushZero32(void) -{ - ssPushNativeConstantInt32(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZero64 */ -static sqInt -genLowcodePushZero64(void) -{ - ssPushNativeConstantInt64(0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZeroFloat32 */ -static sqInt -genLowcodePushZeroFloat32(void) -{ - ssPushNativeConstantFloat32(0.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodePushZeroFloat64 */ -static sqInt -genLowcodePushZeroFloat64(void) -{ - ssPushNativeConstantFloat64(0.0); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRem32 */ -static sqInt -genLowcodeRem32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRem64 */ -static sqInt -genLowcodeRem64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRightShift32 */ -static sqInt -genLowcodeRightShift32(void) -{ - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin LogicalShiftRightR:R: */ - genoperandoperand(LogicalShiftRightRR, shiftAmount, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeRightShift64 */ -static sqInt -genLowcodeRightShift64(void) -{ - sqInt result; - sqInt shiftAmount; - sqInt value; - - if (((shiftAmount = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((shiftAmount = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << shiftAmount)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << shiftAmount)) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((shiftAmount == ReceiverResultReg) - || (value == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), shiftAmount); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend32From16 */ -static sqInt -genLowcodeSignExtend32From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend32From8 */ -static sqInt -genLowcodeSignExtend32From8(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From16 */ -static sqInt -genLowcodeSignExtend64From16(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * isNegative; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin SignExtend16R:R: */ - genoperandoperand(SignExtend16RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, valueLow); - /* begin JumpLess: */ - isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh))); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From32 */ -static sqInt -genLowcodeSignExtend64From32(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * isNegative; - sqInt resultHigh; - sqInt resultLow; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((resultLow = Arg1Reg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << value)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, resultLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, value); - /* begin JumpLess: */ - isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, resultHigh); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, resultHigh))); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegistersecondRegister(resultLow, resultHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSignExtend64From8 */ -static sqInt -genLowcodeSignExtend64From8(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * cont; - AbstractInstruction * isNegative; - sqInt resultHigh; - sqInt resultLow; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((resultLow = SendNumArgsReg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = ClassReg)); - } - if ((((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin SignExtend8R:R: */ - genoperandoperand(SignExtend8RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(CmpCqR, 0, valueLow); - /* begin JumpLess: */ - isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh); - /* begin Jump: */ - cont = genoperand(Jump, ((sqInt)0)); - jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh))); - jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSmallInt32ToOop */ -static sqInt -genLowcodeSmallInt32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - genConvertIntegerToSmallIntegerInReg(value); - ssPushRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreFloat32ToMemory */ -static sqInt -genLowcodeStoreFloat32ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt floatValue; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((floatValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((floatValue = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), floatValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRsM32r, floatValue, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreFloat64ToMemory */ -static sqInt -genLowcodeStoreFloat64ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt doubleValue; - sqInt pointer; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((doubleValue = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((doubleValue = DPFPReg0)); - } - if (pointer == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), doubleValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, doubleValue, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt16ToMemory */ -static sqInt -genLowcodeStoreInt16ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM16r, TempReg, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt32ToMemory */ -static sqInt -genLowcodeStoreInt32ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, value, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt64ToMemory */ -static sqInt -genLowcodeStoreInt64ToMemory(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt pointer; - sqInt valueHigh; - sqInt valueLow; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((valueLow = Arg1Reg)); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << pointer)) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = SendNumArgsReg)); - } - if (((pointer == ReceiverResultReg) - || (valueLow == ReceiverResultReg)) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, valueLow, 0, pointer); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRM32r, valueHigh, 4, pointer); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreInt8ToMemory */ -static sqInt -genLowcodeStoreInt8ToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt pointer; - sqInt value; - - if (((pointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((value = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << pointer)))) == NoReg) { - ssAllocateRequiredReg((value = Arg1Reg)); - } - if ((pointer == ReceiverResultReg) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM8r, TempReg, 0, pointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalFloat32 */ -static sqInt -genLowcodeStoreLocalFloat32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRsM32r, value, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalFloat64 */ -static sqInt -genLowcodeStoreLocalFloat64(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((value = DPFPReg0)); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRdM64r, value, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt16 */ -static sqInt -genLowcodeStoreLocalInt16(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - loadNativeLocalAddressto(baseOffset, value); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM16r, TempReg, 0, value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt32 */ -static sqInt -genLowcodeStoreLocalInt32(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, value, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt64 */ -static sqInt -genLowcodeStoreLocalInt64(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - sqInt baseOffset; - sqInt valueHigh; - sqInt valueLow; - - baseOffset = extA; - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM32r, valueLow, 0, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperandoperand(MoveRM32r, valueHigh, 4, TempReg); - - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalInt8 */ -static sqInt -genLowcodeStoreLocalInt8(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt value; - - baseOffset = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, TempReg); - loadNativeLocalAddressto(baseOffset, value); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRM8r, TempReg, 0, value); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreLocalPointer */ -static sqInt -genLowcodeStoreLocalPointer(void) -{ - AbstractInstruction *anInstruction; - sqInt baseOffset; - sqInt pointerValue; - - baseOffset = extA; - if (((pointerValue = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((pointerValue = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (pointerValue == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - loadNativeLocalAddressto(baseOffset, TempReg); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, pointerValue, 0, TempReg); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreObjectField */ -static sqInt -genLowcodeStoreObjectField(void) -{ - sqInt fieldIndex; - sqInt object; - sqInt value; - - fieldIndex = extA; - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((object = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((object = Arg1Reg)); - } - if ((value == ReceiverResultReg) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), value); - ssPop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcStoreobjectfield(value, object, fieldIndex); - extA = 0; - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStoreObjectFieldAt */ -static sqInt -genLowcodeStoreObjectFieldAt(void) -{ - sqInt fieldIndex; - sqInt object; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((fieldIndex = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((fieldIndex = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << value)) | (1U << fieldIndex)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (fieldIndex == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), value); - ssPop(1); - nativePopToReg(ssNativeTop(), fieldIndex); - ssNativePop(1); - popToReg(ssTop(), object); - ssPop(1); - genLcStoreobjectat(value, object, fieldIndex); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeStorePointerToMemory */ -static sqInt -genLowcodeStorePointerToMemory(void) -{ - AbstractInstruction *anInstruction; - sqInt memoryPointer; - sqInt pointerValue; - - if (((memoryPointer = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((memoryPointer = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((pointerValue = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << memoryPointer)))) == NoReg) { - ssAllocateRequiredReg((pointerValue = Arg1Reg)); - } - if ((memoryPointer == ReceiverResultReg) - || (pointerValue == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), memoryPointer); - ssNativePop(1); - nativePopToReg(ssNativeTop(), pointerValue); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperandoperand(MoveRMwr, pointerValue, 0, memoryPointer); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSub32 */ -static sqInt -genLowcodeSub32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeSub64 */ -static sqInt -genLowcodeSub64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin SubR:R: */ - genoperandoperand(SubRR, secondLow, firstLow); - /* begin SubbR:R: */ - genoperandoperand(SubbRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator dispatch */ - - /* StackToRegisterMappingCogit>>#genLowcodeTrinaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeTrinaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeOopEqual(); - - case 1: - return genLowcodeOopNotEqual(); - - case 2: - return genLowcodeStoreObjectField(); - - case 3: - return genLowcodeStoreObjectFieldAt(); - - default: - return EncounteredUnknownBytecode; - - } - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate32To16 */ -static sqInt -genLowcodeTruncate32To16(void) -{ - AbstractInstruction *anInstruction; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFFFF, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate32To8 */ -static sqInt -genLowcodeTruncate32To8(void) -{ - AbstractInstruction *anInstruction; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFF, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To16 */ -static sqInt -genLowcodeTruncate64To16(void) -{ - AbstractInstruction *anInstruction; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFFFF, valueLow); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To32 */ -static sqInt -genLowcodeTruncate64To32(void) -{ - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeTruncate64To8 */ -static sqInt -genLowcodeTruncate64To8(void) -{ - AbstractInstruction *anInstruction; - sqInt result; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(AndCqR, 0xFF, valueLow); - ssPushNativeRegister(valueLow); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUdiv32 */ -static sqInt -genLowcodeUdiv32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, first, second); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUdiv64 */ -static sqInt -genLowcodeUdiv64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32Great */ -static sqInt -genLowcodeUint32Great(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpBelowOrEqual: */ - falseJump = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32GreatEqual */ -static sqInt -genLowcodeUint32GreatEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpBelow: */ - falseJump = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32Less */ -static sqInt -genLowcodeUint32Less(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpAboveOrEqual: */ - falseJump = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32LessEqual */ -static sqInt -genLowcodeUint32LessEqual(void) -{ - AbstractInstruction *anInstruction; - AbstractInstruction *anInstruction1; - AbstractInstruction * contJump; - AbstractInstruction * falseJump; - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin CmpR:R: */ - genoperandoperand(CmpRR, second, first); - /* begin JumpAbove: */ - falseJump = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 1, first); - /* begin Jump: */ - contJump = genoperand(Jump, ((sqInt)0)); - jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - /* begin checkQuickConstant:forInstruction: */ - anInstruction1 = genoperandoperand(MoveCqR, 0, first); - jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToFloat32 */ -static sqInt -genLowcodeUint32ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rs: */ - genoperandoperand(ConvertRRs, value, result); - ssPushNativeRegisterSingleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToFloat64 */ -static sqInt -genLowcodeUint32ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ConvertR:Rd: */ - genoperandoperand(ConvertRRd, value, result); - ssPushNativeRegisterDoubleFloat(result); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint32ToOop */ -static sqInt -genLowcodeUint32ToOop(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - ssFlushAll(); - genLcUInt32ToOop(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64Great */ -static sqInt -genLowcodeUint64Great(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64GreatEqual */ -static sqInt -genLowcodeUint64GreatEqual(void) -{ - sqInt first; - sqInt second; - sqInt value; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - + nativePopToRegsecondReg(ssNativeTop(), valueLow2, valueHigh2); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcUInt64ToOophighPart(valueLow2, valueHigh2); -/* Lowcode instruction generator */ + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeUint64Less */ -static sqInt -genLowcodeUint64Less(void) -{ - sqInt first; - sqInt second; - sqInt value; + default: + return EncounteredUnknownBytecode; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); return 0; } -/* Lowcode instruction generator */ +/* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeUint64LessEqual */ -static sqInt -genLowcodeUint64LessEqual(void) + /* StackToRegisterMappingCogit>>#genLowcodeTrinaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeTrinaryInlinePrimitive(sqInt prim) { + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction3; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + sqInt fieldIndex; + sqInt fieldIndex1; + sqInt fieldIndexValue; sqInt first; + sqInt first1; + sqInt firstValue; + sqInt firstValue1; + sqInt object; + sqInt object1; + sqInt objectValue; + sqInt objectValue1; + sqInt oopTopRegisterMask; + sqInt oopTopRegisterMask1; + sqInt oopTopRegisterMask2; + sqInt oopTopRegisterMask3; + sqInt rOopNext; + sqInt rOopNext1; + sqInt rOopNext2; + sqInt rOopNext3; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop2; + sqInt rOopTop3; + sqInt rResult; + sqInt rTop; sqInt second; + sqInt second1; + sqInt secondValue; + sqInt secondValue1; + sqInt topRegisterMask; sqInt value; + sqInt value1; + sqInt value2; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue2; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((value = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((value = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (value == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToFloat32 */ -static sqInt -genLowcodeUint64ToFloat32(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToFloat64 */ -static sqInt -genLowcodeUint64ToFloat64(void) -{ - sqInt result; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((result = availableFloatRegisterOrNoneFor(backEnd, liveFloatRegisters()))) == NoReg) { - ssAllocateRequiredFloatReg((result = DPFPReg0)); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUint64ToOop */ -static sqInt -genLowcodeUint64ToOop(void) -{ - sqInt object; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if (((object = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << valueLow)) | (1U << valueHigh)))) == NoReg) { - ssAllocateRequiredReg((object = SendNumArgsReg)); - } - if (((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) - || (object == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - ssFlushAll(); - genLcUInt64ToOophighPart(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ + + switch (prim) { + case 0: + /* begin genLowcodeOopEqual */ + rOopTop = (rOopNext = NoReg); + rResult = NoReg; + oopTopRegisterMask = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask = 1U << rOopNext; + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(oopTopRegisterMask); + } + if (rOopNext == NoReg) { + rOopNext = allocateRegNotConflictingWith(1U << rOopTop); + } + rResult = allocateRegNotConflictingWith((1U << rOopTop) | (1U << rOopNext)); + assert(!(((rOopTop == NoReg) + || ((rOopNext == NoReg) + || (rResult == NoReg))))); + second = rOopTop; + first = rOopNext; + value = rResult; + + popToReg(ssTop(), second); + ssPop(1); + popToReg(ssTop(), first); + ssPop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second, first); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 1, first); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, first); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeUmul32 */ -static sqInt -genLowcodeUmul32(void) -{ - sqInt first; - sqInt second; + case 1: + /* begin genLowcodeOopNotEqual */ + rOopTop1 = (rOopNext1 = NoReg); + oopTopRegisterMask1 = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext1 = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask1 = 1U << rOopNext1; + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(oopTopRegisterMask1); + } + if (rOopNext1 == NoReg) { + rOopNext1 = allocateRegNotConflictingWith(1U << rOopTop1); + } + assert(!(((rOopTop1 == NoReg) + || (rOopNext1 == NoReg)))); + second1 = rOopTop1; + first1 = rOopNext1; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin MulR:R: */ - genMulRR(backEnd, second, first); - ssPushNativeRegister(first); - return 0; -} + popToReg(ssTop(), second1); + ssPop(1); + popToReg(ssTop(), first1); + ssPop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second1, first1); + /* begin JumpZero: */ + falseJump1 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(MoveCqR, 1, first1); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, first1); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first1); + return 0; + case 2: + /* begin genLowcodeStoreObjectField */ + fieldIndex = extA; + /* begin allocateRegistersForLowcodeOop2: */ + rOopTop2 = (rOopNext2 = NoReg); + oopTopRegisterMask2 = 0; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext2 = registerOrNone(ssValue(1)); + /* begin registerMaskFor: */ + oopTopRegisterMask2 = 1U << rOopNext2; + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(oopTopRegisterMask2); + } + if (rOopNext2 == NoReg) { + rOopNext2 = allocateRegNotConflictingWith(1U << rOopTop2); + } + assert(!(((rOopTop2 == NoReg) + || (rOopNext2 == NoReg)))); + value1 = rOopTop2; + object = rOopNext2; + + popToReg(ssTop(), value1); + ssPop(1); + popToReg(ssTop(), object); + ssPop(1); + genLcStoreobjectfield(value1, object, fieldIndex); + extA = 0; + return 0; -/* Lowcode instruction generator */ + case 3: + /* begin genLowcodeStoreObjectFieldAt */ + rTop = (rOopTop3 = (rOopNext3 = NoReg)); + oopTopRegisterMask3 = (topRegisterMask = 0); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + /* begin registerMaskFor: */ + oopTopRegisterMask3 = 1U << rTop; + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask = 1U << rOopTop3; + } + if ((registerOrNone(ssValue(1))) != NoReg) { + rOopNext3 = registerOrNone(ssValue(1)); + topRegisterMask = topRegisterMask | (1U << rOopNext3); + oopTopRegisterMask3 = oopTopRegisterMask3 | (1U << rOopNext3); + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegisterMask); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(oopTopRegisterMask3); + } + if (rOopNext3 == NoReg) { + rOopNext3 = allocateRegNotConflictingWith((1U << rTop) | (1U << rOopTop3)); + } + assert(!(((rTop == NoReg) + || ((rOopTop3 == NoReg) + || (rOopNext3 == NoReg))))); + fieldIndex1 = rTop; + value2 = rOopTop3; + object1 = rOopNext3; + + popToReg(ssTop(), value2); + ssPop(1); + nativePopToReg(ssNativeTop(), fieldIndex1); + ssNativePop(1); + popToReg(ssTop(), object1); + ssPop(1); + genLcStoreobjectat(value2, object1, fieldIndex1); + return 0; - /* StackToRegisterMappingCogit>>#genLowcodeUmul64 */ -static sqInt -genLowcodeUmul64(void) -{ - sqInt first; - sqInt result; - sqInt second; + default: + return EncounteredUnknownBytecode; - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); return 0; } @@ -35928,187 +28782,2125 @@ genLowcodeUmul64(void) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive2(sqInt prim) { + AbstractInstruction *abstractInstruction; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction110; + AbstractInstruction *anInstruction111; + AbstractInstruction *anInstruction112; + AbstractInstruction *anInstruction113; + AbstractInstruction *anInstruction114; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction27; + AbstractInstruction *anInstruction28; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction30; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction33; + AbstractInstruction *anInstruction34; + AbstractInstruction *anInstruction35; + AbstractInstruction *anInstruction36; + AbstractInstruction *anInstruction37; + AbstractInstruction *anInstruction38; + AbstractInstruction *anInstruction39; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction40; + AbstractInstruction *anInstruction41; + AbstractInstruction *anInstruction42; + AbstractInstruction *anInstruction43; + AbstractInstruction *anInstruction44; + AbstractInstruction *anInstruction45; + AbstractInstruction *anInstruction46; + AbstractInstruction *anInstruction47; + AbstractInstruction *anInstruction48; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt baseOffset; + sqInt baseOffset1; + sqInt baseOffset10; + sqInt baseOffset11; + sqInt baseOffset12; + sqInt baseOffset13; + sqInt baseOffset14; + sqInt baseOffset15; + sqInt baseOffset16; + sqInt baseOffset17; + sqInt baseOffset18; + sqInt baseOffset19; + sqInt baseOffset2; + sqInt baseOffset20; + sqInt baseOffset21; + sqInt baseOffset22; + sqInt baseOffset23; + sqInt baseOffset3; + sqInt baseOffset4; + sqInt baseOffset5; + sqInt baseOffset6; + sqInt baseOffset7; + sqInt baseOffset8; + sqInt baseOffset9; + sqInt classOop; + sqInt classOop1; + sqInt classOop2; + sqInt classOopValue; + sqInt classOopValue1; + sqInt classOopValue2; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + AbstractInstruction * contJump4; + AbstractInstruction * contJump5; + AbstractInstruction * contJump6; + AbstractInstruction * contJump7; + sqInt doubleValue; + sqInt doubleValue1; + sqInt doubleValueValue; + sqInt doubleValueValue1; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump21; + AbstractInstruction * falseJump22; + AbstractInstruction * falseJump3; + AbstractInstruction * falseJump4; + AbstractInstruction * falseJump5; + AbstractInstruction * falseJump6; + AbstractInstruction * falseJump7; + AbstractInstruction * falseLabel; + AbstractInstruction * falseLabel1; + sqInt fieldIndex; + sqInt fieldIndexValue; + sqInt first; + sqInt first1; + sqInt first10; + sqInt first2; + sqInt first3; + sqInt first4; + sqInt first5; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstHigh; + sqInt firstHigh5; + sqInt firstHighValue; + sqInt firstHighValue1; + sqInt firstLow; + sqInt firstLow5; + sqInt firstLowValue; + sqInt firstLowValue1; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue10; + sqInt firstValue2; + sqInt firstValue3; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt floatValue; + sqInt floatValue1; + sqInt floatValue2; + sqInt floatValue3; + sqInt floatValue4; + sqInt floatValue5; + sqInt floatValue6; + sqInt floatValueValue; + sqInt floatValueValue1; + sqInt floatValueValue2; + sqInt floatValueValue3; + sqInt floatValueValue4; + sqInt floatValueValue5; + sqInt floatValueValue6; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frResult4; + sqInt frResult5; + sqInt frResult6; + sqInt frResult7; + sqInt frResult8; + sqInt frResult9; + sqInt frTop; + sqInt frTop1; + sqInt frTop2; + sqInt frTop3; + sqInt frTop4; + sqInt indexableSize; + sqInt indexableSize1; + sqInt indexableSizeValue; + sqInt int32Result; + sqInt int32ResultValue; + sqInt int64Result; + sqInt int64Result1; + sqInt int64Result2; + sqInt int64ResultValue; + sqInt int64ResultValue1; + sqInt int64ResultValue2; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt object; + sqInt object1; + sqInt object2; + sqInt objectValue; + sqInt objectValue1; + sqInt objectValue2; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointer6; + sqInt pointer7; + sqInt pointer8; + sqInt pointerResult; + sqInt pointerResult1; + sqInt pointerResultValue; + sqInt pointerResultValue1; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValue8; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg2; + sqInt reg3; + sqInt reg4; + sqInt reg5; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerMask; + sqInt registerMask1; + sqInt result; + sqInt result1; + sqInt result2; + sqInt result3; + sqInt result4; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue2; + sqInt resultValue3; + sqInt resultValue4; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext12; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext2; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNextNext; + sqInt rNextNextNext1; + sqInt rOopResult; + sqInt rOopTop; + sqInt rOopTop1; + sqInt rOopTop2; + sqInt rOopTop3; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult11; + sqInt rResult12; + sqInt rResult13; + sqInt rResult14; + sqInt rResult15; + sqInt rResult16; + sqInt rResult17; + sqInt rResult18; + sqInt rResult19; + sqInt rResult2; + sqInt rResult20; + sqInt rResult21; + sqInt rResult210; + sqInt rResult211; + sqInt rResult212; + sqInt rResult213; + sqInt rResult214; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult25; + sqInt rResult26; + sqInt rResult27; + sqInt rResult28; + sqInt rResult29; + sqInt rResult3; + sqInt rResult30; + sqInt rResult31; + sqInt rResult32; + sqInt rResult33; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop12; + sqInt rTop13; + sqInt rTop14; + sqInt rTop15; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt second; + sqInt second1; + sqInt second10; + sqInt second2; + sqInt second3; + sqInt second4; + sqInt second5; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondHigh; + sqInt secondHigh5; + sqInt secondHighValue; + sqInt secondHighValue1; + sqInt secondLow; + sqInt secondLow5; + sqInt secondLowValue; + sqInt secondLowValue1; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue10; + sqInt secondValue2; + sqInt secondValue3; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt topRegisterMask; + sqInt topRegisterMask1; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask13; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask2; + sqInt topRegistersMask3; + sqInt topRegistersMask4; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value17; + sqInt value18; + sqInt value19; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value27; + sqInt value28; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value6; + sqInt value7; + sqInt value8; + sqInt valueHigh2; + sqInt valueHigh4; + sqInt valueHigh5; + sqInt valueHigh6; + sqInt valueHigh7; + sqInt valueHigh8; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueHighValue3; + sqInt valueHighValue4; + sqInt valueHighValue5; + sqInt valueLow2; + sqInt valueLow4; + sqInt valueLow5; + sqInt valueLow6; + sqInt valueLow7; + sqInt valueLow8; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueLowValue3; + sqInt valueLowValue4; + sqInt valueLowValue5; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue17; + sqInt valueValue18; + sqInt valueValue19; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue27; + sqInt valueValue28; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue6; + sqInt valueValue7; + sqInt valueValue8; + switch (prim) { case 60: - return genLowcodeFloat64ToFloat32(); + /* begin genLowcodeFloat64ToFloat32 */ + topRegistersMask = 0; + frTop = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(topRegistersMask); + } + assert(!((frTop == NoReg))); + floatValue = frTop; + + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin ConvertRd:Rs: */ + genoperandoperand(ConvertRdRs, floatValue, floatValue); + ssPushNativeRegisterSingleFloat(floatValue); + return 0; case 61: - return genLowcodeFloat64ToInt32(); + /* begin genLowcodeFloat64ToInt32 */ + frTop1 = NoReg; + + /* Float argument */ + rResult = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(0); + assert(!(((frTop1 == NoReg) + || (rResult == NoReg)))); + floatValue1 = frTop1; + int32Result = rResult; + + nativePopToReg(ssNativeTop(), floatValue1); + ssNativePop(1); + /* begin ConvertRd:R: */ + genoperandoperand(ConvertRdR, floatValue1, int32Result); + ssPushNativeRegister(int32Result); + return 0; case 0x3E: - return genLowcodeFloat64ToInt64(); + /* begin genLowcodeFloat64ToInt64 */ + frTop2 = NoReg; + + /* Float argument */ + rResult1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(0); + assert(!(((frTop2 == NoReg) + || (rResult1 == NoReg)))); + floatValue2 = frTop2; + int64Result = rResult1; + + nativePopToReg(ssNativeTop(), floatValue2); + ssNativePop(1); + abort(); + return 0; case 0x3F: - return genLowcodeFloat64ToUInt32(); + /* begin genLowcodeFloat64ToUInt32 */ + frTop3 = NoReg; + + /* Float argument */ + rResult2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(0); + assert(!(((frTop3 == NoReg) + || (rResult2 == NoReg)))); + floatValue3 = frTop3; + int64Result1 = rResult2; + + nativePopToReg(ssNativeTop(), floatValue3); + ssNativePop(1); + /* begin ConvertRd:R: */ + genoperandoperand(ConvertRdR, floatValue3, int64Result1); + ssPushNativeRegister(int64Result1); + return 0; case 64: - return genLowcodeFloat64ToUInt64(); + /* begin genLowcodeFloat64ToUInt64 */ + frTop4 = NoReg; + + /* Float argument */ + rResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop4 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop4 == NoReg) { + frTop4 = allocateFloatRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(0); + assert(!(((frTop4 == NoReg) + || (rResult3 == NoReg)))); + floatValue4 = frTop4; + int64Result2 = rResult3; + + nativePopToReg(ssNativeTop(), floatValue4); + ssNativePop(1); + abort(); + return 0; case 65: - return genLowcodeFree(); + /* begin genLowcodeFree */ + rTop28 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop28 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(0); + } + assert(!((rTop28 == NoReg))); + pointer7 = rTop28; + + nativePopToReg(ssNativeTop(), pointer7); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (pointer7 != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointer7, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceFreeTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + return 0; case 66: - return genLowcodeInstantiateIndexable32Oop(); + /* begin genLowcodeInstantiateIndexable32Oop */ + rTop29 = (rOopTop1 = NoReg); + rOopResult = NoReg; + topRegisterMask1 = 0; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop1 = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask1 = 1U << rOopTop1; + } + if (rTop29 == NoReg) { + rTop29 = allocateRegNotConflictingWith(topRegisterMask1); + } + if (rOopTop1 == NoReg) { + rOopTop1 = allocateRegNotConflictingWith(1U << rTop29); + } + rOopResult = allocateRegNotConflictingWith((1U << rTop29) | (1U << rOopTop1)); + assert(!(((rTop29 == NoReg) + || ((rOopTop1 == NoReg) + || (rOopResult == NoReg))))); + indexableSize = rTop29; + classOop = rOopTop1; + object1 = rOopResult; + + nativePopToReg(ssNativeTop(), indexableSize); + ssNativePop(1); + popToReg(ssTop(), classOop); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOopindexableSize(classOop, indexableSize); + return 0; case 67: - return genLowcodeInstantiateIndexableOop(); + /* begin genLowcodeInstantiateIndexableOop */ + indexableSize1 = extA; + /* begin allocateRegistersForLowcodeOopResultOop: */ + rOopTop2 = NoReg; + rResult28 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop2 = registerOrNone(ssTop()); + } + if (rOopTop2 == NoReg) { + rOopTop2 = allocateRegNotConflictingWith(0); + } + rResult28 = allocateRegNotConflictingWith(1U << rOopTop2); + assert(!(((rOopTop2 == NoReg) + || (rResult28 == NoReg)))); + classOop1 = rOopTop2; + object2 = rResult28; + + popToReg(ssTop(), classOop1); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOopconstantIndexableSize(classOop1, indexableSize1); + extA = 0; + return 0; case 68: - return genLowcodeInstantiateOop(); + /* begin genLowcodeInstantiateOop */ + rOopTop3 = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop3 = registerOrNone(ssTop()); + } + if (rOopTop3 == NoReg) { + rOopTop3 = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop3 == NoReg))); + classOop2 = rOopTop3; + + popToReg(ssTop(), classOop2); + ssPop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genLcInstantiateOop(classOop2); + return 0; case 69: - return genLowcodeInt32Equal(); + /* begin genLowcodeInt32Equal */ + topRegistersMask1 = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second, first); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 1, first); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, first); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first); + return 0; case 70: - return genLowcodeInt32Great(); + /* begin genLowcodeInt32Great */ + topRegistersMask2 = 0; + rTop1 = (rNext1 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop1 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext1 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg1; + } + } + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop1); + } + assert(!(((rTop1 == NoReg) + || (rNext1 == NoReg)))); + second1 = rTop1; + first1 = rNext1; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second1, first1); + /* begin JumpLessOrEqual: */ + falseJump1 = genConditionalBranchoperand(JumpLessOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(MoveCqR, 1, first1); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, first1); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first1); + return 0; case 71: - return genLowcodeInt32GreatEqual(); + /* begin genLowcodeInt32GreatEqual */ + topRegistersMask3 = 0; + rTop2 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg2; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext2 == NoReg)))); + second2 = rTop2; + first2 = rNext2; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second2, first2); + /* begin JumpLess: */ + falseJump2 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(MoveCqR, 1, first2); + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperand(MoveCqR, 0, first2); + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first2); + return 0; case 72: - return genLowcodeInt32Less(); + /* begin genLowcodeInt32Less */ + topRegistersMask4 = 0; + rTop3 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1U << reg3; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + second3 = rTop3; + first3 = rNext3; + + nativePopToReg(ssNativeTop(), second3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first3); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second3, first3); + /* begin JumpGreaterOrEqual: */ + falseJump3 = genConditionalBranchoperand(JumpGreaterOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperand(MoveCqR, 1, first3); + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperand(MoveCqR, 0, first3); + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first3); + return 0; case 73: - return genLowcodeInt32LessEqual(); + /* begin genLowcodeInt32LessEqual */ + topRegistersMask5 = 0; + rTop4 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1U << reg4; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext4 == NoReg)))); + second4 = rTop4; + first4 = rNext4; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second4, first4); + /* begin JumpGreater: */ + falseJump4 = genConditionalBranchoperand(JumpGreater, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperand(MoveCqR, 1, first4); + /* begin Jump: */ + contJump4 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperand(MoveCqR, 0, first4); + jmpTarget(contJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first4); + return 0; case 74: - return genLowcodeInt32NotEqual(); + /* begin genLowcodeInt32NotEqual */ + topRegistersMask6 = 0; + rTop5 = (rNext5 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext5 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg5; + } + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext5 == NoReg) { + rNext5 = allocateRegNotConflictingWith(1U << rTop5); + } + assert(!(((rTop5 == NoReg) + || (rNext5 == NoReg)))); + second5 = rTop5; + first5 = rNext5; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second5, first5); + /* begin JumpZero: */ + falseJump5 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperand(MoveCqR, 1, first5); + /* begin Jump: */ + contJump5 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperand(MoveCqR, 0, first5); + jmpTarget(contJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first5); + return 0; case 75: - return genLowcodeInt32ToFloat32(); + /* begin genLowcodeInt32ToFloat32 */ + rTop6 = NoReg; + frResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop6 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop6 == NoReg) + || (frResult == NoReg)))); + value = rTop6; + result = frResult; + + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin ConvertR:Rs: */ + genoperandoperand(ConvertRRs, value, result); + ssPushNativeRegisterSingleFloat(result); + return 0; case 76: - return genLowcodeInt32ToFloat64(); + /* begin genLowcodeInt32ToFloat64 */ + rTop7 = NoReg; + frResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop7 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop7 == NoReg) + || (frResult1 == NoReg)))); + value1 = rTop7; + result1 = frResult1; + + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + /* begin ConvertR:Rd: */ + genoperandoperand(ConvertRRd, value1, result1); + ssPushNativeRegisterDoubleFloat(result1); + return 0; case 77: - return genLowcodeInt32ToPointer(); + /* begin genLowcodeInt32ToPointer */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value2 = rTop8; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + ssPushNativeRegister(value2); + return 0; case 78: - return genLowcodeInt64Equal(); + /* begin genLowcodeInt64Equal */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop9 = (rNext6 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext6 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop9 == NoReg) { + registerMask = 0; + if (rNext6 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext6; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop9 = allocateRegNotConflictingWith(registerMask); + } + if (rNext6 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop9; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext6 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop9) | (1U << rNext6); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop9) | (1U << rNext6)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop9 == NoReg) + || ((rNext6 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow = rTop9; + secondHigh = rNext6; + firstLow = rNextNext; + firstHigh = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondHigh, firstHigh); + /* begin JumpNonZero: */ + falseJump6 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondLow, firstLow); + /* begin JumpNonZero: */ + falseJump21 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperand(MoveCqR, 1, firstLow); + /* begin Jump: */ + contJump6 = genoperand(Jump, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperand(MoveCqR, 0, firstLow); + falseLabel = anInstruction13; + jmpTarget(falseJump6, falseLabel); + jmpTarget(falseJump21, falseLabel); + jmpTarget(contJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(firstLow); + + return 0; case 79: - return genLowcodeInt64Great(); + /* begin genLowcodeInt64Great */ + topRegistersMask8 = 0; + rTop10 = (rNext7 = NoReg); + rResult4 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext7 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg7; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1U << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext7 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop10) | (1U << rNext7)); + assert(!((rResult4 == NoReg))); + second7 = rTop10; + first7 = rNext7; + value3 = rResult4; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + abort(); + return 0; case 80: - return genLowcodeInt64GreatEqual(); + /* begin genLowcodeInt64GreatEqual */ + topRegistersMask9 = 0; + rTop12 = (rNext8 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop12 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext8 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1U << reg8; + } + } + if (rTop12 == NoReg) { + rTop12 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1U << rTop12); + } + assert(!(((rTop12 == NoReg) + || (rNext8 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop12) | (1U << rNext8)); + assert(!((rResult5 == NoReg))); + second8 = rTop12; + first8 = rNext8; + value4 = rResult5; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + abort(); + return 0; case 81: - return genLowcodeInt64Less(); + /* begin genLowcodeInt64Less */ + topRegistersMask10 = 0; + rTop13 = (rNext9 = NoReg); + rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop13 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext9 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask10 = 1U << reg9; + } + } + if (rTop13 == NoReg) { + rTop13 = allocateRegNotConflictingWith(topRegistersMask10); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop13); + } + assert(!(((rTop13 == NoReg) + || (rNext9 == NoReg)))); + rResult6 = allocateFloatRegNotConflictingWith((1U << rTop13) | (1U << rNext9)); + assert(!((rResult6 == NoReg))); + second9 = rTop13; + first9 = rNext9; + value5 = rResult6; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + abort(); + return 0; case 82: - return genLowcodeInt64LessEqual(); + /* begin genLowcodeInt64LessEqual */ + topRegistersMask11 = 0; + rTop14 = (rNext10 = NoReg); + rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop14 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1U << reg10; + } + } + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(topRegistersMask11); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop14); + } + assert(!(((rTop14 == NoReg) + || (rNext10 == NoReg)))); + rResult7 = allocateFloatRegNotConflictingWith((1U << rTop14) | (1U << rNext10)); + assert(!((rResult7 == NoReg))); + second10 = rTop14; + first10 = rNext10; + value6 = rResult7; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + abort(); + return 0; case 83: - return genLowcodeInt64NotEqual(); + /* begin genLowcodeInt64NotEqual */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop15 = (rNext12 = (rNextNext1 = (rNextNextNext1 = NoReg))); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext12 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext12 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext12 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + nativeValueIndex1 += 1; + } + } + if (rTop15 == NoReg) { + registerMask1 = 0; + if (rNext12 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext12; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rTop15 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext12 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop15; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNext12 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop15) | (1U << rNext12); + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNextNext1 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask1 = ((1U << rTop15) | (1U << rNext12)) | (1U << rNextNext1); + rNextNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop15 == NoReg) + || ((rNext12 == NoReg) + || ((rNextNext1 == NoReg) + || (rNextNextNext1 == NoReg)))))); + secondLow5 = rTop15; + secondHigh5 = rNext12; + firstLow5 = rNextNext1; + firstHigh5 = rNextNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), secondLow5, secondHigh5); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow5, firstHigh5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondHigh5, firstHigh5); + /* begin JumpNonZero: */ + falseJump7 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, secondLow5, firstLow5); + /* begin JumpNonZero: */ + falseJump22 = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCqR, 0, firstLow5); + /* begin Jump: */ + contJump7 = genoperand(Jump, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(MoveCqR, 1, firstLow5); + falseLabel1 = anInstruction17; + jmpTarget(falseJump7, falseLabel1); + jmpTarget(falseJump22, falseLabel1); + jmpTarget(contJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(firstLow5); + + return 0; case 84: - return genLowcodeInt64ToFloat32(); + /* begin genLowcodeInt64ToFloat32 */ + rTop17 = NoReg; + frResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop17 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop17 == NoReg) + || (frResult2 == NoReg)))); + value7 = rTop17; + result2 = frResult2; + + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + abort(); + return 0; case 85: - return genLowcodeInt64ToFloat64(); + /* begin genLowcodeInt64ToFloat64 */ + rTop18 = NoReg; + frResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop18 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop18 == NoReg) { + rTop18 = allocateRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop18 == NoReg) + || (frResult3 == NoReg)))); + value8 = rTop18; + result3 = frResult3; + + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + abort(); + return 0; case 86: - return genLowcodeInt64ToPointer(); + /* begin genLowcodeInt64ToPointer */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask13 = 0; + rTop19 = (rNext14 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (rNext14 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1U << reg12; + } + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(topRegistersMask13); + } + if (rNext14 == NoReg) { + rNext14 = allocateRegNotConflictingWith(1U << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext14 == NoReg)))); + valueLow2 = rTop19; + valueHigh2 = rNext14; + + nativePopToRegsecondReg(ssNativeTop(), valueLow2, valueHigh2); + ssNativePop(1); + ssPushNativeRegister(valueLow2); + + return 0; case 87: - return genLowcodeLeftShift32(); + /* begin genLowcodeLeftShift32 */ + topRegistersMask14 = 0; + rTop20 = (rNext15 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext15 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1U << reg13; + } + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(topRegistersMask14); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1U << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext15 == NoReg)))); + shiftAmount = rTop20; + value10 = rNext15; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + /* begin LogicalShiftLeftR:R: */ + genoperandoperand(LogicalShiftLeftRR, shiftAmount, value10); + ssPushNativeRegister(value10); + return 0; case 88: - return genLowcodeLeftShift64(); + /* begin genLowcodeLeftShift64 */ + topRegistersMask15 = 0; + rTop21 = (rNext16 = NoReg); + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop21 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext16 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext16 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (rNext16 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1U << reg14; + } + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(topRegistersMask15); + } + if (rNext16 == NoReg) { + rNext16 = allocateRegNotConflictingWith(1U << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext16 == NoReg)))); + rResult8 = allocateFloatRegNotConflictingWith((1U << rTop21) | (1U << rNext16)); + assert(!((rResult8 == NoReg))); + shiftAmount1 = rTop21; + value11 = rNext16; + result4 = rResult8; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value11); + ssNativePop(1); + abort(); + return 0; case 89: - return genLowcodeLoadArgumentAddress(); + /* begin genLowcodeLoadArgumentAddress */ + baseOffset = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult9 = NoReg; + rResult9 = allocateRegNotConflictingWith(0); + assert(!((rResult9 == NoReg))); + pointer = rResult9; + + loadNativeArgumentAddressto(baseOffset, pointer); + ssPushNativeRegister(pointer); + extA = 0; + return 0; case 90: - return genLowcodeLoadArgumentFloat32(); + /* begin genLowcodeLoadArgumentFloat32 */ + baseOffset1 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult4 = NoReg; + frResult4 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult4 == NoReg))); + floatValue5 = frResult4; + + loadNativeArgumentAddressto(baseOffset1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue5); + ssPushNativeRegisterSingleFloat(floatValue5); + extA = 0; + return 0; case 91: - return genLowcodeLoadArgumentFloat64(); + /* begin genLowcodeLoadArgumentFloat64 */ + baseOffset2 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult5 = NoReg; + frResult5 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult5 == NoReg))); + doubleValue = frResult5; + + loadNativeArgumentAddressto(baseOffset2, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction21 = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue); + ssPushNativeRegisterDoubleFloat(doubleValue); + extA = 0; + return 0; case 92: - return genLowcodeLoadArgumentInt16(); + /* begin genLowcodeLoadArgumentInt16 */ + baseOffset3 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult10 = NoReg; + rResult10 = allocateRegNotConflictingWith(0); + assert(!((rResult10 == NoReg))); + value12 = rResult10; + + loadNativeArgumentAddressto(baseOffset3, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value12); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value12, value12); + ssPushNativeRegister(value12); + extA = 0; + return 0; case 93: - return genLowcodeLoadArgumentInt32(); + /* begin genLowcodeLoadArgumentInt32 */ + baseOffset4 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult11 = NoReg; + rResult11 = allocateRegNotConflictingWith(0); + assert(!((rResult11 == NoReg))); + value13 = rResult11; + + loadNativeArgumentAddressto(baseOffset4, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value13); + ssPushNativeRegister(value13); + extA = 0; + return 0; case 94: - return genLowcodeLoadArgumentInt64(); + /* begin genLowcodeLoadArgumentInt64 */ + baseOffset20 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult29 = (rResult210 = NoReg); + rResult29 = allocateRegNotConflictingWith(0); + rResult210 = allocateRegNotConflictingWith(1U << rResult29); + assert(!(((rResult29 == NoReg) + || (rResult210 == NoReg)))); + valueLow4 = rResult29; + valueHigh4 = rResult210; + + loadNativeArgumentAddressto(baseOffset20, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow4); + /* begin checkQuickConstant:forInstruction: */ + anInstruction110 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh4); + ssPushNativeRegistersecondRegister(valueLow4, valueHigh4); + + extA = 0; + return 0; case 95: - return genLowcodeLoadArgumentInt8(); + /* begin genLowcodeLoadArgumentInt8 */ + baseOffset5 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult12 = NoReg; + rResult12 = allocateRegNotConflictingWith(0); + assert(!((rResult12 == NoReg))); + value14 = rResult12; + + loadNativeArgumentAddressto(baseOffset5, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value14); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value14, value14); + ssPushNativeRegister(value14); + extA = 0; + return 0; case 96: - return genLowcodeLoadArgumentPointer(); + /* begin genLowcodeLoadArgumentPointer */ + baseOffset6 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult13 = NoReg; + rResult13 = allocateRegNotConflictingWith(0); + assert(!((rResult13 == NoReg))); + pointerResult = rResult13; + + loadNativeArgumentAddressto(baseOffset6, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction27 = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult); + ssPushNativeRegister(pointerResult); + extA = 0; + return 0; case 97: - return genLowcodeLoadArgumentUInt16(); + /* begin genLowcodeLoadArgumentUInt16 */ + baseOffset7 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult14 = NoReg; + rResult14 = allocateRegNotConflictingWith(0); + assert(!((rResult14 == NoReg))); + value15 = rResult14; + + loadNativeArgumentAddressto(baseOffset7, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction28 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value15); + ssPushNativeRegister(value15); + extA = 0; + return 0; case 98: - return genLowcodeLoadArgumentUInt32(); + /* begin genLowcodeLoadArgumentUInt32 */ + baseOffset8 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult15 = NoReg; + rResult15 = allocateRegNotConflictingWith(0); + assert(!((rResult15 == NoReg))); + value16 = rResult15; + + loadNativeArgumentAddressto(baseOffset8, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value16); + ssPushNativeRegister(value16); + extA = 0; + return 0; case 99: - return genLowcodeLoadArgumentUInt64(); + /* begin genLowcodeLoadArgumentUInt64 */ + baseOffset21 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult30 = (rResult211 = NoReg); + rResult30 = allocateRegNotConflictingWith(0); + rResult211 = allocateRegNotConflictingWith(1U << rResult30); + assert(!(((rResult30 == NoReg) + || (rResult211 == NoReg)))); + valueLow5 = rResult30; + valueHigh5 = rResult211; + + loadNativeArgumentAddressto(baseOffset21, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction30 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow5); + /* begin checkQuickConstant:forInstruction: */ + anInstruction111 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh5); + ssPushNativeRegistersecondRegister(valueLow5, valueHigh5); + + extA = 0; + return 0; case 100: - return genLowcodeLoadArgumentUInt8(); + /* begin genLowcodeLoadArgumentUInt8 */ + baseOffset9 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult16 = NoReg; + rResult16 = allocateRegNotConflictingWith(0); + assert(!((rResult16 == NoReg))); + value17 = rResult16; + + loadNativeArgumentAddressto(baseOffset9, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value17); + ssPushNativeRegister(value17); + extA = 0; + return 0; case 101: - return genLowcodeLoadFloat32FromMemory(); + /* begin genLowcodeLoadFloat32FromMemory */ + rTop22 = NoReg; + frResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop22 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(0); + } + frResult6 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop22 == NoReg) + || (frResult6 == NoReg)))); + pointer1 = rTop22; + value18 = frResult6; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperandoperand(MoveM32rRs, 0, pointer1, value18); + ssPushNativeRegisterSingleFloat(value18); + return 0; case 102: - return genLowcodeLoadFloat64FromMemory(); + /* begin genLowcodeLoadFloat64FromMemory */ + rTop23 = NoReg; + frResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop23 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop23 == NoReg) { + rTop23 = allocateRegNotConflictingWith(0); + } + frResult7 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop23 == NoReg) + || (frResult7 == NoReg)))); + pointer2 = rTop23; + value19 = frResult7; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction33 = genoperandoperandoperand(MoveM64rRd, 0, pointer2, value19); + ssPushNativeRegisterDoubleFloat(value19); + return 0; case 103: - return genLowcodeLoadInt16FromMemory(); + /* begin genLowcodeLoadInt16FromMemory */ + rTop24 = NoReg; + rResult17 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop24 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(1U << rTop24); + assert(!(((rTop24 == NoReg) + || (rResult17 == NoReg)))); + pointer3 = rTop24; + value20 = rResult17; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction34 = genoperandoperandoperand(MoveM16rR, 0, pointer3, value20); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value20, value20); + ssPushNativeRegister(value20); + return 0; case 104: - return genLowcodeLoadInt32FromMemory(); + /* begin genLowcodeLoadInt32FromMemory */ + rTop25 = NoReg; + rResult18 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop25 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + rResult18 = allocateRegNotConflictingWith(1U << rTop25); + assert(!(((rTop25 == NoReg) + || (rResult18 == NoReg)))); + pointer4 = rTop25; + value21 = rResult18; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction35 = genoperandoperandoperand(MoveM32rR, 0, pointer4, value21); + ssPushNativeRegister(value21); + return 0; case 105: - return genLowcodeLoadInt64FromMemory(); + /* begin genLowcodeLoadInt64FromMemory */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop30 = NoReg; + rResult31 = (rResult31 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop30 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop30 == NoReg) { + rTop30 = allocateRegNotConflictingWith(0); + } + rResult31 = allocateRegNotConflictingWith(1U << rTop30); + rResult212 = allocateRegNotConflictingWith((1U << rTop30) | (1U << rResult31)); + assert(!(((rTop30 == NoReg) + || ((rResult31 == NoReg) + || (rResult212 == NoReg))))); + pointer8 = rTop30; + valueLow6 = rResult31; + valueHigh6 = rResult212; + + nativePopToReg(ssNativeTop(), pointer8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction36 = genoperandoperandoperand(MoveM32rR, 0, pointer8, valueLow6); + /* begin checkQuickConstant:forInstruction: */ + anInstruction112 = genoperandoperandoperand(MoveM32rR, 4, pointer8, valueHigh6); + ssPushNativeRegistersecondRegister(valueLow6, valueHigh6); + + return 0; case 106: - return genLowcodeLoadInt8FromMemory(); + /* begin genLowcodeLoadInt8FromMemory */ + rTop26 = NoReg; + rResult19 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop26 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(0); + } + rResult19 = allocateRegNotConflictingWith(1U << rTop26); + assert(!(((rTop26 == NoReg) + || (rResult19 == NoReg)))); + pointer5 = rTop26; + value22 = rResult19; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction37 = genoperandoperandoperand(MoveM8rR, 0, pointer5, value22); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value22, value22); + ssPushNativeRegister(value22); + return 0; case 107: - return genLowcodeLoadLocalAddress(); + /* begin genLowcodeLoadLocalAddress */ + baseOffset10 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult20 = NoReg; + rResult20 = allocateRegNotConflictingWith(0); + assert(!((rResult20 == NoReg))); + pointer6 = rResult20; + + loadNativeLocalAddressto(baseOffset10, pointer6); + ssPushNativeRegister(pointer6); + extA = 0; + return 0; case 108: - return genLowcodeLoadLocalFloat32(); + /* begin genLowcodeLoadLocalFloat32 */ + baseOffset11 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult8 = NoReg; + frResult8 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult8 == NoReg))); + floatValue6 = frResult8; + + loadNativeLocalAddressto(baseOffset11, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction38 = genoperandoperandoperand(MoveM32rRs, 0, TempReg, floatValue6); + ssPushNativeRegisterSingleFloat(floatValue6); + extA = 0; + return 0; case 109: - return genLowcodeLoadLocalFloat64(); + /* begin genLowcodeLoadLocalFloat64 */ + baseOffset12 = extA; + /* begin allocateRegistersForLowcodeResultFloat: */ + frResult9 = NoReg; + frResult9 = allocateFloatRegNotConflictingWith(0); + assert(!((frResult9 == NoReg))); + doubleValue1 = frResult9; + + loadNativeLocalAddressto(baseOffset12, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction39 = genoperandoperandoperand(MoveM64rRd, 0, TempReg, doubleValue1); + ssPushNativeRegisterDoubleFloat(doubleValue1); + extA = 0; + return 0; case 110: - return genLowcodeLoadLocalInt16(); + /* begin genLowcodeLoadLocalInt16 */ + baseOffset13 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult21 = NoReg; + rResult21 = allocateRegNotConflictingWith(0); + assert(!((rResult21 == NoReg))); + value23 = rResult21; + + loadNativeLocalAddressto(baseOffset13, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction40 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value23); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value23, value23); + ssPushNativeRegister(value23); + extA = 0; + return 0; case 111: - return genLowcodeLoadLocalInt32(); + /* begin genLowcodeLoadLocalInt32 */ + baseOffset14 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult22 = NoReg; + rResult22 = allocateRegNotConflictingWith(0); + assert(!((rResult22 == NoReg))); + value24 = rResult22; + + loadNativeLocalAddressto(baseOffset14, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction41 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value24); + ssPushNativeRegister(value24); + extA = 0; + return 0; case 112: - return genLowcodeLoadLocalInt64(); + /* begin genLowcodeLoadLocalInt64 */ + baseOffset22 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult32 = (rResult213 = NoReg); + rResult32 = allocateRegNotConflictingWith(0); + rResult213 = allocateRegNotConflictingWith(1U << rResult32); + assert(!(((rResult32 == NoReg) + || (rResult213 == NoReg)))); + valueLow7 = rResult32; + valueHigh7 = rResult213; + + loadNativeLocalAddressto(baseOffset22, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction42 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow7); + /* begin checkQuickConstant:forInstruction: */ + anInstruction113 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh7); + ssPushNativeRegistersecondRegister(valueLow7, valueHigh7); + + extA = 0; + return 0; case 113: - return genLowcodeLoadLocalInt8(); + /* begin genLowcodeLoadLocalInt8 */ + baseOffset15 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult23 = NoReg; + rResult23 = allocateRegNotConflictingWith(0); + assert(!((rResult23 == NoReg))); + value25 = rResult23; + + loadNativeLocalAddressto(baseOffset15, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction43 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value25); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value25, value25); + ssPushNativeRegister(value25); + extA = 0; + return 0; case 114: - return genLowcodeLoadLocalPointer(); + /* begin genLowcodeLoadLocalPointer */ + baseOffset16 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult24 = NoReg; + rResult24 = allocateRegNotConflictingWith(0); + assert(!((rResult24 == NoReg))); + pointerResult1 = rResult24; + + loadNativeLocalAddressto(baseOffset16, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction44 = genoperandoperandoperand(MoveMwrR, 0, TempReg, pointerResult1); + ssPushNativeRegister(pointerResult1); + extA = 0; + return 0; case 115: - return genLowcodeLoadLocalUInt16(); + /* begin genLowcodeLoadLocalUInt16 */ + baseOffset17 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult25 = NoReg; + rResult25 = allocateRegNotConflictingWith(0); + assert(!((rResult25 == NoReg))); + value26 = rResult25; + + loadNativeLocalAddressto(baseOffset17, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction45 = genoperandoperandoperand(MoveM16rR, 0, TempReg, value26); + ssPushNativeRegister(value26); + extA = 0; + return 0; case 116: - return genLowcodeLoadLocalUInt32(); + /* begin genLowcodeLoadLocalUInt32 */ + baseOffset18 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult26 = NoReg; + rResult26 = allocateRegNotConflictingWith(0); + assert(!((rResult26 == NoReg))); + value27 = rResult26; + + loadNativeLocalAddressto(baseOffset18, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction46 = genoperandoperandoperand(MoveM32rR, 0, TempReg, value27); + ssPushNativeRegister(value27); + extA = 0; + return 0; case 117: - return genLowcodeLoadLocalUInt64(); + /* begin genLowcodeLoadLocalUInt64 */ + baseOffset23 = extA; + /* begin allocateRegistersForLowcodeResultInteger2: */ + rResult33 = (rResult214 = NoReg); + rResult33 = allocateRegNotConflictingWith(0); + rResult214 = allocateRegNotConflictingWith(1U << rResult33); + assert(!(((rResult33 == NoReg) + || (rResult214 == NoReg)))); + valueLow8 = rResult33; + valueHigh8 = rResult214; + + loadNativeLocalAddressto(baseOffset23, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction47 = genoperandoperandoperand(MoveM32rR, 0, TempReg, valueLow8); + /* begin checkQuickConstant:forInstruction: */ + anInstruction114 = genoperandoperandoperand(MoveM32rR, 4, TempReg, valueHigh8); + ssPushNativeRegistersecondRegister(valueLow8, valueHigh8); + + extA = 0; + return 0; case 118: - return genLowcodeLoadLocalUInt8(); + /* begin genLowcodeLoadLocalUInt8 */ + baseOffset19 = extA; + /* begin allocateRegistersForLowcodeResultInteger: */ + rResult27 = NoReg; + rResult27 = allocateRegNotConflictingWith(0); + assert(!((rResult27 == NoReg))); + value28 = rResult27; + + loadNativeLocalAddressto(baseOffset19, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction48 = genoperandoperandoperand(MoveM8rR, 0, TempReg, value28); + ssPushNativeRegister(value28); + extA = 0; + return 0; case 119: - return genLowcodeLoadObjectAt(); + /* begin genLowcodeLoadObjectAt */ + rTop27 = (rOopTop = NoReg); + topRegisterMask = 0; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + } + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + /* begin registerMaskFor: */ + topRegisterMask = 1U << rOopTop; + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(topRegisterMask); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(1U << rTop27); + } + assert(!(((rTop27 == NoReg) + || (rOopTop == NoReg)))); + fieldIndex = rTop27; + object = rOopTop; + + nativePopToReg(ssNativeTop(), fieldIndex); + ssNativePop(1); + popToReg(ssTop(), object); + ssPop(1); + genLcLoadObjectat(object, fieldIndex); + return 0; default: return genLowcodeUnaryInlinePrimitive3(prim); @@ -36124,187 +30916,1605 @@ genLowcodeUnaryInlinePrimitive2(sqInt prim) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive3(sqInt prim) { + AbstractInstruction *abstractInstruction; + AbstractInstruction *abstractInstruction1; + AbstractInstruction *abstractInstruction11; + AbstractInstruction *abstractInstruction2; + AbstractInstruction *abstractInstruction3; + AbstractInstruction *abstractInstruction4; + sqInt address; + sqInt address1; + sqInt alignedSize; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction41; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt base; + sqInt base1; + sqInt base2; + sqInt baseValue; + sqInt baseValue1; + sqInt baseValue2; + sqInt constant; + sqInt constant1; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + sqInt dest; + sqInt dest1; + sqInt dest2; + sqInt destValue; + sqInt destValue1; + sqInt destValue2; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + sqInt fieldIndex; + sqInt first; + sqInt first1; + sqInt first2; + sqInt first4; + sqInt first5; + sqInt firstHigh1; + sqInt firstHighValue; + sqInt firstLow1; + sqInt firstLowValue; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue2; + sqInt firstValue4; + sqInt firstValue5; + sqInt frTop; + sqInt frTop1; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt nativeValueIndex2; + sqInt nativeValueIndex3; + sqInt object; + sqInt objectValue; + sqInt offset; + sqInt offset1; + sqInt offset11; + sqInt offset21; + sqInt offset3; + sqInt offset4; + sqInt offsetHigh; + sqInt offsetHighValue; + sqInt offsetLow; + sqInt offsetLowValue; + sqInt offsetValue; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointer6; + sqInt pointer7; + sqInt pointer8; + sqInt pointerResult; + sqInt pointerResultValue; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValue8; + sqInt pointerValue9; + sqInt pointerValueValue; + sqInt quickConstant; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg11; + sqInt reg111; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg2; + sqInt reg3; + sqInt reg4; + sqInt reg6; + sqInt reg8; + sqInt reg9; + sqInt registerID; + sqInt registerID1; + sqInt registerID2; + sqInt registerID3; + sqInt registerID4; + sqInt registerMask; + sqInt registerMask1; + sqInt registerMask2; + sqInt registerMask3; + sqInt result; + sqInt result1; + sqInt resultHigh1; + sqInt resultHighValue; + sqInt resultLow1; + sqInt resultLowValue; + sqInt resultValue; + sqInt resultValue1; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext2; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNext2; + sqInt rNextNext3; + sqInt rNextNextNext; + sqInt rOopTop; + sqInt rResult; + sqInt rResult1; + sqInt rResult2; + sqInt rResult21; + sqInt rResult22; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop13; + sqInt rTop15; + sqInt rTop16; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop31; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt second; + sqInt second1; + sqInt second2; + sqInt second4; + sqInt second5; + sqInt secondHigh1; + sqInt secondHighValue; + sqInt secondLow1; + sqInt secondLowValue; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue2; + sqInt secondValue4; + sqInt secondValue5; + sqInt size; + sqInt size1; + sqInt size3; + sqInt size4; + sqInt size5; + sqInt sizeHigh; + sqInt sizeHighValue; + sqInt sizeLow; + sqInt sizeLow1; + sqInt sizeLowValue; + sqInt sizeValue; + sqInt sizeValue2; + sqInt sizeValue3; + sqInt source; + sqInt source1; + sqInt source2; + sqInt sourceValue; + sqInt sourceValue1; + sqInt sourceValue2; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask13; + sqInt topRegistersMask2; + sqInt topRegistersMask3; + sqInt topRegistersMask4; + sqInt topRegistersMask6; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value2; + sqInt value3; + sqInt value5; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueHigh; + sqInt valueHigh1; + sqInt valueHigh3; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueLow; + sqInt valueLow1; + sqInt valueLow3; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue2; + sqInt valueValue3; + sqInt valueValue5; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + + sizeLow1 = 0; switch (prim) { case 120: - return genLowcodeLoadObjectField(); + /* begin genLowcodeLoadObjectField */ + fieldIndex = extA; + /* begin allocateRegistersForLowcodeOop: */ + rOopTop = NoReg; + if ((registerOrNone(ssTop())) != NoReg) { + rOopTop = registerOrNone(ssTop()); + } + if (rOopTop == NoReg) { + rOopTop = allocateRegNotConflictingWith(0); + } + assert(!((rOopTop == NoReg))); + object = rOopTop; + + popToReg(ssTop(), object); + ssPop(1); + genLcLoadObjectfield(object, fieldIndex); + extA = 0; + return 0; case 121: - return genLowcodeLoadPointerFromMemory(); + /* begin genLowcodeLoadPointerFromMemory */ + rTop = NoReg; + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rTop); + assert(!(((rTop == NoReg) + || (rResult == NoReg)))); + pointer = rTop; + pointerResult = rResult; + + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperandoperand(MoveMwrR, 0, pointer, pointerResult); + ssPushNativeRegister(pointerResult); + return 0; case 122: - return genLowcodeLoadUInt16FromMemory(); + /* begin genLowcodeLoadUInt16FromMemory */ + rTop1 = NoReg; + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop1 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(0); + } + rResult1 = allocateRegNotConflictingWith(1U << rTop1); + assert(!(((rTop1 == NoReg) + || (rResult1 == NoReg)))); + pointer1 = rTop1; + value = rResult1; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperandoperand(MoveM16rR, 0, pointer1, value); + ssPushNativeRegister(value); + return 0; case 123: - return genLowcodeLoadUInt32FromMemory(); + /* begin genLowcodeLoadUInt32FromMemory */ + rTop2 = NoReg; + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop2 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(0); + } + rResult2 = allocateRegNotConflictingWith(1U << rTop2); + assert(!(((rTop2 == NoReg) + || (rResult2 == NoReg)))); + pointer2 = rTop2; + value1 = rResult2; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperandoperand(MoveM32rR, 0, pointer2, value1); + ssPushNativeRegister(value1); + return 0; case 0x7C: - return genLowcodeLoadUInt64FromMemory(); + /* begin genLowcodeLoadUInt64FromMemory */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop26 = NoReg; + rResult7 = (rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop26 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(0); + } + rResult7 = allocateRegNotConflictingWith(1U << rTop26); + rResult22 = allocateRegNotConflictingWith((1U << rTop26) | (1U << rResult7)); + assert(!(((rTop26 == NoReg) + || ((rResult7 == NoReg) + || (rResult22 == NoReg))))); + pointer6 = rTop26; + valueLow3 = rResult7; + valueHigh3 = rResult22; + + nativePopToReg(ssNativeTop(), pointer6); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperandoperand(MoveM32rR, 0, pointer6, valueLow3); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperandoperand(MoveM32rR, 4, pointer6, valueHigh3); + ssPushNativeRegistersecondRegister(valueLow3, valueHigh3); + + return 0; case 125: - return genLowcodeLoadUInt8FromMemory(); + /* begin genLowcodeLoadUInt8FromMemory */ + rTop3 = NoReg; + rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop3 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rTop3); + assert(!(((rTop3 == NoReg) + || (rResult3 == NoReg)))); + pointer3 = rTop3; + value2 = rResult3; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperandoperand(MoveM8rR, 0, pointer3, value2); + ssPushNativeRegister(value2); + return 0; case 0x7E: - return genLowcodeLocalFrameSize(); + /* begin genLowcodeLocalFrameSize */ + size = extA; + assert(needsFrame); + + /* Align the size to 16 bytes. */ + hasNativeFrame = 1; + + /* Mark the stack frame */ + alignedSize = (size + 15) & -16; + annotateobjRef(gMoveCwR(splObj(LowcodeContextMark), TempReg), splObj(LowcodeContextMark)); + /* begin MoveR:Mw:r: */ + offset4 = frameOffsetOfNativeFrameMark(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperandoperand(MoveRMwr, TempReg, offset4, FPReg); + /* begin MoveAw:R: */ + address = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction12 = genoperandoperand(MoveAwR, address, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperand(AddCqR, 1, TempReg); + /* begin MoveR:Mw:r: */ + offset11 = frameOffsetOfPreviousNativeStackPointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperandoperand(MoveRMwr, TempReg, offset11, FPReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction41 = genoperandoperand(SubCqR, alignedSize, TempReg); + /* begin MoveR:Mw:r: */ + offset21 = frameOffsetOfNativeFramePointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperandoperand(MoveRMwr, TempReg, offset21, FPReg); + /* begin MoveR:Mw:r: */ + offset3 = frameOffsetOfNativeStackPointer(); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperandoperand(MoveRMwr, TempReg, offset3, FPReg); + /* begin SubCq:R: */ + quickConstant = 1 + (defaultNativeStackFrameSize()); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperand(SubCqR, quickConstant, TempReg); + /* begin MoveR:Aw: */ + address1 = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction8 = genoperandoperand(MoveRAw, TempReg, address1); + extA = 0; + return 0; case 0x7F: - return genLowcodeLockRegisters(); + /* begin genLowcodeLockRegisters */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + return 0; case 128: - return genLowcodeLockVM(); + /* begin genLowcodeLockVM */ + abort(); + return 0; case 129: - return genLowcodeMalloc32(); + /* begin genLowcodeMalloc32 */ + rTop27 = NoReg; + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop27 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(0); + } + rResult8 = allocateRegNotConflictingWith(1U << rTop27); + assert(!(((rTop27 == NoReg) + || (rResult8 == NoReg)))); + size1 = rTop27; + pointer7 = rResult8; + + nativePopToReg(ssNativeTop(), size1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (size1 != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, size1, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction3 = genoperand(Call, ceMallocTrampoline); + (abstractInstruction3->annotation = IsRelativeCall); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, pointer7); + ssPushNativeRegister(pointer7); + return 0; case 130: - return genLowcodeMalloc64(); + /* begin genLowcodeMalloc64 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger: */ + topRegistersMask12 = 0; + rTop28 = (rNext10 = NoReg); + rResult9 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop28 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1U << reg10; + } + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(topRegistersMask12); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop28); + } + assert(!(((rTop28 == NoReg) + || (rNext10 == NoReg)))); + rResult9 = allocateFloatRegNotConflictingWith((1U << rTop28) | (1U << rNext10)); + assert(!((rResult9 == NoReg))); + sizeLow = rTop28; + sizeHigh = rNext10; + pointer8 = rResult9; + + nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + if (sizeLow != ReceiverResultReg) { + /* begin MoveR:R: */ + genoperandoperand(MoveRR, sizeLow, ReceiverResultReg); + } + /* begin CallRT: */ + abstractInstruction4 = genoperand(Call, ceMallocTrampoline); + (abstractInstruction4->annotation = IsRelativeCall); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, pointer8); + ssPushNativeRegister(pointer8); + + return 0; case 131: - return genLowcodeMemcpy32(); + /* begin genLowcodeMemcpy32 */ + rTop29 = (rNext13 = (rNextNext2 = NoReg)); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext13 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + } + if (rTop29 == NoReg) { + registerMask2 = 0; + if (rNext13 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rNext13; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rTop29 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext13 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rTop29; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rNext13 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1U << rTop29) | (1U << rNext13); + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop29 == NoReg) + || ((rNext13 == NoReg) + || (rNextNext2 == NoReg))))); + size3 = rTop29; + source = rNext13; + dest = rNextNext2; + + nativePopToReg(ssNativeTop(), size3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), source); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytosize(backEnd, source, dest, size3); + return 0; case 132: - return genLowcodeMemcpy64(); + /* begin genLowcodeMemcpy64 */ + rTop30 = (rNext14 = (rNextNext3 = NoReg)); + nativeValueIndex3 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop30 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNext14 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + } + } + if (rTop30 == NoReg) { + registerMask3 = 0; + if (rNext14 != NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rNext14; + } + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + rTop30 = allocateRegNotConflictingWith(registerMask3); + } + if (rNext14 == NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rTop30; + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + rNext14 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNext3 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask3 = (1U << rTop30) | (1U << rNext14); + rNextNext3 = allocateRegNotConflictingWith(registerMask3); + } + assert(!(((rTop30 == NoReg) + || ((rNext14 == NoReg) + || (rNextNext3 == NoReg))))); + size4 = rTop30; + source1 = rNext14; + dest1 = rNextNext3; + + nativePopToReg(ssNativeTop(), size4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), source1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest1); + ssNativePop(1); + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytosize(backEnd, source1, dest1, sizeLow1); + return 0; case 133: - return genLowcodeMemcpyFixed(); + /* begin genLowcodeMemcpyFixed */ + size5 = extA; + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask13 = 0; + rTop31 = (rNext15 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop31 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext15 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1U << reg15; + } + } + if (rTop31 == NoReg) { + rTop31 = allocateRegNotConflictingWith(topRegistersMask13); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1U << rTop31); + } + assert(!(((rTop31 == NoReg) + || (rNext15 == NoReg)))); + source2 = rTop31; + dest2 = rNext15; + + nativePopToReg(ssNativeTop(), source2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), dest2); + ssNativePop(1); + if (size5 == BytesPerWord) { + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperandoperand(MoveMwrR, 0, source2, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperandoperand(MoveRMwr, TempReg, 0, dest2); + } + else { + /* begin ssFlushAll */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); + genMemCopytoconstantSize(backEnd, source2, dest2, size5); + } + extA = 0; + return 0; case 134: - return genLowcodeMoveFloat32ToPhysical(); + /* begin genLowcodeMoveFloat32ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 135: - return genLowcodeMoveFloat64ToPhysical(); + /* begin genLowcodeMoveFloat64ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += 8; + extA = 0; + return 0; case 136: - return genLowcodeMoveInt32ToPhysical(); + /* begin genLowcodeMoveInt32ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 137: - return genLowcodeMoveInt64ToPhysical(); + /* begin genLowcodeMoveInt64ToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += 8; + extA = 0; + return 0; case 138: - return genLowcodeMovePointerToPhysical(); + /* begin genLowcodeMovePointerToPhysical */ + nativeStackPopToReg(ssNativeTop(), extA); + ssNativePop(1); + currentCallCleanUpSize += BytesPerWord; + extA = 0; + return 0; case 139: - return genLowcodeMul32(); + /* begin genLowcodeMul32 */ + topRegistersMask = 0; + rTop4 = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext == NoReg)))); + second = rTop4; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, second, first); + ssPushNativeRegister(first); + return 0; case 140: - return genLowcodeMul64(); + /* begin genLowcodeMul64 */ + topRegistersMask1 = 0; + rTop5 = (rNext1 = NoReg); + rResult4 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop5 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext1 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg1; + } + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop5); + } + assert(!(((rTop5 == NoReg) + || (rNext1 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop5) | (1U << rNext1)); + assert(!((rResult4 == NoReg))); + second1 = rTop5; + first1 = rNext1; + result = rResult4; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + abort(); + return 0; case 141: - return genLowcodeNeg32(); + /* begin genLowcodeNeg32 */ + rTop6 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(0); + } + assert(!((rTop6 == NoReg))); + value3 = rTop6; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin NegateR: */ + genoperand(NegateR, value3); + ssPushNativeRegister(value3); + return 0; case 142: - return genLowcodeNeg64(); + /* begin genLowcodeNeg64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask2 = 0; + rTop7 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop7 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop7); + } + assert(!(((rTop7 == NoReg) + || (rNext2 == NoReg)))); + valueLow = rTop7; + valueHigh = rNext2; + + nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, valueLow); + /* begin NotR: */ + genoperand(NotR, valueHigh); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperand(AddCqR, 1, valueLow); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperand(AddcCqR, 0, valueHigh); + ssPushNativeRegistersecondRegister(valueLow, valueHigh); + + return 0; case 143: - return genLowcodeNot32(); + /* begin genLowcodeNot32 */ + rTop8 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(0); + } + assert(!((rTop8 == NoReg))); + value5 = rTop8; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, value5); + ssPushNativeRegister(value5); + return 0; case 144: - return genLowcodeNot64(); + /* begin genLowcodeNot64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask3 = 0; + rTop9 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg3; + } + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop9); + } + assert(!(((rTop9 == NoReg) + || (rNext3 == NoReg)))); + valueLow1 = rTop9; + valueHigh1 = rNext3; + + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin NotR: */ + genoperand(NotR, valueLow1); + /* begin NotR: */ + genoperand(NotR, valueHigh1); + ssPushNativeRegistersecondRegister(valueLow1, valueHigh1); + + return 0; case 145: - return genLowcodeOr32(); + /* begin genLowcodeOr32 */ + topRegistersMask4 = 0; + rTop10 = (rNext4 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext4 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1U << reg4; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext4 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop10) | (1U << rNext4)); + assert(!((rResult5 == NoReg))); + second2 = rTop10; + first2 = rNext4; + result1 = rResult5; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 146: - return genLowcodeOr64(); + /* begin genLowcodeOr64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop13 = (rNext5 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop13 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext5 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop13 == NoReg) { + registerMask = 0; + if (rNext5 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext5; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop13 = allocateRegNotConflictingWith(registerMask); + } + if (rNext5 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop13; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext5 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop13) | (1U << rNext5); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop13) | (1U << rNext5)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop13 == NoReg) + || ((rNext5 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow1 = rTop13; + secondHigh1 = rNext5; + firstLow1 = rNextNext; + firstHigh1 = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow1, secondHigh1); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow1, firstHigh1); + ssNativePop(1); + /* begin OrR:R: */ + genoperandoperand(OrRR, secondLow1, firstLow1); + /* begin OrR:R: */ + genoperandoperand(OrRR, secondHigh1, firstHigh1); + ssPushNativeRegistersecondRegister(firstLow1, firstHigh1); + + return 0; case 147: - return genLowcodePerformCallout(); + /* begin genLowcodePerformCallout */ + callSwitchToCStack(); + /* begin checkLiteral:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCwR, extA, TempReg); + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceFFICalloutTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + /* begin annotateBytecode: */ + abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); + (abstractInstruction1->annotation = HasBytecodePC); + extA = 0; + return 0; case 148: - return genLowcodePerformCalloutIndirect(); + /* begin genLowcodePerformCalloutIndirect */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + callSwitchToCStack(); + /* begin CallRT: */ + abstractInstruction2 = genoperand(Call, ceFFICalloutTrampoline); + (abstractInstruction2->annotation = IsRelativeCall); + /* begin annotateBytecode: */ + abstractInstruction11 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); + (abstractInstruction11->annotation = HasBytecodePC); + return 0; case 149: - return genLowcodePushCalloutResultFloat32(); + /* begin genLowcodePushCalloutResultFloat32 */ + cFloatResultToRs(backEnd, DPFPReg0); + ssPushNativeRegisterSingleFloat(DPFPReg0); + return 0; case 150: - return genLowcodePushCalloutResultFloat64(); + /* begin genLowcodePushCalloutResultFloat64 */ + cFloatResultToRd(backEnd, DPFPReg0); + ssPushNativeRegisterDoubleFloat(DPFPReg0); + return 0; case 151: - return genLowcodePushCalloutResultInt32(); + /* begin genLowcodePushCalloutResultInt32 */ + reg11 = V0; + genoperandoperand(MoveRR, reg11, ReceiverResultReg); + ssPushNativeRegister(ReceiverResultReg); + return 0; case 152: - return genLowcodePushCalloutResultInt64(); + /* begin genLowcodePushCalloutResultInt64 */ + /* begin MoveR:R: */ + reg13 = cResultRegisterLow(backEnd); + genoperandoperand(MoveRR, reg13, ReceiverResultReg); + /* begin MoveR:R: */ + reg111 = cResultRegisterHigh(backEnd); + genoperandoperand(MoveRR, reg111, Arg0Reg); + ssPushNativeRegistersecondRegister(ReceiverResultReg, Arg0Reg); + + return 0; case 153: - return genLowcodePushCalloutResultPointer(); + /* begin genLowcodePushCalloutResultPointer */ + reg14 = V0; + genoperandoperand(MoveRR, reg14, ReceiverResultReg); + ssPushNativeRegister(ReceiverResultReg); + return 0; case 161: - return genLowcodePlaftormCode(); + /* begin genLowcodePlaftormCode */ + abort(); + return 0; case 162: - return genLowcodePointerAddConstantOffset(); + /* begin genLowcodePointerAddConstantOffset */ + offset = extB; + /* begin allocateRegistersForLowcodeInteger: */ + rTop15 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(0); + } + assert(!((rTop15 == NoReg))); + base = rTop15; + + nativePopToReg(ssNativeTop(), base); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(AddCqR, offset, base); + ssPushNativeRegister(base); + extB = 0; + numExtB = 0; + return 0; case 163: - return genLowcodePointerAddOffset32(); + /* begin genLowcodePointerAddOffset32 */ + topRegistersMask6 = 0; + rTop16 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop16 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg6; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1U << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext6 == NoReg)))); + offset1 = rTop16; + base1 = rNext6; + + nativePopToReg(ssNativeTop(), offset1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base1); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, offset1, base1); + ssPushNativeRegister(base1); + return 0; case 164: - return genLowcodePointerAddOffset64(); + /* begin genLowcodePointerAddOffset64 */ + /* begin allocateRegistersForLowcodeInteger3: */ + rTop18 = (rNext7 = (rNextNext1 = NoReg)); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext7 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext7 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + } + if (rTop18 == NoReg) { + registerMask1 = 0; + if (rNext7 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext7; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rTop18 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext7 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop18; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rNext7 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop18) | (1U << rNext7); + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop18 == NoReg) + || ((rNext7 == NoReg) + || (rNextNext1 == NoReg))))); + offsetLow = rTop18; + offsetHigh = rNext7; + base2 = rNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), offsetLow, offsetHigh); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base2); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, offsetLow, base2); + ssPushNativeRegister(base2); + + return 0; case 165: - return genLowcodePointerEqual(); + /* begin genLowcodePointerEqual */ + topRegistersMask8 = 0; + rTop19 = (rNext8 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg8; + } + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1U << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext8 == NoReg)))); + second4 = rTop19; + first4 = rNext8; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second4, first4); + /* begin JumpNonZero: */ + falseJump = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperand(MoveCqR, 1, first4); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperand(MoveCqR, 0, first4); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first4); + return 0; case 166: - return genLowcodePointerNotEqual(); + /* begin genLowcodePointerNotEqual */ + topRegistersMask9 = 0; + rTop20 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1U << reg9; + } + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext9 == NoReg)))); + second5 = rTop20; + first5 = rNext9; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second5, first5); + /* begin JumpZero: */ + falseJump1 = genConditionalBranchoperand(JumpZero, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperand(MoveCqR, 1, first5); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperand(MoveCqR, 0, first5); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first5); + return 0; case 167: - return genLowcodePointerToInt32(); + /* begin genLowcodePointerToInt32 */ + rTop21 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(0); + } + assert(!((rTop21 == NoReg))); + pointer4 = rTop21; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + ssPushNativeRegister(pointer4); + return 0; case 168: - return genLowcodePointerToInt64(); + /* begin genLowcodePointerToInt64 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop22 = NoReg; + rResult6 = (rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop22 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(0); + } + rResult6 = allocateRegNotConflictingWith(1U << rTop22); + rResult21 = allocateRegNotConflictingWith((1U << rTop22) | (1U << rResult6)); + assert(!(((rTop22 == NoReg) + || ((rResult6 == NoReg) + || (rResult21 == NoReg))))); + pointer5 = rTop22; + resultLow1 = rResult6; + resultHigh1 = rResult21; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointer5, resultLow1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(MoveCqR, 0, resultHigh1); + ssPushNativeRegistersecondRegister(resultLow1, resultHigh1); + + return 0; case 169: - return genLowcodePopFloat32(); + /* begin genLowcodePopFloat32 */ + topRegistersMask10 = 0; + frTop = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + assert(!((frTop == NoReg))); + value7 = frTop; + + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + return 0; case 170: - return genLowcodePopFloat64(); + /* begin genLowcodePopFloat64 */ + topRegistersMask11 = 0; + frTop1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(topRegistersMask11); + } + assert(!((frTop1 == NoReg))); + value8 = frTop1; + + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + return 0; case 171: - return genLowcodePopInt32(); + /* begin genLowcodePopInt32 */ + rTop23 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop23 == NoReg) { + rTop23 = allocateRegNotConflictingWith(0); + } + assert(!((rTop23 == NoReg))); + value9 = rTop23; + + nativePopToReg(ssNativeTop(), value9); + ssNativePop(1); + return 0; case 172: - return genLowcodePopInt64(); + /* begin genLowcodePopInt64 */ + rTop24 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + assert(!((rTop24 == NoReg))); + value10 = rTop24; + + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + return 0; case 173: - return genLowcodePopMultipleNative(); + /* begin genLowcodePopMultipleNative */ + ssPopNativeSize(extA); + extA = 0; + return 0; case 174: - return genLowcodePopPointer(); + /* begin genLowcodePopPointer */ + rTop25 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + assert(!((rTop25 == NoReg))); + pointerValue6 = rTop25; + + nativePopToReg(ssNativeTop(), pointerValue6); + ssNativePop(1); + return 0; case 175: - return genLowcodePushConstantUInt32(); + /* begin genLowcodePushConstantUInt32 */ + constant = extA; + ssPushNativeConstantInt32(constant); + extA = 0; + return 0; case 176: - return genLowcodePushConstantUInt64(); + /* begin genLowcodePushConstantUInt64 */ + constant1 = extA; + ssPushNativeConstantInt64(constant1); + extA = 0; + return 0; case 177: - return genLowcodePushNullPointer(); + /* begin genLowcodePushNullPointer */ + ssPushNativeConstantPointer(0); + return 0; case 178: - return genLowcodePushOne32(); + /* begin genLowcodePushOne32 */ + ssPushNativeConstantInt32(1); + return 0; case 179: - return genLowcodePushOne64(); + /* begin genLowcodePushOne64 */ + ssPushNativeConstantInt64(1); + return 0; case 180: - return genLowcodePushOneFloat32(); + /* begin genLowcodePushOneFloat32 */ + ssPushNativeConstantFloat32(1.0); + return 0; case 181: - return genLowcodePushOneFloat64(); + /* begin genLowcodePushOneFloat64 */ + ssPushNativeConstantFloat64(1.0); + return 0; case 182: - return genLowcodePushPhysicalFloat32(); + /* begin genLowcodePushPhysicalFloat32 */ + registerID = extA; + abort(); + extA = 0; + return 0; case 183: - return genLowcodePushPhysicalFloat64(); + /* begin genLowcodePushPhysicalFloat64 */ + registerID1 = extA; + abort(); + extA = 0; + return 0; case 184: - return genLowcodePushPhysicalInt32(); + /* begin genLowcodePushPhysicalInt32 */ + registerID2 = extA; + abort(); + extA = 0; + return 0; case 185: - return genLowcodePushPhysicalInt64(); + /* begin genLowcodePushPhysicalInt64 */ + registerID3 = extA; + abort(); + extA = 0; + return 0; case 186: - return genLowcodePushPhysicalPointer(); + /* begin genLowcodePushPhysicalPointer */ + registerID4 = extA; + abort(); + extA = 0; + return 0; default: return genLowcodeUnaryInlinePrimitive4(prim); @@ -36320,187 +32530,2417 @@ genLowcodeUnaryInlinePrimitive3(sqInt prim) static sqInt NoDbgRegParms genLowcodeUnaryInlinePrimitive4(sqInt prim) { + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction25; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction33; + AbstractInstruction *anInstruction34; + AbstractInstruction *anInstruction35; + AbstractInstruction *anInstruction36; + AbstractInstruction *anInstruction37; + AbstractInstruction *anInstruction38; + AbstractInstruction *anInstruction39; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt baseOffset; + sqInt baseOffset1; + sqInt baseOffset2; + sqInt baseOffset3; + sqInt baseOffset4; + sqInt baseOffset5; + sqInt baseOffset6; + AbstractInstruction * cont; + AbstractInstruction * cont1; + AbstractInstruction * cont2; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + sqInt doubleValue; + sqInt doubleValueValue; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump3; + sqInt first; + sqInt first1; + sqInt first10; + sqInt first11; + sqInt first12; + sqInt first13; + sqInt first14; + sqInt first15; + sqInt first16; + sqInt first17; + sqInt first18; + sqInt first2; + sqInt first4; + sqInt first5; + sqInt first6; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstHigh1; + sqInt firstHigh9; + sqInt firstHighValue; + sqInt firstHighValue1; + sqInt firstLow1; + sqInt firstLow9; + sqInt firstLowValue; + sqInt firstLowValue1; + sqInt firstValue; + sqInt firstValue1; + sqInt firstValue10; + sqInt firstValue11; + sqInt firstValue12; + sqInt firstValue13; + sqInt firstValue14; + sqInt firstValue15; + sqInt firstValue16; + sqInt firstValue17; + sqInt firstValue18; + sqInt firstValue2; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue6; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt floatValue; + sqInt floatValueValue; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frTop; + sqInt frTop1; + sqInt frTop2; + sqInt frTop3; + AbstractInstruction * isNegative; + AbstractInstruction * isNegative1; + AbstractInstruction * isNegative2; + sqInt memoryPointer; + sqInt memoryPointerValue; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt nativeValueIndex2; + sqInt pointer; + sqInt pointer1; + sqInt pointer2; + sqInt pointer3; + sqInt pointer4; + sqInt pointer5; + sqInt pointerValue; + sqInt pointerValue1; + sqInt pointerValue2; + sqInt pointerValue3; + sqInt pointerValue4; + sqInt pointerValue5; + sqInt pointerValue6; + sqInt pointerValue7; + sqInt pointerValueValue; + sqInt pointerValueValue1; + sqInt reg; + sqInt reg1; + sqInt reg10; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg16; + sqInt reg17; + sqInt reg18; + sqInt reg19; + sqInt reg2; + sqInt reg20; + sqInt reg21; + sqInt reg22; + sqInt reg23; + sqInt reg24; + sqInt reg25; + sqInt reg26; + sqInt reg28; + sqInt reg29; + sqInt reg3; + sqInt reg30; + sqInt reg31; + sqInt reg33; + sqInt reg4; + sqInt reg5; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerMask; + sqInt registerMask1; + sqInt registerMask2; + sqInt result; + sqInt result1; + sqInt result10; + sqInt result11; + sqInt result4; + sqInt result5; + sqInt result6; + sqInt result7; + sqInt result8; + sqInt result9; + sqInt resultHigh2; + sqInt resultHigh3; + sqInt resultHighValue; + sqInt resultHighValue1; + sqInt resultLow2; + sqInt resultLow3; + sqInt resultLowValue; + sqInt resultLowValue1; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue10; + sqInt resultValue11; + sqInt resultValue4; + sqInt resultValue5; + sqInt resultValue6; + sqInt resultValue7; + sqInt resultValue8; + sqInt resultValue9; + sqInt rNext; + sqInt rNext1; + sqInt rNext10; + sqInt rNext11; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext17; + sqInt rNext18; + sqInt rNext19; + sqInt rNext2; + sqInt rNext20; + sqInt rNext21; + sqInt rNext22; + sqInt rNext23; + sqInt rNext24; + sqInt rNext25; + sqInt rNext26; + sqInt rNext27; + sqInt rNext28; + sqInt rNext29; + sqInt rNext3; + sqInt rNext30; + sqInt rNext31; + sqInt rNext32; + sqInt rNext33; + sqInt rNext34; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNext2; + sqInt rNextNextNext; + sqInt rNextNextNext1; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult14; + sqInt rResult15; + sqInt rResult2; + sqInt rResult21; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop1; + sqInt rTop10; + sqInt rTop14; + sqInt rTop15; + sqInt rTop16; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop28; + sqInt rTop29; + sqInt rTop3; + sqInt rTop30; + sqInt rTop31; + sqInt rTop32; + sqInt rTop33; + sqInt rTop34; + sqInt rTop35; + sqInt rTop36; + sqInt rTop37; + sqInt rTop38; + sqInt rTop39; + sqInt rTop4; + sqInt rTop40; + sqInt rTop41; + sqInt rTop42; + sqInt rTop43; + sqInt rTop44; + sqInt rTop45; + sqInt rTop46; + sqInt rTop47; + sqInt rTop48; + sqInt rTop49; + sqInt rTop5; + sqInt rTop50; + sqInt rTop51; + sqInt rTop52; + sqInt rTop53; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt second; + sqInt second1; + sqInt second10; + sqInt second11; + sqInt second12; + sqInt second13; + sqInt second14; + sqInt second15; + sqInt second16; + sqInt second17; + sqInt second18; + sqInt second2; + sqInt second4; + sqInt second5; + sqInt second6; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondHigh1; + sqInt secondHigh9; + sqInt secondHighValue; + sqInt secondHighValue1; + sqInt secondLow1; + sqInt secondLow9; + sqInt secondLowValue; + sqInt secondLowValue1; + sqInt secondValue; + sqInt secondValue1; + sqInt secondValue10; + sqInt secondValue11; + sqInt secondValue12; + sqInt secondValue13; + sqInt secondValue14; + sqInt secondValue15; + sqInt secondValue16; + sqInt secondValue17; + sqInt secondValue18; + sqInt secondValue2; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue6; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt topRegistersMask; + sqInt topRegistersMask1; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask16; + sqInt topRegistersMask17; + sqInt topRegistersMask18; + sqInt topRegistersMask19; + sqInt topRegistersMask2; + sqInt topRegistersMask20; + sqInt topRegistersMask21; + sqInt topRegistersMask22; + sqInt topRegistersMask23; + sqInt topRegistersMask24; + sqInt topRegistersMask25; + sqInt topRegistersMask26; + sqInt topRegistersMask27; + sqInt topRegistersMask28; + sqInt topRegistersMask3; + sqInt topRegistersMask30; + sqInt topRegistersMask31; + sqInt topRegistersMask32; + sqInt topRegistersMask33; + sqInt topRegistersMask35; + sqInt topRegistersMask4; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value27; + sqInt value3; + sqInt value30; + sqInt value31; + sqInt value5; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueHigh1; + sqInt valueHigh10; + sqInt valueHigh2; + sqInt valueHigh3; + sqInt valueHigh4; + sqInt valueHigh5; + sqInt valueHigh8; + sqInt valueHigh9; + sqInt valueHighValue; + sqInt valueHighValue1; + sqInt valueHighValue2; + sqInt valueHighValue3; + sqInt valueHighValue4; + sqInt valueHighValue5; + sqInt valueHighValue6; + sqInt valueHighValue7; + sqInt valueLow1; + sqInt valueLow10; + sqInt valueLow2; + sqInt valueLow3; + sqInt valueLow4; + sqInt valueLow5; + sqInt valueLow8; + sqInt valueLow9; + sqInt valueLowValue; + sqInt valueLowValue1; + sqInt valueLowValue2; + sqInt valueLowValue3; + sqInt valueLowValue4; + sqInt valueLowValue5; + sqInt valueLowValue6; + sqInt valueLowValue7; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue27; + sqInt valueValue3; + sqInt valueValue30; + sqInt valueValue31; + sqInt valueValue5; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + switch (prim) { case 187: - return genLowcodePushSessionIdentifier(); + /* begin genLowcodePushSessionIdentifier */ + ssPushNativeConstantInt32(getThisSessionID()); + return 0; case 188: - return genLowcodePushZero32(); + /* begin genLowcodePushZero32 */ + ssPushNativeConstantInt32(0); + return 0; case 189: - return genLowcodePushZero64(); + /* begin genLowcodePushZero64 */ + ssPushNativeConstantInt64(0); + return 0; case 190: - return genLowcodePushZeroFloat32(); + /* begin genLowcodePushZeroFloat32 */ + ssPushNativeConstantFloat32(0.0); + return 0; case 191: - return genLowcodePushZeroFloat64(); + /* begin genLowcodePushZeroFloat64 */ + ssPushNativeConstantFloat64(0.0); + return 0; case 192: - return genLowcodeRem32(); + /* begin genLowcodeRem32 */ + topRegistersMask = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; + + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + gDivRRQuoRem(second, first, second, first); + ssPushNativeRegister(first); + return 0; case 193: - return genLowcodeRem64(); + /* begin genLowcodeRem64 */ + topRegistersMask1 = 0; + rTop1 = (rNext1 = NoReg); + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop1 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext1 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg1 = (rNext1 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask1 = 1U << reg1; + } + } + if (rTop1 == NoReg) { + rTop1 = allocateRegNotConflictingWith(topRegistersMask1); + } + if (rNext1 == NoReg) { + rNext1 = allocateRegNotConflictingWith(1U << rTop1); + } + assert(!(((rTop1 == NoReg) + || (rNext1 == NoReg)))); + rResult = allocateFloatRegNotConflictingWith((1U << rTop1) | (1U << rNext1)); + assert(!((rResult == NoReg))); + second1 = rTop1; + first1 = rNext1; + result = rResult; + + nativePopToReg(ssNativeTop(), second1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first1); + ssNativePop(1); + abort(); + return 0; case 194: - return genLowcodeRightShift32(); + /* begin genLowcodeRightShift32 */ + topRegistersMask2 = 0; + rTop2 = (rNext2 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext2 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext2 == NoReg) { + rNext2 = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext2 == NoReg)))); + shiftAmount = rTop2; + value = rNext2; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin LogicalShiftRightR:R: */ + genoperandoperand(LogicalShiftRightRR, shiftAmount, value); + ssPushNativeRegister(value); + return 0; case 195: - return genLowcodeRightShift64(); + /* begin genLowcodeRightShift64 */ + topRegistersMask3 = 0; + rTop3 = (rNext3 = NoReg); + rResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop3 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext3 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg3; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + rResult1 = allocateFloatRegNotConflictingWith((1U << rTop3) | (1U << rNext3)); + assert(!((rResult1 == NoReg))); + shiftAmount1 = rTop3; + value1 = rNext3; + result1 = rResult1; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + abort(); + return 0; case 196: - return genLowcodeSignExtend32From16(); + /* begin genLowcodeSignExtend32From16 */ + rTop4 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(0); + } + assert(!((rTop4 == NoReg))); + value2 = rTop4; + + nativePopToReg(ssNativeTop(), value2); + ssNativePop(1); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, value2, value2); + ssPushNativeRegister(value2); + return 0; case 197: - return genLowcodeSignExtend32From8(); + /* begin genLowcodeSignExtend32From8 */ + rTop5 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop5 == NoReg) { + rTop5 = allocateRegNotConflictingWith(0); + } + assert(!((rTop5 == NoReg))); + value3 = rTop5; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, value3, value3); + ssPushNativeRegister(value3); + return 0; case 198: - return genLowcodeSignExtend64From16(); + /* begin genLowcodeSignExtend64From16 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask4 = 0; + rTop6 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg4 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask4 = 1U << reg4; + } + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(topRegistersMask4); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop6); + } + assert(!(((rTop6 == NoReg) + || (rNext4 == NoReg)))); + valueLow1 = rTop6; + valueHigh1 = rNext4; + + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin SignExtend16R:R: */ + genoperandoperand(SignExtend16RR, valueLow1, valueLow1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(CmpCqR, 0, valueLow1); + /* begin JumpLess: */ + isNegative = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh1); + /* begin Jump: */ + cont = genoperand(Jump, ((sqInt)0)); + jmpTarget(isNegative, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh1))); + jmpTarget(cont, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegistersecondRegister(valueLow1, valueHigh1); + + return 0; case 199: - return genLowcodeSignExtend64From32(); + /* begin genLowcodeSignExtend64From32 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop7 = NoReg; + rResult3 = (rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop7 = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rTop7); + rResult2 = allocateRegNotConflictingWith((1U << rTop7) | (1U << rResult3)); + assert(!(((rTop7 == NoReg) + || ((rResult3 == NoReg) + || (rResult2 == NoReg))))); + value5 = rTop7; + resultLow2 = rResult3; + resultHigh2 = rResult2; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value5, resultLow2); + /* begin checkQuickConstant:forInstruction: */ + anInstruction2 = genoperandoperand(CmpCqR, 0, value5); + /* begin JumpLess: */ + isNegative1 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction3 = genoperandoperand(MoveCqR, 0, resultHigh2); + /* begin Jump: */ + cont1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(isNegative1, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, resultHigh2))); + jmpTarget(cont1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegistersecondRegister(resultLow2, resultHigh2); + + return 0; case 200: - return genLowcodeSignExtend64From8(); + /* begin genLowcodeSignExtend64From8 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger2: */ + topRegistersMask5 = 0; + rTop8 = (rNext5 = NoReg); + rResult4 = (rResult21 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop8 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext5 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0)); + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext5 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1U << reg5; + } + } + if (rTop8 == NoReg) { + rTop8 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext5 == NoReg) { + rNext5 = allocateRegNotConflictingWith(1U << rTop8); + } + assert(!(((rTop8 == NoReg) + || (rNext5 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop8) | (1U << rNext5)); + rResult21 = allocateFloatRegNotConflictingWith(((1U << rTop8) | (1U << rNext5)) | (1U << rResult4)); + assert(!(((rResult4 == NoReg) + || (rResult21 == NoReg)))); + valueLow2 = rTop8; + valueHigh2 = rNext5; + resultLow3 = rResult4; + resultHigh3 = rResult21; + + nativePopToRegsecondReg(ssNativeTop(), valueLow2, valueHigh2); + ssNativePop(1); + /* begin SignExtend8R:R: */ + genoperandoperand(SignExtend8RR, valueLow2, valueLow2); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(CmpCqR, 0, valueLow2); + /* begin JumpLess: */ + isNegative2 = genConditionalBranchoperand(JumpLess, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperand(MoveCqR, 0, valueHigh2); + /* begin Jump: */ + cont2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(isNegative2, checkQuickConstantforInstruction(-1, genoperandoperand(MoveCqR, -1, valueHigh2))); + jmpTarget(cont2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegistersecondRegister(valueLow2, valueHigh2); + + return 0; case 201: - return genLowcodeStoreFloat32ToMemory(); + /* begin genLowcodeStoreFloat32ToMemory */ + + /* Integer registers */ + frTop = (rTop9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(0); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeValue(1)); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + assert(!(((frTop == NoReg) + || (rTop9 == NoReg)))); + floatValue = frTop; + pointer = rTop9; + + nativePopToReg(ssNativeTop(), pointer); + ssNativePop(1); + nativePopToReg(ssNativeTop(), floatValue); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperandoperand(MoveRsM32r, floatValue, 0, pointer); + return 0; case 202: - return genLowcodeStoreFloat64ToMemory(); + /* begin genLowcodeStoreFloat64ToMemory */ + + /* Integer registers */ + frTop1 = (rTop10 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop10 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(0); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeValue(1)); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + assert(!(((frTop1 == NoReg) + || (rTop10 == NoReg)))); + doubleValue = frTop1; + pointer1 = rTop10; + + nativePopToReg(ssNativeTop(), pointer1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), doubleValue); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction7 = genoperandoperandoperand(MoveRdM64r, doubleValue, 0, pointer1); + return 0; case 203: - return genLowcodeStoreInt16ToMemory(); + /* begin genLowcodeStoreInt16ToMemory */ + topRegistersMask6 = 0; + rTop14 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop14 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg6; + } + } + if (rTop14 == NoReg) { + rTop14 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1U << rTop14); + } + assert(!(((rTop14 == NoReg) + || (rNext6 == NoReg)))); + pointer2 = rTop14; + value7 = rNext6; + + nativePopToReg(ssNativeTop(), pointer2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value7); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value7, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperandoperand(MoveRM16r, TempReg, 0, pointer2); + return 0; case 204: - return genLowcodeStoreInt32ToMemory(); + /* begin genLowcodeStoreInt32ToMemory */ + topRegistersMask7 = 0; + rTop15 = (rNext7 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop15 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext7 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1U << reg7; + } + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1U << rTop15); + } + assert(!(((rTop15 == NoReg) + || (rNext7 == NoReg)))); + pointer3 = rTop15; + value8 = rNext7; + + nativePopToReg(ssNativeTop(), pointer3); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperandoperand(MoveRM32r, value8, 0, pointer3); + return 0; case 205: - return genLowcodeStoreInt64ToMemory(); + /* begin genLowcodeStoreInt64ToMemory */ + /* begin allocateRegistersForLowcodeInteger3: */ + rTop45 = (rNext28 = (rNextNext1 = NoReg)); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop45 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext28 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext28 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext28 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + } + if (rTop45 == NoReg) { + registerMask1 = 0; + if (rNext28 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext28; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rTop45 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext28 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop45; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + rNext28 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop45) | (1U << rNext28); + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop45 == NoReg) + || ((rNext28 == NoReg) + || (rNextNext1 == NoReg))))); + pointer5 = rTop45; + valueLow8 = rNext28; + valueHigh8 = rNextNext1; + + nativePopToReg(ssNativeTop(), pointer5); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), valueLow8, valueHigh8); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperandoperand(MoveRM32r, valueLow8, 0, pointer5); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperandoperand(MoveRM32r, valueHigh8, 4, pointer5); + + return 0; case 206: - return genLowcodeStoreInt8ToMemory(); + /* begin genLowcodeStoreInt8ToMemory */ + topRegistersMask8 = 0; + rTop16 = (rNext8 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop16 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext8 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg8; + } + } + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext8 == NoReg) { + rNext8 = allocateRegNotConflictingWith(1U << rTop16); + } + assert(!(((rTop16 == NoReg) + || (rNext8 == NoReg)))); + pointer4 = rTop16; + value9 = rNext8; + + nativePopToReg(ssNativeTop(), pointer4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value9); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value9, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperandoperand(MoveRM8r, TempReg, 0, pointer4); + return 0; case 207: - return genLowcodeStoreLocalFloat32(); + /* begin genLowcodeStoreLocalFloat32 */ + baseOffset = extA; + /* begin allocateRegistersForLowcodeFloat: */ + topRegistersMask9 = 0; + frTop2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(topRegistersMask9); + } + assert(!((frTop2 == NoReg))); + value10 = frTop2; + + nativePopToReg(ssNativeTop(), value10); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperandoperand(MoveRsM32r, value10, 0, TempReg); + extA = 0; + return 0; case 208: - return genLowcodeStoreLocalFloat64(); + /* begin genLowcodeStoreLocalFloat64 */ + baseOffset1 = extA; + /* begin allocateRegistersForLowcodeFloat: */ + topRegistersMask10 = 0; + frTop3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + assert(!((frTop3 == NoReg))); + value11 = frTop3; + + nativePopToReg(ssNativeTop(), value11); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperandoperand(MoveRdM64r, value11, 0, TempReg); + extA = 0; + return 0; case 209: - return genLowcodeStoreLocalInt16(); + /* begin genLowcodeStoreLocalInt16 */ + baseOffset2 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop17 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop17 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop17 == NoReg) { + rTop17 = allocateRegNotConflictingWith(0); + } + assert(!((rTop17 == NoReg))); + value12 = rTop17; + + nativePopToReg(ssNativeTop(), value12); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value12, TempReg); + loadNativeLocalAddressto(baseOffset2, value12); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperandoperand(MoveRM16r, TempReg, 0, value12); + extA = 0; + return 0; case 210: - return genLowcodeStoreLocalInt32(); + /* begin genLowcodeStoreLocalInt32 */ + baseOffset3 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop18 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop18 == NoReg) { + rTop18 = allocateRegNotConflictingWith(0); + } + assert(!((rTop18 == NoReg))); + value13 = rTop18; + + nativePopToReg(ssNativeTop(), value13); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset3, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperandoperand(MoveRM32r, value13, 0, TempReg); + extA = 0; + return 0; case 211: - return genLowcodeStoreLocalInt64(); + /* begin genLowcodeStoreLocalInt64 */ + baseOffset6 = extA; + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask30 = 0; + rTop46 = (rNext29 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop46 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext29 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext29 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg28 = (rNext29 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask30 = 1U << reg28; + } + } + if (rTop46 == NoReg) { + rTop46 = allocateRegNotConflictingWith(topRegistersMask30); + } + if (rNext29 == NoReg) { + rNext29 = allocateRegNotConflictingWith(1U << rTop46); + } + assert(!(((rTop46 == NoReg) + || (rNext29 == NoReg)))); + valueLow9 = rTop46; + valueHigh9 = rNext29; + + nativePopToRegsecondReg(ssNativeTop(), valueLow9, valueHigh9); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset6, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperandoperand(MoveRM32r, valueLow9, 0, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperandoperand(MoveRM32r, valueHigh9, 4, TempReg); + + extA = 0; + return 0; case 212: - return genLowcodeStoreLocalInt8(); + /* begin genLowcodeStoreLocalInt8 */ + baseOffset4 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop19 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop19 == NoReg) { + rTop19 = allocateRegNotConflictingWith(0); + } + assert(!((rTop19 == NoReg))); + value14 = rTop19; + + nativePopToReg(ssNativeTop(), value14); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value14, TempReg); + loadNativeLocalAddressto(baseOffset4, value14); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperandoperand(MoveRM8r, TempReg, 0, value14); + extA = 0; + return 0; case 213: - return genLowcodeStoreLocalPointer(); + /* begin genLowcodeStoreLocalPointer */ + baseOffset5 = extA; + /* begin allocateRegistersForLowcodeInteger: */ + rTop20 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop20 == NoReg) { + rTop20 = allocateRegNotConflictingWith(0); + } + assert(!((rTop20 == NoReg))); + pointerValue5 = rTop20; + + nativePopToReg(ssNativeTop(), pointerValue5); + ssNativePop(1); + loadNativeLocalAddressto(baseOffset5, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperandoperand(MoveRMwr, pointerValue5, 0, TempReg); + extA = 0; + return 0; case 214: - return genLowcodeStorePointerToMemory(); + /* begin genLowcodeStorePointerToMemory */ + topRegistersMask11 = 0; + rTop21 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1U << reg9; + } + } + if (rTop21 == NoReg) { + rTop21 = allocateRegNotConflictingWith(topRegistersMask11); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext9 == NoReg)))); + memoryPointer = rTop21; + pointerValue6 = rNext9; + + nativePopToReg(ssNativeTop(), memoryPointer); + ssNativePop(1); + nativePopToReg(ssNativeTop(), pointerValue6); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperandoperand(MoveRMwr, pointerValue6, 0, memoryPointer); + return 0; case 215: - return genLowcodeSub32(); + /* begin genLowcodeSub32 */ + topRegistersMask12 = 0; + rTop22 = (rNext10 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop22 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext10 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1U << reg10; + } + } + if (rTop22 == NoReg) { + rTop22 = allocateRegNotConflictingWith(topRegistersMask12); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop22); + } + assert(!(((rTop22 == NoReg) + || (rNext10 == NoReg)))); + second2 = rTop22; + first2 = rNext10; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 216: - return genLowcodeSub64(); + /* begin genLowcodeSub64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop23 = (rNext11 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext11 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext11 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext11 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop23 == NoReg) { + registerMask = 0; + if (rNext11 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext11; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop23 = allocateRegNotConflictingWith(registerMask); + } + if (rNext11 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop23; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext11 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop23) | (1U << rNext11); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop23) | (1U << rNext11)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop23 == NoReg) + || ((rNext11 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow1 = rTop23; + secondHigh1 = rNext11; + firstLow1 = rNextNext; + firstHigh1 = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow1, secondHigh1); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow1, firstHigh1); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, secondLow1, firstLow1); + /* begin SubbR:R: */ + genoperandoperand(SubbRR, secondHigh1, firstHigh1); + ssPushNativeRegistersecondRegister(firstLow1, firstHigh1); + + return 0; case 217: - return genLowcodeTruncate32To16(); + /* begin genLowcodeTruncate32To16 */ + rTop24 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop24 == NoReg) { + rTop24 = allocateRegNotConflictingWith(0); + } + assert(!((rTop24 == NoReg))); + value15 = rTop24; + + nativePopToReg(ssNativeTop(), value15); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(AndCqR, 0xFFFF, value15); + ssPushNativeRegister(value15); + return 0; case 218: - return genLowcodeTruncate32To8(); + /* begin genLowcodeTruncate32To8 */ + rTop25 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop25 == NoReg) { + rTop25 = allocateRegNotConflictingWith(0); + } + assert(!((rTop25 == NoReg))); + value16 = rTop25; + + nativePopToReg(ssNativeTop(), value16); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction25 = genoperandoperand(AndCqR, 0xFF, value16); + ssPushNativeRegister(value16); + return 0; case 219: - return genLowcodeTruncate64To16(); + /* begin genLowcodeTruncate64To16 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask14 = 0; + rTop26 = (rNext13 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop26 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (rNext13 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1U << reg12; + } + } + if (rTop26 == NoReg) { + rTop26 = allocateRegNotConflictingWith(topRegistersMask14); + } + if (rNext13 == NoReg) { + rNext13 = allocateRegNotConflictingWith(1U << rTop26); + } + assert(!(((rTop26 == NoReg) + || (rNext13 == NoReg)))); + valueLow3 = rTop26; + valueHigh3 = rNext13; + + nativePopToRegsecondReg(ssNativeTop(), valueLow3, valueHigh3); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperand(AndCqR, 0xFFFF, valueLow3); + ssPushNativeRegister(valueLow3); + + return 0; case 220: - return genLowcodeTruncate64To32(); + /* begin genLowcodeTruncate64To32 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask15 = 0; + rTop27 = (rNext14 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (rNext14 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1U << reg13; + } + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(topRegistersMask15); + } + if (rNext14 == NoReg) { + rNext14 = allocateRegNotConflictingWith(1U << rTop27); + } + assert(!(((rTop27 == NoReg) + || (rNext14 == NoReg)))); + valueLow4 = rTop27; + valueHigh4 = rNext14; + + nativePopToRegsecondReg(ssNativeTop(), valueLow4, valueHigh4); + ssNativePop(1); + ssPushNativeRegister(valueLow4); + + return 0; case 221: - return genLowcodeTruncate64To8(); + /* begin genLowcodeTruncate64To8 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger: */ + topRegistersMask16 = 0; + rTop28 = (rNext15 = NoReg); + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop28 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext15 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext15 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (rNext15 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask16 = 1U << reg14; + } + } + if (rTop28 == NoReg) { + rTop28 = allocateRegNotConflictingWith(topRegistersMask16); + } + if (rNext15 == NoReg) { + rNext15 = allocateRegNotConflictingWith(1U << rTop28); + } + assert(!(((rTop28 == NoReg) + || (rNext15 == NoReg)))); + rResult5 = allocateFloatRegNotConflictingWith((1U << rTop28) | (1U << rNext15)); + assert(!((rResult5 == NoReg))); + valueLow5 = rTop28; + valueHigh5 = rNext15; + result4 = rResult5; + + nativePopToRegsecondReg(ssNativeTop(), valueLow5, valueHigh5); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperand(AndCqR, 0xFF, valueLow5); + ssPushNativeRegister(valueLow5); + + return 0; case 222: - return genLowcodeUdiv32(); + /* begin genLowcodeUdiv32 */ + topRegistersMask17 = 0; + rTop29 = (rNext16 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop29 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext16 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext16 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (rNext16 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask17 = 1U << reg15; + } + } + if (rTop29 == NoReg) { + rTop29 = allocateRegNotConflictingWith(topRegistersMask17); + } + if (rNext16 == NoReg) { + rNext16 = allocateRegNotConflictingWith(1U << rTop29); + } + assert(!(((rTop29 == NoReg) + || (rNext16 == NoReg)))); + second4 = rTop29; + first4 = rNext16; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + gDivRRQuoRem(second4, first4, first4, second4); + ssPushNativeRegister(first4); + return 0; case 223: - return genLowcodeUdiv64(); + /* begin genLowcodeUdiv64 */ + topRegistersMask18 = 0; + rTop30 = (rNext17 = NoReg); + rResult6 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop30 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext17 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext17 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg16 = (rNext17 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask18 = 1U << reg16; + } + } + if (rTop30 == NoReg) { + rTop30 = allocateRegNotConflictingWith(topRegistersMask18); + } + if (rNext17 == NoReg) { + rNext17 = allocateRegNotConflictingWith(1U << rTop30); + } + assert(!(((rTop30 == NoReg) + || (rNext17 == NoReg)))); + rResult6 = allocateFloatRegNotConflictingWith((1U << rTop30) | (1U << rNext17)); + assert(!((rResult6 == NoReg))); + second5 = rTop30; + first5 = rNext17; + result5 = rResult6; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + abort(); + return 0; case 224: - return genLowcodeUint32Great(); + /* begin genLowcodeUint32Great */ + topRegistersMask19 = 0; + rTop31 = (rNext18 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop31 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext18 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext18 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg17 = (rNext18 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask19 = 1U << reg17; + } + } + if (rTop31 == NoReg) { + rTop31 = allocateRegNotConflictingWith(topRegistersMask19); + } + if (rNext18 == NoReg) { + rNext18 = allocateRegNotConflictingWith(1U << rTop31); + } + assert(!(((rTop31 == NoReg) + || (rNext18 == NoReg)))); + second6 = rTop31; + first6 = rNext18; + + nativePopToReg(ssNativeTop(), second6); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first6); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second6, first6); + /* begin JumpBelowOrEqual: */ + falseJump = genConditionalBranchoperand(JumpBelowOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperand(MoveCqR, 1, first6); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperand(MoveCqR, 0, first6); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first6); + return 0; case 225: - return genLowcodeUint32GreatEqual(); + /* begin genLowcodeUint32GreatEqual */ + topRegistersMask20 = 0; + rTop32 = (rNext19 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop32 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext19 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext19 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg18 = (rNext19 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask20 = 1U << reg18; + } + } + if (rTop32 == NoReg) { + rTop32 = allocateRegNotConflictingWith(topRegistersMask20); + } + if (rNext19 == NoReg) { + rNext19 = allocateRegNotConflictingWith(1U << rTop32); + } + assert(!(((rTop32 == NoReg) + || (rNext19 == NoReg)))); + second7 = rTop32; + first7 = rNext19; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second7, first7); + /* begin JumpBelow: */ + falseJump1 = genConditionalBranchoperand(JumpBelow, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction33 = genoperandoperand(MoveCqR, 1, first7); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction34 = genoperandoperand(MoveCqR, 0, first7); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first7); + return 0; case 226: - return genLowcodeUint32Less(); + /* begin genLowcodeUint32Less */ + topRegistersMask21 = 0; + rTop33 = (rNext20 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop33 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext20 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext20 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg19 = (rNext20 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask21 = 1U << reg19; + } + } + if (rTop33 == NoReg) { + rTop33 = allocateRegNotConflictingWith(topRegistersMask21); + } + if (rNext20 == NoReg) { + rNext20 = allocateRegNotConflictingWith(1U << rTop33); + } + assert(!(((rTop33 == NoReg) + || (rNext20 == NoReg)))); + second8 = rTop33; + first8 = rNext20; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second8, first8); + /* begin JumpAboveOrEqual: */ + falseJump2 = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction35 = genoperandoperand(MoveCqR, 1, first8); + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction36 = genoperandoperand(MoveCqR, 0, first8); + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first8); + return 0; case 227: - return genLowcodeUint32LessEqual(); + /* begin genLowcodeUint32LessEqual */ + topRegistersMask22 = 0; + rTop34 = (rNext21 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop34 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext21 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext21 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg20 = (rNext21 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask22 = 1U << reg20; + } + } + if (rTop34 == NoReg) { + rTop34 = allocateRegNotConflictingWith(topRegistersMask22); + } + if (rNext21 == NoReg) { + rNext21 = allocateRegNotConflictingWith(1U << rTop34); + } + assert(!(((rTop34 == NoReg) + || (rNext21 == NoReg)))); + second9 = rTop34; + first9 = rNext21; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + /* begin CmpR:R: */ + genoperandoperand(CmpRR, second9, first9); + /* begin JumpAbove: */ + falseJump3 = genConditionalBranchoperand(JumpAbove, ((sqInt)0)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction37 = genoperandoperand(MoveCqR, 1, first9); + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction38 = genoperandoperand(MoveCqR, 0, first9); + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(first9); + return 0; case 228: - return genLowcodeUint32ToFloat32(); + /* begin genLowcodeUint32ToFloat32 */ + rTop35 = NoReg; + frResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop35 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop35 == NoReg) { + rTop35 = allocateRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop35 == NoReg) + || (frResult == NoReg)))); + value20 = rTop35; + result6 = frResult; + + nativePopToReg(ssNativeTop(), value20); + ssNativePop(1); + /* begin ConvertR:Rs: */ + genoperandoperand(ConvertRRs, value20, result6); + ssPushNativeRegisterSingleFloat(result6); + return 0; case 229: - return genLowcodeUint32ToFloat64(); + /* begin genLowcodeUint32ToFloat64 */ + rTop36 = NoReg; + frResult1 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop36 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop36 == NoReg) { + rTop36 = allocateRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop36 == NoReg) + || (frResult1 == NoReg)))); + value21 = rTop36; + result7 = frResult1; + + nativePopToReg(ssNativeTop(), value21); + ssNativePop(1); + /* begin ConvertR:Rd: */ + genoperandoperand(ConvertRRd, value21, result7); + ssPushNativeRegisterDoubleFloat(result7); + return 0; case 230: - return genLowcodeUint64Great(); + /* begin genLowcodeUint64Great */ + topRegistersMask23 = 0; + rTop37 = (rNext22 = NoReg); + rResult7 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop37 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext22 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext22 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg21 = (rNext22 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask23 = 1U << reg21; + } + } + if (rTop37 == NoReg) { + rTop37 = allocateRegNotConflictingWith(topRegistersMask23); + } + if (rNext22 == NoReg) { + rNext22 = allocateRegNotConflictingWith(1U << rTop37); + } + assert(!(((rTop37 == NoReg) + || (rNext22 == NoReg)))); + rResult7 = allocateFloatRegNotConflictingWith((1U << rTop37) | (1U << rNext22)); + assert(!((rResult7 == NoReg))); + second10 = rTop37; + first10 = rNext22; + value22 = rResult7; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + abort(); + return 0; case 231: - return genLowcodeUint64GreatEqual(); + /* begin genLowcodeUint64GreatEqual */ + topRegistersMask24 = 0; + rTop38 = (rNext23 = NoReg); + rResult8 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop38 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext23 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext23 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg22 = (rNext23 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask24 = 1U << reg22; + } + } + if (rTop38 == NoReg) { + rTop38 = allocateRegNotConflictingWith(topRegistersMask24); + } + if (rNext23 == NoReg) { + rNext23 = allocateRegNotConflictingWith(1U << rTop38); + } + assert(!(((rTop38 == NoReg) + || (rNext23 == NoReg)))); + rResult8 = allocateFloatRegNotConflictingWith((1U << rTop38) | (1U << rNext23)); + assert(!((rResult8 == NoReg))); + second11 = rTop38; + first11 = rNext23; + value23 = rResult8; + + nativePopToReg(ssNativeTop(), second11); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first11); + ssNativePop(1); + abort(); + return 0; case 232: - return genLowcodeUint64Less(); + /* begin genLowcodeUint64Less */ + topRegistersMask25 = 0; + rTop39 = (rNext24 = NoReg); + rResult9 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop39 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext24 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext24 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg23 = (rNext24 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask25 = 1U << reg23; + } + } + if (rTop39 == NoReg) { + rTop39 = allocateRegNotConflictingWith(topRegistersMask25); + } + if (rNext24 == NoReg) { + rNext24 = allocateRegNotConflictingWith(1U << rTop39); + } + assert(!(((rTop39 == NoReg) + || (rNext24 == NoReg)))); + rResult9 = allocateFloatRegNotConflictingWith((1U << rTop39) | (1U << rNext24)); + assert(!((rResult9 == NoReg))); + second12 = rTop39; + first12 = rNext24; + value24 = rResult9; + + nativePopToReg(ssNativeTop(), second12); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first12); + ssNativePop(1); + abort(); + return 0; case 233: - return genLowcodeUint64LessEqual(); + /* begin genLowcodeUint64LessEqual */ + topRegistersMask26 = 0; + rTop40 = (rNext25 = NoReg); + rResult10 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop40 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext25 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext25 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg24 = (rNext25 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask26 = 1U << reg24; + } + } + if (rTop40 == NoReg) { + rTop40 = allocateRegNotConflictingWith(topRegistersMask26); + } + if (rNext25 == NoReg) { + rNext25 = allocateRegNotConflictingWith(1U << rTop40); + } + assert(!(((rTop40 == NoReg) + || (rNext25 == NoReg)))); + rResult10 = allocateFloatRegNotConflictingWith((1U << rTop40) | (1U << rNext25)); + assert(!((rResult10 == NoReg))); + second13 = rTop40; + first13 = rNext25; + value25 = rResult10; + + nativePopToReg(ssNativeTop(), second13); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first13); + ssNativePop(1); + abort(); + return 0; case 234: - return genLowcodeUint64ToFloat32(); + /* begin genLowcodeUint64ToFloat32 */ + rTop41 = NoReg; + frResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop41 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop41 == NoReg) { + rTop41 = allocateRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop41 == NoReg) + || (frResult2 == NoReg)))); + value26 = rTop41; + result8 = frResult2; + + nativePopToReg(ssNativeTop(), value26); + ssNativePop(1); + abort(); + return 0; case 235: - return genLowcodeUint64ToFloat64(); + /* begin genLowcodeUint64ToFloat64 */ + rTop42 = NoReg; + frResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop42 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop42 == NoReg) { + rTop42 = allocateRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(0); + assert(!(((rTop42 == NoReg) + || (frResult3 == NoReg)))); + value27 = rTop42; + result9 = frResult3; + + nativePopToReg(ssNativeTop(), value27); + ssNativePop(1); + abort(); + return 0; case 236: - return genLowcodeUmul32(); + /* begin genLowcodeUmul32 */ + topRegistersMask27 = 0; + rTop43 = (rNext26 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop43 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext26 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext26 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg25 = (rNext26 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask27 = 1U << reg25; + } + } + if (rTop43 == NoReg) { + rTop43 = allocateRegNotConflictingWith(topRegistersMask27); + } + if (rNext26 == NoReg) { + rNext26 = allocateRegNotConflictingWith(1U << rTop43); + } + assert(!(((rTop43 == NoReg) + || (rNext26 == NoReg)))); + second14 = rTop43; + first14 = rNext26; + + nativePopToReg(ssNativeTop(), second14); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first14); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, second14, first14); + ssPushNativeRegister(first14); + return 0; case 237: - return genLowcodeUmul64(); + /* begin genLowcodeUmul64 */ + topRegistersMask28 = 0; + rTop44 = (rNext27 = NoReg); + rResult14 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop44 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext27 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext27 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg26 = (rNext27 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask28 = 1U << reg26; + } + } + if (rTop44 == NoReg) { + rTop44 = allocateRegNotConflictingWith(topRegistersMask28); + } + if (rNext27 == NoReg) { + rNext27 = allocateRegNotConflictingWith(1U << rTop44); + } + assert(!(((rTop44 == NoReg) + || (rNext27 == NoReg)))); + rResult14 = allocateFloatRegNotConflictingWith((1U << rTop44) | (1U << rNext27)); + assert(!((rResult14 == NoReg))); + second15 = rTop44; + first15 = rNext27; + result10 = rResult14; + + nativePopToReg(ssNativeTop(), second15); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first15); + ssNativePop(1); + abort(); + return 0; case 238: return 0; case 239: - return genLowcodeUnlockVM(); + /* begin genLowcodeUnlockVM */ + abort(); + return 0; case 240: - return genLowcodeUrem32(); + /* begin genLowcodeUrem32 */ + topRegistersMask31 = 0; + rTop47 = (rNext30 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop47 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext30 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext30 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg29 = (rNext30 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask31 = 1U << reg29; + } + } + if (rTop47 == NoReg) { + rTop47 = allocateRegNotConflictingWith(topRegistersMask31); + } + if (rNext30 == NoReg) { + rNext30 = allocateRegNotConflictingWith(1U << rTop47); + } + assert(!(((rTop47 == NoReg) + || (rNext30 == NoReg)))); + second16 = rTop47; + first16 = rNext30; + + nativePopToReg(ssNativeTop(), second16); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first16); + ssNativePop(1); + gDivRRQuoRem(second16, first16, second16, first16); + ssPushNativeRegister(first16); + return 0; case 241: - return genLowcodeUrem64(); + /* begin genLowcodeUrem64 */ + topRegistersMask32 = 0; + rTop48 = (rNext31 = NoReg); + rResult15 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop48 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext31 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext31 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg30 = (rNext31 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask32 = 1U << reg30; + } + } + if (rTop48 == NoReg) { + rTop48 = allocateRegNotConflictingWith(topRegistersMask32); + } + if (rNext31 == NoReg) { + rNext31 = allocateRegNotConflictingWith(1U << rTop48); + } + assert(!(((rTop48 == NoReg) + || (rNext31 == NoReg)))); + rResult15 = allocateFloatRegNotConflictingWith((1U << rTop48) | (1U << rNext31)); + assert(!((rResult15 == NoReg))); + second17 = rTop48; + first17 = rNext31; + result11 = rResult15; + + nativePopToReg(ssNativeTop(), second17); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first17); + ssNativePop(1); + abort(); + return 0; case 242: - return genLowcodeXor32(); + /* begin genLowcodeXor32 */ + topRegistersMask33 = 0; + rTop49 = (rNext32 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop49 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext32 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext32 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg31 = (rNext32 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask33 = 1U << reg31; + } + } + if (rTop49 == NoReg) { + rTop49 = allocateRegNotConflictingWith(topRegistersMask33); + } + if (rNext32 == NoReg) { + rNext32 = allocateRegNotConflictingWith(1U << rTop49); + } + assert(!(((rTop49 == NoReg) + || (rNext32 == NoReg)))); + second18 = rTop49; + first18 = rNext32; + + nativePopToReg(ssNativeTop(), second18); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first18); + ssNativePop(1); + /* begin XorR:R: */ + genoperandoperand(XorRR, second18, first18); + ssPushNativeRegister(first18); + return 0; case 243: - return genLowcodeXor64(); + /* begin genLowcodeXor64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop50 = (rNext33 = (rNextNext2 = (rNextNextNext1 = NoReg))); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop50 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext33 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext33 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext33 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + nativeValueIndex2 += 1; + } + } + if (rTop50 == NoReg) { + registerMask2 = 0; + if (rNext33 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rNext33; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + if (rNextNextNext1 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNextNext1); + } + rTop50 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext33 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rTop50; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + if (rNextNextNext1 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNextNext1); + } + rNext33 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1U << rTop50) | (1U << rNext33); + if (rNextNextNext1 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNextNext1); + } + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNextNext1 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask2 = ((1U << rTop50) | (1U << rNext33)) | (1U << rNextNext2); + rNextNextNext1 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop50 == NoReg) + || ((rNext33 == NoReg) + || ((rNextNext2 == NoReg) + || (rNextNextNext1 == NoReg)))))); + secondLow9 = rTop50; + secondHigh9 = rNext33; + firstLow9 = rNextNext2; + firstHigh9 = rNextNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), secondLow9, secondHigh9); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow9, firstHigh9); + ssNativePop(1); + /* begin XorR:R: */ + genoperandoperand(XorRR, secondLow9, firstLow9); + /* begin XorR:R: */ + genoperandoperand(XorRR, secondHigh9, firstHigh9); + ssPushNativeRegistersecondRegister(firstLow9, firstHigh9); + + return 0; case 244: - return genLowcodeZeroExtend32From16(); + /* begin genLowcodeZeroExtend32From16 */ + rTop51 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop51 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop51 == NoReg) { + rTop51 = allocateRegNotConflictingWith(0); + } + assert(!((rTop51 == NoReg))); + value30 = rTop51; + + nativePopToReg(ssNativeTop(), value30); + ssNativePop(1); + /* begin ZeroExtend16R:R: */ + genoperandoperand(ZeroExtend16RR, value30, value30); + ssPushNativeRegister(value30); + return 0; case 245: - return genLowcodeZeroExtend32From8(); + /* begin genLowcodeZeroExtend32From8 */ + rTop52 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop52 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop52 == NoReg) { + rTop52 = allocateRegNotConflictingWith(0); + } + assert(!((rTop52 == NoReg))); + value31 = rTop52; + + nativePopToReg(ssNativeTop(), value31); + ssNativePop(1); + /* begin ZeroExtend8R:R: */ + genoperandoperand(ZeroExtend8RR, value31, value31); + ssPushNativeRegister(value31); + return 0; case 246: - return genLowcodeZeroExtend64From16(); + /* begin genLowcodeZeroExtend64From16 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask35 = 0; + rTop53 = (rNext34 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop53 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext34 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext34 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg33 = (rNext34 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask35 = 1U << reg33; + } + } + if (rTop53 == NoReg) { + rTop53 = allocateRegNotConflictingWith(topRegistersMask35); + } + if (rNext34 == NoReg) { + rNext34 = allocateRegNotConflictingWith(1U << rTop53); + } + assert(!(((rTop53 == NoReg) + || (rNext34 == NoReg)))); + valueLow10 = rTop53; + valueHigh10 = rNext34; + + nativePopToRegsecondReg(ssNativeTop(), valueLow10, valueHigh10); + ssNativePop(1); + /* begin ZeroExtend16R:R: */ + genoperandoperand(ZeroExtend16RR, valueLow10, valueLow10); + /* begin checkQuickConstant:forInstruction: */ + anInstruction39 = genoperandoperand(MoveCqR, 0, valueHigh10); + ssPushNativeRegistersecondRegister(valueLow10, valueHigh10); + + return 0; default: return genLowcodeUnaryInlinePrimitive5(prim); @@ -36512,213 +34952,2632 @@ genLowcodeUnaryInlinePrimitive4(sqInt prim) /* Lowcode instruction generator dispatch */ - /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive5: */ -static sqInt NoDbgRegParms -genLowcodeUnaryInlinePrimitive5(sqInt prim) -{ + /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive5: */ +static sqInt NoDbgRegParms +genLowcodeUnaryInlinePrimitive5(sqInt prim) +{ + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + sqInt reg; + sqInt resultHigh; + sqInt resultHighValue; + sqInt resultLow; + sqInt resultLowValue; + sqInt rNext; + sqInt rResult; + sqInt rResult2; + sqInt rTop; + sqInt rTop2; + sqInt topRegistersMask; + sqInt value; + sqInt valueHigh; + sqInt valueHighValue; + sqInt valueLow; + sqInt valueLowValue; + sqInt valueValue; + + + switch (prim) { + case 247: + /* begin genLowcodeZeroExtend64From32 */ + /* begin allocateRegistersForLowcodeIntegerResultInteger2: */ + rTop = NoReg; + rResult = (rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop = nativeRegisterOrNone(ssNativeTop())) + : 0)); + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(0); + } + rResult = allocateRegNotConflictingWith(1U << rTop); + rResult2 = allocateRegNotConflictingWith((1U << rTop) | (1U << rResult)); + assert(!(((rTop == NoReg) + || ((rResult == NoReg) + || (rResult2 == NoReg))))); + value = rTop; + resultLow = rResult; + resultHigh = rResult2; + + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value, resultLow); + /* begin checkQuickConstant:forInstruction: */ + anInstruction = genoperandoperand(MoveCqR, 0, resultHigh); + ssPushNativeRegistersecondRegister(resultLow, resultHigh); + + return 0; + + case 0xF8: + /* begin genLowcodeZeroExtend64From8 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask = 0; + rTop2 = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop2 == NoReg) { + rTop2 = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop2); + } + assert(!(((rTop2 == NoReg) + || (rNext == NoReg)))); + valueLow = rTop2; + valueHigh = rNext; + + nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); + ssNativePop(1); + /* begin ZeroExtend8R:R: */ + genoperandoperand(ZeroExtend8RR, valueLow, valueLow); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(MoveCqR, 0, valueHigh); + ssPushNativeRegistersecondRegister(valueLow, valueHigh); + + return 0; + + default: + return EncounteredUnknownBytecode; + + } + return 0; +} + + +/* Lowcode instruction generator dispatch */ + + /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive: */ +static sqInt NoDbgRegParms +genLowcodeUnaryInlinePrimitive(sqInt prim) +{ + AbstractInstruction *abstractInstruction; + sqInt address; + sqInt address1; + sqInt alignment; + AbstractInstruction *anInstruction; + AbstractInstruction *anInstruction1; + AbstractInstruction *anInstruction10; + AbstractInstruction *anInstruction11; + AbstractInstruction *anInstruction12; + AbstractInstruction *anInstruction13; + AbstractInstruction *anInstruction14; + AbstractInstruction *anInstruction15; + AbstractInstruction *anInstruction16; + AbstractInstruction *anInstruction17; + AbstractInstruction *anInstruction18; + AbstractInstruction *anInstruction19; + AbstractInstruction *anInstruction2; + AbstractInstruction *anInstruction20; + AbstractInstruction *anInstruction21; + AbstractInstruction *anInstruction22; + AbstractInstruction *anInstruction23; + AbstractInstruction *anInstruction24; + AbstractInstruction *anInstruction25; + AbstractInstruction *anInstruction26; + AbstractInstruction *anInstruction27; + AbstractInstruction *anInstruction28; + AbstractInstruction *anInstruction29; + AbstractInstruction *anInstruction3; + AbstractInstruction *anInstruction30; + AbstractInstruction *anInstruction31; + AbstractInstruction *anInstruction32; + AbstractInstruction *anInstruction4; + AbstractInstruction *anInstruction5; + AbstractInstruction *anInstruction6; + AbstractInstruction *anInstruction7; + AbstractInstruction *anInstruction8; + AbstractInstruction *anInstruction9; + sqInt base; + sqInt base1; + sqInt baseValue; + sqInt baseValue1; + sqInt check; + sqInt checkValue; + AbstractInstruction * contJump; + AbstractInstruction * contJump1; + AbstractInstruction * contJump10; + AbstractInstruction * contJump11; + AbstractInstruction * contJump2; + AbstractInstruction * contJump3; + AbstractInstruction * contJump4; + AbstractInstruction * contJump5; + AbstractInstruction * contJump6; + AbstractInstruction * contJump7; + AbstractInstruction * contJump8; + AbstractInstruction * contJump9; + sqInt dup2; + sqInt dup21; + sqInt dup22; + sqInt dup24; + sqInt dup2High; + sqInt dup2HighValue; + sqInt dup2Low; + sqInt dup2LowValue; + sqInt dup2Value; + sqInt dup2Value1; + sqInt dup2Value2; + sqInt dup2Value4; + sqInt expectedSession; + AbstractInstruction * falseJump; + AbstractInstruction * falseJump1; + AbstractInstruction * falseJump10; + AbstractInstruction * falseJump11; + AbstractInstruction * falseJump2; + AbstractInstruction * falseJump3; + AbstractInstruction * falseJump4; + AbstractInstruction * falseJump5; + AbstractInstruction * falseJump6; + AbstractInstruction * falseJump7; + AbstractInstruction * falseJump8; + AbstractInstruction * falseJump9; + sqInt first; + sqInt first10; + sqInt first11; + sqInt first12; + sqInt first13; + sqInt first14; + sqInt first15; + sqInt first16; + sqInt first17; + sqInt first18; + sqInt first19; + sqInt first2; + sqInt first20; + sqInt first21; + sqInt first22; + sqInt first23; + sqInt first24; + sqInt first25; + sqInt first4; + sqInt first5; + sqInt first6; + sqInt first7; + sqInt first8; + sqInt first9; + sqInt firstHigh; + sqInt firstHigh1; + sqInt firstHighValue; + sqInt firstHighValue1; + sqInt firstLow; + sqInt firstLow1; + sqInt firstLowValue; + sqInt firstLowValue1; + sqInt firstValue; + sqInt firstValue10; + sqInt firstValue11; + sqInt firstValue12; + sqInt firstValue13; + sqInt firstValue14; + sqInt firstValue15; + sqInt firstValue16; + sqInt firstValue17; + sqInt firstValue18; + sqInt firstValue19; + sqInt firstValue2; + sqInt firstValue20; + sqInt firstValue21; + sqInt firstValue22; + sqInt firstValue23; + sqInt firstValue24; + sqInt firstValue25; + sqInt firstValue4; + sqInt firstValue5; + sqInt firstValue6; + sqInt firstValue7; + sqInt firstValue8; + sqInt firstValue9; + sqInt frNext; + sqInt frNext1; + sqInt frNext10; + sqInt frNext11; + sqInt frNext2; + sqInt frNext3; + sqInt frNext4; + sqInt frNext5; + sqInt frNext6; + sqInt frNext7; + sqInt frNext8; + sqInt frNext9; + sqInt frResult; + sqInt frResult1; + sqInt frResult2; + sqInt frResult3; + sqInt frTop; + sqInt frTop1; + sqInt frTop10; + sqInt frTop11; + sqInt frTop12; + sqInt frTop13; + sqInt frTop14; + sqInt frTop15; + sqInt frTop16; + sqInt frTop17; + sqInt frTop18; + sqInt frTop19; + sqInt frTop2; + sqInt frTop20; + sqInt frTop21; + sqInt frTop22; + sqInt frTop3; + sqInt frTop4; + sqInt frTop5; + sqInt frTop6; + sqInt frTop7; + sqInt frTop8; + sqInt frTop9; + sqInt function; + sqInt index; + sqInt index1; + sqInt indexValue; + sqInt indexValue1; + sqInt literal; + sqInt nativeValueIndex; + sqInt nativeValueIndex1; + sqInt nativeValueIndex2; + sqInt nativeValueIndex3; + sqInt nativeValueIndex4; + sqInt newValue; + sqInt newValueValue; + sqInt offset; + sqInt offset1; + sqInt offsetValue; + sqInt offsetValue1; + sqInt oldValue; + sqInt oldValueValue; + sqInt pointerValue; + sqInt pointerValueValue; + sqInt reg; + sqInt reg10; + sqInt reg11; + sqInt reg12; + sqInt reg13; + sqInt reg14; + sqInt reg15; + sqInt reg16; + sqInt reg17; + sqInt reg18; + sqInt reg19; + sqInt reg2; + sqInt reg20; + sqInt reg21; + sqInt reg22; + sqInt reg23; + sqInt reg24; + sqInt reg25; + sqInt reg26; + sqInt reg27; + sqInt reg28; + sqInt reg29; + sqInt reg3; + sqInt reg5; + sqInt reg6; + sqInt reg7; + sqInt reg8; + sqInt reg9; + sqInt registerID; + sqInt registerMask; + sqInt registerMask1; + sqInt registerMask2; + sqInt registerMask3; + sqInt registerMask4; + sqInt result; + sqInt result1; + sqInt result2; + sqInt result3; + sqInt result4; + sqInt result5; + sqInt result6; + sqInt result7; + sqInt result8; + sqInt resultValue; + sqInt resultValue1; + sqInt resultValue2; + sqInt resultValue3; + sqInt resultValue4; + sqInt resultValue5; + sqInt resultValue6; + sqInt resultValue7; + sqInt resultValue8; + sqInt rNext; + sqInt rNext10; + sqInt rNext12; + sqInt rNext13; + sqInt rNext14; + sqInt rNext15; + sqInt rNext16; + sqInt rNext17; + sqInt rNext18; + sqInt rNext19; + sqInt rNext2; + sqInt rNext20; + sqInt rNext21; + sqInt rNext22; + sqInt rNext3; + sqInt rNext4; + sqInt rNext5; + sqInt rNext6; + sqInt rNext7; + sqInt rNext8; + sqInt rNext9; + sqInt rNextNext; + sqInt rNextNext1; + sqInt rNextNext2; + sqInt rNextNext3; + sqInt rNextNext4; + sqInt rNextNextNext; + sqInt rNextNextNext1; + sqInt rNextNextNext2; + sqInt rNextNextNext3; + sqInt rResult; + sqInt rResult1; + sqInt rResult10; + sqInt rResult12; + sqInt rResult13; + sqInt rResult14; + sqInt rResult15; + sqInt rResult16; + sqInt rResult17; + sqInt rResult18; + sqInt rResult19; + sqInt rResult2; + sqInt rResult20; + sqInt rResult21; + sqInt rResult22; + sqInt rResult23; + sqInt rResult24; + sqInt rResult3; + sqInt rResult4; + sqInt rResult5; + sqInt rResult6; + sqInt rResult7; + sqInt rResult8; + sqInt rResult9; + sqInt rTop; + sqInt rTop10; + sqInt rTop13; + sqInt rTop15; + sqInt rTop16; + sqInt rTop17; + sqInt rTop18; + sqInt rTop19; + sqInt rTop2; + sqInt rTop20; + sqInt rTop21; + sqInt rTop22; + sqInt rTop23; + sqInt rTop24; + sqInt rTop25; + sqInt rTop26; + sqInt rTop27; + sqInt rTop3; + sqInt rTop4; + sqInt rTop5; + sqInt rTop6; + sqInt rTop7; + sqInt rTop8; + sqInt rTop9; + sqInt scale; + sqInt scale1; + sqInt scaleValue; + sqInt scaleValue1; + sqInt second; + sqInt second10; + sqInt second11; + sqInt second12; + sqInt second13; + sqInt second14; + sqInt second15; + sqInt second16; + sqInt second17; + sqInt second18; + sqInt second19; + sqInt second2; + sqInt second20; + sqInt second21; + sqInt second22; + sqInt second23; + sqInt second24; + sqInt second25; + sqInt second4; + sqInt second5; + sqInt second6; + sqInt second7; + sqInt second8; + sqInt second9; + sqInt secondHigh; + sqInt secondHigh1; + sqInt secondHighValue; + sqInt secondHighValue1; + sqInt secondLow; + sqInt secondLow1; + sqInt secondLowValue; + sqInt secondLowValue1; + sqInt secondValue; + sqInt secondValue10; + sqInt secondValue11; + sqInt secondValue12; + sqInt secondValue13; + sqInt secondValue14; + sqInt secondValue15; + sqInt secondValue16; + sqInt secondValue17; + sqInt secondValue18; + sqInt secondValue19; + sqInt secondValue2; + sqInt secondValue20; + sqInt secondValue21; + sqInt secondValue22; + sqInt secondValue23; + sqInt secondValue24; + sqInt secondValue25; + sqInt secondValue4; + sqInt secondValue5; + sqInt secondValue6; + sqInt secondValue7; + sqInt secondValue8; + sqInt secondValue9; + sqInt shiftAmount; + sqInt shiftAmount1; + sqInt shiftAmountValue; + sqInt shiftAmountValue1; + sqInt singleFloatValue; + sqInt singleFloatValueValue; + sqInt size1; + sqInt sizeHigh; + sqInt sizeHighValue; + sqInt sizeLow; + sqInt sizeLowValue; + sqInt sizeValue1; + sqInt topRegistersMask; + sqInt topRegistersMask10; + sqInt topRegistersMask11; + sqInt topRegistersMask12; + sqInt topRegistersMask13; + sqInt topRegistersMask14; + sqInt topRegistersMask15; + sqInt topRegistersMask16; + sqInt topRegistersMask17; + sqInt topRegistersMask18; + sqInt topRegistersMask19; + sqInt topRegistersMask2; + sqInt topRegistersMask20; + sqInt topRegistersMask21; + sqInt topRegistersMask22; + sqInt topRegistersMask23; + sqInt topRegistersMask24; + sqInt topRegistersMask25; + sqInt topRegistersMask26; + sqInt topRegistersMask27; + sqInt topRegistersMask28; + sqInt topRegistersMask29; + sqInt topRegistersMask3; + sqInt topRegistersMask30; + sqInt topRegistersMask31; + sqInt topRegistersMask32; + sqInt topRegistersMask5; + sqInt topRegistersMask6; + sqInt topRegistersMask7; + sqInt topRegistersMask8; + sqInt topRegistersMask9; + sqInt value; + sqInt value1; + sqInt value10; + sqInt value11; + sqInt value12; + sqInt value13; + sqInt value14; + sqInt value15; + sqInt value16; + sqInt value17; + sqInt value18; + sqInt value19; + sqInt value2; + sqInt value20; + sqInt value21; + sqInt value22; + sqInt value23; + sqInt value24; + sqInt value25; + sqInt value26; + sqInt value3; + sqInt value4; + sqInt value5; + sqInt value7; + sqInt value8; + sqInt value9; + sqInt valueHigh1; + sqInt valueHighValue; + sqInt valueLow1; + sqInt valueLowValue; + sqInt valueValue; + sqInt valueValue1; + sqInt valueValue10; + sqInt valueValue11; + sqInt valueValue12; + sqInt valueValue13; + sqInt valueValue14; + sqInt valueValue15; + sqInt valueValue16; + sqInt valueValue17; + sqInt valueValue18; + sqInt valueValue19; + sqInt valueValue2; + sqInt valueValue20; + sqInt valueValue21; + sqInt valueValue22; + sqInt valueValue23; + sqInt valueValue24; + sqInt valueValue25; + sqInt valueValue26; + sqInt valueValue3; + sqInt valueValue4; + sqInt valueValue5; + sqInt valueValue7; + sqInt valueValue8; + sqInt valueValue9; + switch (prim) { - case 247: - return genLowcodeZeroExtend64From32(); - - case 0xF8: - return genLowcodeZeroExtend64From8(); + case 0: + /* begin genLowcodeAdd32 */ + topRegistersMask = 0; + rTop = (rNext = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg = (rNext = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask = 1U << reg; + } + } + if (rTop == NoReg) { + rTop = allocateRegNotConflictingWith(topRegistersMask); + } + if (rNext == NoReg) { + rNext = allocateRegNotConflictingWith(1U << rTop); + } + assert(!(((rTop == NoReg) + || (rNext == NoReg)))); + second = rTop; + first = rNext; - default: - return EncounteredUnknownBytecode; + nativePopToReg(ssNativeTop(), second); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, second, first); + ssPushNativeRegister(first); + return 0; - } - return 0; -} + case 1: + /* begin genLowcodeAdd64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop2 = (rNext2 = (rNextNext = (rNextNextNext = NoReg))); + nativeValueIndex = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop2 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext2 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex)); + } + nativeValueIndex += 1; + } + } + if (rNextNextNext == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex))) != NoReg) { + rNextNextNext = nativeRegisterOrNone(ssNativeValue(nativeValueIndex)); + nativeValueIndex += 1; + } + } + if (rTop2 == NoReg) { + registerMask = 0; + if (rNext2 != NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rNext2; + } + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rTop2 = allocateRegNotConflictingWith(registerMask); + } + if (rNext2 == NoReg) { + /* begin registerMaskFor: */ + registerMask = 1U << rTop2; + if (rNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNext); + } + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNext2 = allocateRegNotConflictingWith(registerMask); + } + if (rNextNext == NoReg) { + /* begin registerMaskFor:and: */ + registerMask = (1U << rTop2) | (1U << rNext2); + if (rNextNextNext != NoReg) { + registerMask = registerMask | (1U << rNextNextNext); + } + rNextNext = allocateRegNotConflictingWith(registerMask); + } + if (rNextNextNext == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask = ((1U << rTop2) | (1U << rNext2)) | (1U << rNextNext); + rNextNextNext = allocateRegNotConflictingWith(registerMask); + } + assert(!(((rTop2 == NoReg) + || ((rNext2 == NoReg) + || ((rNextNext == NoReg) + || (rNextNextNext == NoReg)))))); + secondLow = rTop2; + secondHigh = rNext2; + firstLow = rNextNext; + firstHigh = rNextNextNext; + + nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); + ssNativePop(1); + /* begin AddR:R: */ + genoperandoperand(AddRR, secondLow, firstLow); + /* begin AddcR:R: */ + genoperandoperand(AddcRR, secondHigh, firstHigh); + ssPushNativeRegistersecondRegister(firstLow, firstHigh); + return 0; -/* Lowcode instruction generator dispatch */ + case 2: + /* begin genLowcodeAlloca32 */ + rTop27 = NoReg; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop27 = nativeRegisterOrNone(ssNativeTop()); + } + if (rTop27 == NoReg) { + rTop27 = allocateRegNotConflictingWith(0); + } + assert(!((rTop27 == NoReg))); + size1 = rTop27; - /* StackToRegisterMappingCogit>>#genLowcodeUnaryInlinePrimitive: */ -static sqInt NoDbgRegParms -genLowcodeUnaryInlinePrimitive(sqInt prim) -{ - - switch (prim) { - case 0: - return genLowcodeAdd32(); + nativePopToReg(ssNativeTop(), size1); + ssNativePop(1); + /* begin MoveAw:R: */ + address = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction = genoperandoperand(MoveAwR, address, TempReg); + /* begin SubR:R: */ + genoperandoperand(SubRR, size1, TempReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction1 = genoperandoperand(AndCqR, -16, TempReg); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, TempReg, size1); + /* begin MoveR:Aw: */ + address1 = nativeStackPointerAddress(); + /* begin checkLiteral:forInstruction: */ + anInstruction2 = genoperandoperand(MoveRAw, size1, address1); + ssPushNativeRegister(size1); + return 0; - case 1: - return genLowcodeAdd64(); + case 3: + /* begin genLowcodeAlloca64 */ + /* begin allocateRegistersForLowcodeInteger2: */ + topRegistersMask2 = 0; + rTop3 = (rNext3 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop3 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext3 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg2 = (rNext3 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask2 = 1U << reg2; + } + } + if (rTop3 == NoReg) { + rTop3 = allocateRegNotConflictingWith(topRegistersMask2); + } + if (rNext3 == NoReg) { + rNext3 = allocateRegNotConflictingWith(1U << rTop3); + } + assert(!(((rTop3 == NoReg) + || (rNext3 == NoReg)))); + sizeLow = rTop3; + sizeHigh = rNext3; - case 2: - return genLowcodeAlloca32(); + nativePopToRegsecondReg(ssNativeTop(), sizeLow, sizeHigh); + ssNativePop(1); + /* begin SubR:R: */ + genoperandoperand(SubRR, sizeLow, SPReg); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, SPReg, sizeLow); + ssPushNativeRegister(sizeLow); - case 3: - return genLowcodeAlloca64(); + return 0; case 4: - return genLowcodeAnd32(); + /* begin genLowcodeAnd32 */ + topRegistersMask3 = 0; + rTop4 = (rNext4 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop4 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext4 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg3 = (rNext4 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask3 = 1U << reg3; + } + } + if (rTop4 == NoReg) { + rTop4 = allocateRegNotConflictingWith(topRegistersMask3); + } + if (rNext4 == NoReg) { + rNext4 = allocateRegNotConflictingWith(1U << rTop4); + } + assert(!(((rTop4 == NoReg) + || (rNext4 == NoReg)))); + second2 = rTop4; + first2 = rNext4; + + nativePopToReg(ssNativeTop(), second2); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first2); + ssNativePop(1); + /* begin AndR:R: */ + genoperandoperand(AndRR, second2, first2); + ssPushNativeRegister(first2); + return 0; case 5: - return genLowcodeAnd64(); + /* begin genLowcodeAnd64 */ + /* begin allocateRegistersForLowcodeInteger4: */ + rTop5 = (rNext5 = (rNextNext1 = (rNextNextNext1 = NoReg))); + nativeValueIndex1 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop5 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext5 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext5 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNext5 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex1)); + } + nativeValueIndex1 += 1; + } + } + if (rNextNextNext1 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex1))) != NoReg) { + rNextNextNext1 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex1)); + nativeValueIndex1 += 1; + } + } + if (rTop5 == NoReg) { + registerMask1 = 0; + if (rNext5 != NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rNext5; + } + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rTop5 = allocateRegNotConflictingWith(registerMask1); + } + if (rNext5 == NoReg) { + /* begin registerMaskFor: */ + registerMask1 = 1U << rTop5; + if (rNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNext1); + } + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNext5 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNext1 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask1 = (1U << rTop5) | (1U << rNext5); + if (rNextNextNext1 != NoReg) { + registerMask1 = registerMask1 | (1U << rNextNextNext1); + } + rNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + if (rNextNextNext1 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask1 = ((1U << rTop5) | (1U << rNext5)) | (1U << rNextNext1); + rNextNextNext1 = allocateRegNotConflictingWith(registerMask1); + } + assert(!(((rTop5 == NoReg) + || ((rNext5 == NoReg) + || ((rNextNext1 == NoReg) + || (rNextNextNext1 == NoReg)))))); + secondLow1 = rTop5; + secondHigh1 = rNext5; + firstLow1 = rNextNext1; + firstHigh1 = rNextNextNext1; + + nativePopToRegsecondReg(ssNativeTop(), secondLow1, secondHigh1); + ssNativePop(1); + nativePopToRegsecondReg(ssNativeTop(), firstLow1, firstHigh1); + ssNativePop(1); + /* begin AndR:R: */ + genoperandoperand(AndRR, secondLow1, firstLow1); + /* begin AndR:R: */ + genoperandoperand(AndRR, secondHigh1, firstHigh1); + ssPushNativeRegistersecondRegister(firstLow1, firstHigh1); + + return 0; case 6: - return genLowcodeArithmeticRightShift32(); + /* begin genLowcodeArithmeticRightShift32 */ + topRegistersMask5 = 0; + rTop6 = (rNext6 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop6 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext6 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext6 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg5 = (rNext6 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask5 = 1U << reg5; + } + } + if (rTop6 == NoReg) { + rTop6 = allocateRegNotConflictingWith(topRegistersMask5); + } + if (rNext6 == NoReg) { + rNext6 = allocateRegNotConflictingWith(1U << rTop6); + } + assert(!(((rTop6 == NoReg) + || (rNext6 == NoReg)))); + shiftAmount = rTop6; + value = rNext6; + + nativePopToReg(ssNativeTop(), shiftAmount); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value); + ssNativePop(1); + /* begin ArithmeticShiftRightR:R: */ + genoperandoperand(ArithmeticShiftRightRR, shiftAmount, value); + ssPushNativeRegister(value); + return 0; case 7: - return genLowcodeArithmeticRightShift64(); + /* begin genLowcodeArithmeticRightShift64 */ + topRegistersMask6 = 0; + rTop7 = (rNext7 = NoReg); + rResult = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop7 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext7 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext7 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg6 = (rNext7 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask6 = 1U << reg6; + } + } + if (rTop7 == NoReg) { + rTop7 = allocateRegNotConflictingWith(topRegistersMask6); + } + if (rNext7 == NoReg) { + rNext7 = allocateRegNotConflictingWith(1U << rTop7); + } + assert(!(((rTop7 == NoReg) + || (rNext7 == NoReg)))); + rResult = allocateFloatRegNotConflictingWith((1U << rTop7) | (1U << rNext7)); + assert(!((rResult == NoReg))); + shiftAmount1 = rTop7; + value1 = rNext7; + result = rResult; + + nativePopToReg(ssNativeTop(), shiftAmount1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), value1); + ssNativePop(1); + abort(); + return 0; case 8: - return genLowcodeBeginCall(); + /* begin genLowcodeBeginCall */ + alignment = extA; + beginHighLevelCall(alignment); + extA = 0; + return 0; case 9: - return genLowcodeCallArgumentFloat32(); + /* begin genLowcodeCallArgumentFloat32 */ + nativeStackPopToReg(ssNativeTop(), DPFPReg0); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + literal = -BytesPerWord; + anInstruction3 = genoperandoperandoperand(MoveRsM32r, DPFPReg0, -BytesPerWord, SPReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction4 = genoperandoperand(SubCqR, BytesPerWord, SPReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 10: - return genLowcodeCallArgumentFloat64(); + /* begin genLowcodeCallArgumentFloat64 */ + nativeStackPopToReg(ssNativeTop(), DPFPReg0); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction5 = genoperandoperandoperand(MoveRdM64r, DPFPReg0, -8, SPReg); + /* begin checkQuickConstant:forInstruction: */ + anInstruction6 = genoperandoperand(SubCqR, 8, SPReg); + currentCallCleanUpSize += 8; + return 0; case 11: - return genLowcodeCallArgumentInt32(); + /* begin genLowcodeCallArgumentInt32 */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 12: - return genLowcodeCallArgumentInt64(); + /* begin genLowcodeCallArgumentInt64 */ + nativeStackPopToRegsecondReg(ssNativeTop(), TempReg, ReceiverResultReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + /* begin PushR: */ + genoperand(PushR, ReceiverResultReg); + currentCallCleanUpSize += 8; + + return 0; case 13: - return genLowcodeCallArgumentPointer(); + /* begin genLowcodeCallArgumentPointer */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin PushR: */ + genoperand(PushR, TempReg); + currentCallCleanUpSize += BytesPerWord; + return 0; case 14: - return genLowcodeCallArgumentSpace(); + /* begin genLowcodeCallArgumentSpace */ + anInstruction7 = genoperandoperand(SubCqR, extA, SPReg); + currentCallCleanUpSize += extA; + extA = 0; + return 0; case 15: - return genLowcodeCallArgumentStructure(); + /* begin genLowcodeCallArgumentStructure */ + nativeStackPopToReg(ssNativeTop(), TempReg); + ssNativePop(1); + /* begin checkQuickConstant:forInstruction: */ + anInstruction8 = genoperandoperand(SubCqR, extA, SPReg); + + /* Copy the structure */ + currentCallCleanUpSize += extA; + genMemCopytoconstantSize(backEnd, TempReg, SPReg, extA); + extA = 0; + return 0; case 16: - return genLowcodeCallInstruction(); + /* begin genLowcodeCallInstruction */ + function = extA; + /* begin CallRT: */ + abstractInstruction = genoperand(Call, function); + (abstractInstruction->annotation = IsRelativeCall); + extA = 0; + return 0; case 17: - return genLowcodeCallPhysical(); + /* begin genLowcodeCallPhysical */ + registerID = extA; + /* begin CallR: */ + genoperand(CallR, registerID); + extA = 0; + return 0; case 18: - return genLowcodeCheckSessionIdentifier(); + /* begin genLowcodeCheckSessionIdentifier */ + expectedSession = extA; + ssPushNativeConstantInt32((expectedSession == (getThisSessionID()) + ? 1 + : 0)); + extA = 0; + return 0; case 19: - return genLowcodeCompareAndSwap32(); + /* begin genLowcodeCompareAndSwap32 */ + rTop8 = (rNext8 = (rNextNext2 = NoReg)); + nativeValueIndex2 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop8 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext8 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext8 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNext8 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex2)); + } + nativeValueIndex2 += 1; + } + } + if (rNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex2))) != NoReg) { + rNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex2)); + } + } + if (rTop8 == NoReg) { + registerMask2 = 0; + if (rNext8 != NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rNext8; + } + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rTop8 = allocateRegNotConflictingWith(registerMask2); + } + if (rNext8 == NoReg) { + /* begin registerMaskFor: */ + registerMask2 = 1U << rTop8; + if (rNextNext2 != NoReg) { + registerMask2 = registerMask2 | (1U << rNextNext2); + } + rNext8 = allocateRegNotConflictingWith(registerMask2); + } + if (rNextNext2 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask2 = (1U << rTop8) | (1U << rNext8); + rNextNext2 = allocateRegNotConflictingWith(registerMask2); + } + assert(!(((rTop8 == NoReg) + || ((rNext8 == NoReg) + || (rNextNext2 == NoReg))))); + rResult1 = allocateRegNotConflictingWith(((1U << rTop8) | (1U << rNext8)) | (1U << rNextNext2)); + assert(!((rResult1 == NoReg))); + newValue = rTop8; + oldValue = rNext8; + check = rNextNext2; + value2 = rResult1; + + nativePopToReg(ssNativeTop(), newValue); + ssNativePop(1); + nativePopToReg(ssNativeTop(), oldValue); + ssNativePop(1); + nativePopToReg(ssNativeTop(), check); + ssNativePop(1); + abort(); + return 0; case 20: - return genLowcodeDiv32(); + /* begin genLowcodeDiv32 */ + topRegistersMask7 = 0; + rTop9 = (rNext9 = NoReg); + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop9 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext9 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext9 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg7 = (rNext9 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask7 = 1U << reg7; + } + } + if (rTop9 == NoReg) { + rTop9 = allocateRegNotConflictingWith(topRegistersMask7); + } + if (rNext9 == NoReg) { + rNext9 = allocateRegNotConflictingWith(1U << rTop9); + } + assert(!(((rTop9 == NoReg) + || (rNext9 == NoReg)))); + second4 = rTop9; + first4 = rNext9; + + nativePopToReg(ssNativeTop(), second4); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first4); + ssNativePop(1); + gDivRRQuoRem(second4, first4, first4, second4); + ssPushNativeRegister(first4); + return 0; case 21: - return genLowcodeDiv64(); + /* begin genLowcodeDiv64 */ + topRegistersMask8 = 0; + rTop10 = (rNext10 = NoReg); + rResult2 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop10 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext10 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0); + if (rNext10 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg8 = (rNext10 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask8 = 1U << reg8; + } + } + if (rTop10 == NoReg) { + rTop10 = allocateRegNotConflictingWith(topRegistersMask8); + } + if (rNext10 == NoReg) { + rNext10 = allocateRegNotConflictingWith(1U << rTop10); + } + assert(!(((rTop10 == NoReg) + || (rNext10 == NoReg)))); + rResult2 = allocateFloatRegNotConflictingWith((1U << rTop10) | (1U << rNext10)); + assert(!((rResult2 == NoReg))); + second5 = rTop10; + first5 = rNext10; + result1 = rResult2; + + nativePopToReg(ssNativeTop(), second5); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first5); + ssNativePop(1); + abort(); + return 0; case 22: - return genLowcodeDuplicateFloat32(); + /* begin genLowcodeDuplicateFloat32 */ + frTop = NoReg; + + /* Float argument */ + frResult = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop == NoReg) { + frTop = allocateFloatRegNotConflictingWith(0); + } + frResult = allocateFloatRegNotConflictingWith(1U << frTop); + assert(!(((frTop == NoReg) + || (frResult == NoReg)))); + value3 = frTop; + dup2 = frResult; + + nativePopToReg(ssNativeTop(), value3); + ssNativePop(1); + /* begin MoveRs:Rs: */ + genoperandoperand(MoveRsRs, value3, dup2); + ssPushNativeRegisterSingleFloat(value3); + ssPushNativeRegisterSingleFloat(dup2); + return 0; case 23: - return genLowcodeDuplicateFloat64(); + /* begin genLowcodeDuplicateFloat64 */ + frTop1 = NoReg; + + /* Float argument */ + frResult1 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop1 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop1 == NoReg) { + frTop1 = allocateFloatRegNotConflictingWith(0); + } + frResult1 = allocateFloatRegNotConflictingWith(1U << frTop1); + assert(!(((frTop1 == NoReg) + || (frResult1 == NoReg)))); + value4 = frTop1; + dup21 = frResult1; + + nativePopToReg(ssNativeTop(), value4); + ssNativePop(1); + /* begin MoveRd:Rd: */ + genoperandoperand(MoveRdRd, value4, dup21); + ssPushNativeRegisterDoubleFloat(value4); + ssPushNativeRegisterDoubleFloat(dup21); + return 0; case 24: - return genLowcodeDuplicateInt32(); + /* begin genLowcodeDuplicateInt32 */ + rTop13 = NoReg; + rResult3 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop13 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop13 == NoReg) { + rTop13 = allocateRegNotConflictingWith(0); + } + rResult3 = allocateRegNotConflictingWith(1U << rTop13); + assert(!(((rTop13 == NoReg) + || (rResult3 == NoReg)))); + value5 = rTop13; + dup22 = rResult3; + + nativePopToReg(ssNativeTop(), value5); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, value5, dup22); + ssPushNativeRegister(value5); + ssPushNativeRegister(dup22); + return 0; case 25: - return genLowcodeDuplicateInt64(); + /* begin genLowcodeDuplicateInt64 */ + /* begin allocateRegistersForLowcodeInteger2ResultInteger2: */ + topRegistersMask9 = 0; + rTop15 = (rNext12 = NoReg); + rResult4 = (rResult21 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? ((rTop15 = nativeRegisterOrNone(ssNativeTop())), + ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg + ? (rNext12 = nativeRegisterSecondOrNone(ssNativeTop())) + : 0)) + : 0)); + if (rNext12 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg9 = (rNext12 = nativeRegisterOrNone(ssNativeValue(1))); + topRegistersMask9 = 1U << reg9; + } + } + if (rTop15 == NoReg) { + rTop15 = allocateRegNotConflictingWith(topRegistersMask9); + } + if (rNext12 == NoReg) { + rNext12 = allocateRegNotConflictingWith(1U << rTop15); + } + assert(!(((rTop15 == NoReg) + || (rNext12 == NoReg)))); + rResult4 = allocateFloatRegNotConflictingWith((1U << rTop15) | (1U << rNext12)); + rResult21 = allocateFloatRegNotConflictingWith(((1U << rTop15) | (1U << rNext12)) | (1U << rResult4)); + assert(!(((rResult4 == NoReg) + || (rResult21 == NoReg)))); + valueLow1 = rTop15; + valueHigh1 = rNext12; + dup2Low = rResult4; + dup2High = rResult21; + + nativePopToRegsecondReg(ssNativeTop(), valueLow1, valueHigh1); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, valueLow1, dup2Low); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, valueHigh1, dup2High); + ssPushNativeRegistersecondRegister(valueLow1, valueHigh1); + ssPushNativeRegistersecondRegister(dup2Low, dup2High); + + return 0; case 26: - return genLowcodeDuplicatePointer(); + /* begin genLowcodeDuplicatePointer */ + rTop16 = NoReg; + rResult5 = ((nativeRegisterOrNone(ssNativeTop(self(NoReg)))) != NoReg + ? (rTop16 = nativeRegisterOrNone(ssNativeTop())) + : 0); + if (rTop16 == NoReg) { + rTop16 = allocateRegNotConflictingWith(0); + } + rResult5 = allocateRegNotConflictingWith(1U << rTop16); + assert(!(((rTop16 == NoReg) + || (rResult5 == NoReg)))); + pointerValue = rTop16; + dup24 = rResult5; + + nativePopToReg(ssNativeTop(), pointerValue); + ssNativePop(1); + /* begin MoveR:R: */ + genoperandoperand(MoveRR, pointerValue, dup24); + ssPushNativeRegister(pointerValue); + ssPushNativeRegister(dup24); + return 0; case 27: - return genLowcodeEffectiveAddress32(); + /* begin genLowcodeEffectiveAddress32 */ + rTop17 = (rNext13 = (rNextNext3 = (rNextNextNext2 = NoReg))); + nativeValueIndex3 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop17 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext13 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext13 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNext13 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNextNext2 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex3)); + } + nativeValueIndex3 += 1; + } + } + if (rNextNextNext2 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex3))) != NoReg) { + rNextNextNext2 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex3)); + nativeValueIndex3 += 1; + } + } + if (rTop17 == NoReg) { + registerMask3 = 0; + if (rNext13 != NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rNext13; + } + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNextNext2); + } + rTop17 = allocateRegNotConflictingWith(registerMask3); + } + if (rNext13 == NoReg) { + /* begin registerMaskFor: */ + registerMask3 = 1U << rTop17; + if (rNextNext3 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNext3); + } + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNextNext2); + } + rNext13 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNext3 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask3 = (1U << rTop17) | (1U << rNext13); + if (rNextNextNext2 != NoReg) { + registerMask3 = registerMask3 | (1U << rNextNextNext2); + } + rNextNext3 = allocateRegNotConflictingWith(registerMask3); + } + if (rNextNextNext2 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask3 = ((1U << rTop17) | (1U << rNext13)) | (1U << rNextNext3); + rNextNextNext2 = allocateRegNotConflictingWith(registerMask3); + } + assert(!(((rTop17 == NoReg) + || ((rNext13 == NoReg) + || ((rNextNext3 == NoReg) + || (rNextNextNext2 == NoReg)))))); + offset = rTop17; + scale = rNext13; + index = rNextNext3; + base = rNextNextNext2; + + nativePopToReg(ssNativeTop(), offset); + ssNativePop(1); + nativePopToReg(ssNativeTop(), scale); + ssNativePop(1); + nativePopToReg(ssNativeTop(), index); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base); + ssNativePop(1); + /* begin MulR:R: */ + genMulRR(backEnd, scale, index); + /* begin AddR:R: */ + genoperandoperand(AddRR, index, base); + /* begin AddR:R: */ + genoperandoperand(AddRR, offset, base); + ssPushNativeRegister(base); + return 0; case 28: - return genLowcodeEffectiveAddress64(); + /* begin genLowcodeEffectiveAddress64 */ + rTop18 = (rNext14 = (rNextNext4 = (rNextNextNext3 = NoReg))); + rResult6 = NoReg; + nativeValueIndex4 = 1; + if ((nativeRegisterOrNone(ssNativeTop())) != NoReg) { + rTop18 = nativeRegisterOrNone(ssNativeTop()); + if ((nativeRegisterSecondOrNone(ssNativeTop())) != NoReg) { + rNext14 = nativeRegisterSecondOrNone(ssNativeTop()); + } + } + if (rNext14 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNext14 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNext4 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + } + nativeValueIndex4 += 1; + } + } + if (rNextNext4 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNext4 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + if ((nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNextNext3 = nativeRegisterSecondOrNone(ssNativeValue(nativeValueIndex4)); + } + nativeValueIndex4 += 1; + } + } + if (rNextNextNext3 == NoReg) { + if ((nativeRegisterOrNone(ssNativeValue(nativeValueIndex4))) != NoReg) { + rNextNextNext3 = nativeRegisterOrNone(ssNativeValue(nativeValueIndex4)); + nativeValueIndex4 += 1; + } + } + if (rTop18 == NoReg) { + registerMask4 = 0; + if (rNext14 != NoReg) { + /* begin registerMaskFor: */ + registerMask4 = 1U << rNext14; + } + if (rNextNext4 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNext4); + } + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNextNext3); + } + rTop18 = allocateRegNotConflictingWith(registerMask4); + } + if (rNext14 == NoReg) { + /* begin registerMaskFor: */ + registerMask4 = 1U << rTop18; + if (rNextNext4 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNext4); + } + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNextNext3); + } + rNext14 = allocateRegNotConflictingWith(registerMask4); + } + if (rNextNext4 == NoReg) { + /* begin registerMaskFor:and: */ + registerMask4 = (1U << rTop18) | (1U << rNext14); + if (rNextNextNext3 != NoReg) { + registerMask4 = registerMask4 | (1U << rNextNextNext3); + } + rNextNext4 = allocateRegNotConflictingWith(registerMask4); + } + if (rNextNextNext3 == NoReg) { + /* begin registerMaskFor:and:and: */ + registerMask4 = ((1U << rTop18) | (1U << rNext14)) | (1U << rNextNext4); + rNextNextNext3 = allocateRegNotConflictingWith(registerMask4); + } + assert(!(((rTop18 == NoReg) + || ((rNext14 == NoReg) + || ((rNextNext4 == NoReg) + || (rNextNextNext3 == NoReg)))))); + rResult6 = allocateRegNotConflictingWith((((1U << rTop18) | (1U << rNext14)) | (1U << rNextNext4)) | (1U << rNextNextNext3)); + offset1 = rTop18; + scale1 = rNext14; + index1 = rNextNext4; + base1 = rNextNextNext3; + result2 = rResult6; + + nativePopToReg(ssNativeTop(), offset1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), scale1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), index1); + ssNativePop(1); + nativePopToReg(ssNativeTop(), base1); + ssNativePop(1); + abort(); + return 0; case 29: - return genLowcodeEndCall(); + /* begin genLowcodeEndCall */ + endHighLevelCallWithCleanup(); + return 0; case 30: - return genLowcodeEndCallNoCleanup(); + /* begin genLowcodeEndCallNoCleanup */ + endHighLevelCallWithoutCleanup(); + return 0; case 0x1F: - return genLowcodeFloat32Add(); + /* begin genLowcodeFloat32Add */ + topRegistersMask10 = 0; + rTop19 = (rNext15 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop19 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg10 = (rNext15 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask10 = 1U << reg10; + } + if (rTop19 == NoReg) { + rTop19 = allocateFloatRegNotConflictingWith(topRegistersMask10); + } + if (rNext15 == NoReg) { + rNext15 = allocateFloatRegNotConflictingWith(1U << rTop19); + } + assert(!(((rTop19 == NoReg) + || (rNext15 == NoReg)))); + second6 = rTop19; + first6 = rNext15; + + nativePopToReg(ssNativeTop(), second6); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first6); + ssNativePop(1); + /* begin AddRs:Rs: */ + genoperandoperand(AddRsRs, second6, first6); + ssPushNativeRegisterSingleFloat(first6); + return 0; case 32: - return genLowcodeFloat32Div(); + /* begin genLowcodeFloat32Div */ + topRegistersMask11 = 0; + rTop20 = (rNext16 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop20 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg11 = (rNext16 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask11 = 1U << reg11; + } + if (rTop20 == NoReg) { + rTop20 = allocateFloatRegNotConflictingWith(topRegistersMask11); + } + if (rNext16 == NoReg) { + rNext16 = allocateFloatRegNotConflictingWith(1U << rTop20); + } + assert(!(((rTop20 == NoReg) + || (rNext16 == NoReg)))); + second7 = rTop20; + first7 = rNext16; + + nativePopToReg(ssNativeTop(), second7); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first7); + ssNativePop(1); + /* begin DivRs:Rs: */ + genoperandoperand(DivRsRs, second7, first7); + ssPushNativeRegisterSingleFloat(first7); + return 0; case 33: - return genLowcodeFloat32Equal(); + /* begin genLowcodeFloat32Equal */ + topRegistersMask12 = 0; + frTop2 = (frNext = NoReg); + rResult7 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop2 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg12 = (frNext = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask12 = 1U << reg12; + } + if (frTop2 == NoReg) { + frTop2 = allocateFloatRegNotConflictingWith(topRegistersMask12); + } + if (frNext == NoReg) { + frNext = allocateFloatRegNotConflictingWith(1U << frTop2); + } + rResult7 = allocateRegNotConflictingWith(0); + assert(!(((frTop2 == NoReg) + || ((frNext == NoReg) + || (rResult7))))); + second8 = frTop2; + first8 = frNext; + value7 = rResult7; + + nativePopToReg(ssNativeTop(), second8); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first8); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second8, first8); + + /* True result */ + falseJump = gJumpFPNotEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction9 = genoperandoperand(MoveCqR, 1, value7); + /* begin Jump: */ + contJump = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction10 = genoperandoperand(MoveCqR, 0, value7); + jmpTarget(contJump, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value7); + return 0; case 34: - return genLowcodeFloat32Great(); + /* begin genLowcodeFloat32Great */ + topRegistersMask13 = 0; + frTop3 = (frNext1 = NoReg); + rResult8 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop3 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg13 = (frNext1 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask13 = 1U << reg13; + } + if (frTop3 == NoReg) { + frTop3 = allocateFloatRegNotConflictingWith(topRegistersMask13); + } + if (frNext1 == NoReg) { + frNext1 = allocateFloatRegNotConflictingWith(1U << frTop3); + } + rResult8 = allocateRegNotConflictingWith(0); + assert(!(((frTop3 == NoReg) + || ((frNext1 == NoReg) + || (rResult8))))); + second9 = frTop3; + first9 = frNext1; + value8 = rResult8; + + nativePopToReg(ssNativeTop(), second9); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first9); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second9, first9); + + /* True result */ + falseJump1 = gJumpFPLessOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction11 = genoperandoperand(MoveCqR, 1, value8); + /* begin Jump: */ + contJump1 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction12 = genoperandoperand(MoveCqR, 0, value8); + jmpTarget(contJump1, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value8); + return 0; case 35: - return genLowcodeFloat32GreatEqual(); + /* begin genLowcodeFloat32GreatEqual */ + topRegistersMask14 = 0; + frTop4 = (frNext2 = NoReg); + rResult9 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop4 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg14 = (frNext2 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask14 = 1U << reg14; + } + if (frTop4 == NoReg) { + frTop4 = allocateFloatRegNotConflictingWith(topRegistersMask14); + } + if (frNext2 == NoReg) { + frNext2 = allocateFloatRegNotConflictingWith(1U << frTop4); + } + rResult9 = allocateRegNotConflictingWith(0); + assert(!(((frTop4 == NoReg) + || ((frNext2 == NoReg) + || (rResult9))))); + second10 = frTop4; + first10 = frNext2; + value9 = rResult9; + + nativePopToReg(ssNativeTop(), second10); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first10); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second10, first10); + + /* True result */ + falseJump2 = gJumpFPLess(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction13 = genoperandoperand(MoveCqR, 1, value9); + /* begin Jump: */ + contJump2 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction14 = genoperandoperand(MoveCqR, 0, value9); + jmpTarget(contJump2, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value9); + return 0; case 36: - return genLowcodeFloat32Less(); + /* begin genLowcodeFloat32Less */ + topRegistersMask15 = 0; + frTop5 = (frNext3 = NoReg); + rResult10 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop5 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg15 = (frNext3 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask15 = 1U << reg15; + } + if (frTop5 == NoReg) { + frTop5 = allocateFloatRegNotConflictingWith(topRegistersMask15); + } + if (frNext3 == NoReg) { + frNext3 = allocateFloatRegNotConflictingWith(1U << frTop5); + } + rResult10 = allocateRegNotConflictingWith(0); + assert(!(((frTop5 == NoReg) + || ((frNext3 == NoReg) + || (rResult10))))); + second11 = frTop5; + first11 = frNext3; + value10 = rResult10; + + nativePopToReg(ssNativeTop(), second11); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first11); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second11, first11); + + /* True result */ + falseJump3 = gJumpFPGreaterOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction15 = genoperandoperand(MoveCqR, 1, value10); + /* begin Jump: */ + contJump3 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction16 = genoperandoperand(MoveCqR, 0, value10); + jmpTarget(contJump3, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value10); + return 0; case 37: - return genLowcodeFloat32LessEqual(); + /* begin genLowcodeFloat32LessEqual */ + topRegistersMask16 = 0; + frTop6 = (frNext4 = NoReg); + rResult12 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop6 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg16 = (frNext4 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask16 = 1U << reg16; + } + if (frTop6 == NoReg) { + frTop6 = allocateFloatRegNotConflictingWith(topRegistersMask16); + } + if (frNext4 == NoReg) { + frNext4 = allocateFloatRegNotConflictingWith(1U << frTop6); + } + rResult12 = allocateRegNotConflictingWith(0); + assert(!(((frTop6 == NoReg) + || ((frNext4 == NoReg) + || (rResult12))))); + second12 = frTop6; + first12 = frNext4; + value11 = rResult12; + + nativePopToReg(ssNativeTop(), second12); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first12); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second12, first12); + + /* True result */ + falseJump4 = gJumpFPGreater(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction17 = genoperandoperand(MoveCqR, 1, value11); + /* begin Jump: */ + contJump4 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction18 = genoperandoperand(MoveCqR, 0, value11); + jmpTarget(contJump4, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value11); + return 0; case 38: - return genLowcodeFloat32Mul(); + /* begin genLowcodeFloat32Mul */ + topRegistersMask17 = 0; + rTop21 = (rNext17 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop21 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg17 = (rNext17 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask17 = 1U << reg17; + } + if (rTop21 == NoReg) { + rTop21 = allocateFloatRegNotConflictingWith(topRegistersMask17); + } + if (rNext17 == NoReg) { + rNext17 = allocateFloatRegNotConflictingWith(1U << rTop21); + } + assert(!(((rTop21 == NoReg) + || (rNext17 == NoReg)))); + second13 = rTop21; + first13 = rNext17; + + nativePopToReg(ssNativeTop(), second13); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first13); + ssNativePop(1); + /* begin MulRs:Rs: */ + genoperandoperand(MulRsRs, second13, first13); + ssPushNativeRegisterSingleFloat(first13); + return 0; case 39: - return genLowcodeFloat32Neg(); + /* begin genLowcodeFloat32Neg */ + frTop7 = NoReg; + + /* Float argument */ + frResult2 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop7 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop7 == NoReg) { + frTop7 = allocateFloatRegNotConflictingWith(0); + } + frResult2 = allocateFloatRegNotConflictingWith(1U << frTop7); + assert(!(((frTop7 == NoReg) + || (frResult2 == NoReg)))); + value12 = frTop7; + result3 = frResult2; + + nativePopToReg(ssNativeTop(), value12); + ssNativePop(1); + /* begin XorRs:Rs: */ + genoperandoperand(XorRsRs, result3, result3); + /* begin SubRs:Rs: */ + genoperandoperand(SubRsRs, value12, result3); + ssPushNativeRegisterSingleFloat(result3); + return 0; case 40: - return genLowcodeFloat32NotEqual(); + /* begin genLowcodeFloat32NotEqual */ + topRegistersMask18 = 0; + frTop8 = (frNext5 = NoReg); + rResult13 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop8 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg18 = (frNext5 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask18 = 1U << reg18; + } + if (frTop8 == NoReg) { + frTop8 = allocateFloatRegNotConflictingWith(topRegistersMask18); + } + if (frNext5 == NoReg) { + frNext5 = allocateFloatRegNotConflictingWith(1U << frTop8); + } + rResult13 = allocateRegNotConflictingWith(0); + assert(!(((frTop8 == NoReg) + || ((frNext5 == NoReg) + || (rResult13))))); + second14 = frTop8; + first14 = frNext5; + value13 = rResult13; + + nativePopToReg(ssNativeTop(), second14); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first14); + ssNativePop(1); + /* begin CmpRs:Rs: */ + genoperandoperand(CmpRsRs, second14, first14); + + /* True result */ + falseJump5 = gJumpFPEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction19 = genoperandoperand(MoveCqR, 1, value13); + /* begin Jump: */ + contJump5 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction20 = genoperandoperand(MoveCqR, 0, value13); + jmpTarget(contJump5, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value13); + return 0; case 41: - return genLowcodeFloat32Sqrt(); + /* begin genLowcodeFloat32Sqrt */ + topRegistersMask19 = 0; + frTop9 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop9 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop9 == NoReg) { + frTop9 = allocateFloatRegNotConflictingWith(topRegistersMask19); + } + assert(!((frTop9 == NoReg))); + value14 = frTop9; + + nativePopToReg(ssNativeTop(), value14); + ssNativePop(1); + /* begin SqrtRs: */ + genoperand(SqrtRs, value14); + ssPushNativeRegisterSingleFloat(value14); + return 0; case 42: - return genLowcodeFloat32Sub(); + /* begin genLowcodeFloat32Sub */ + topRegistersMask20 = 0; + rTop22 = (rNext18 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop22 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg19 = (rNext18 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask20 = 1U << reg19; + } + if (rTop22 == NoReg) { + rTop22 = allocateFloatRegNotConflictingWith(topRegistersMask20); + } + if (rNext18 == NoReg) { + rNext18 = allocateFloatRegNotConflictingWith(1U << rTop22); + } + assert(!(((rTop22 == NoReg) + || (rNext18 == NoReg)))); + second15 = rTop22; + first15 = rNext18; + + nativePopToReg(ssNativeTop(), second15); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first15); + ssNativePop(1); + /* begin SubRs:Rs: */ + genoperandoperand(SubRsRs, second15, first15); + ssPushNativeRegisterSingleFloat(first15); + return 0; case 43: - return genLowcodeFloat32ToFloat64(); + /* begin genLowcodeFloat32ToFloat64 */ + topRegistersMask21 = 0; + frTop10 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop10 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop10 == NoReg) { + frTop10 = allocateFloatRegNotConflictingWith(topRegistersMask21); + } + assert(!((frTop10 == NoReg))); + singleFloatValue = frTop10; + + nativePopToReg(ssNativeTop(), singleFloatValue); + ssNativePop(1); + /* begin ConvertRs:Rd: */ + genoperandoperand(ConvertRsRd, singleFloatValue, singleFloatValue); + ssPushNativeRegisterDoubleFloat(singleFloatValue); + return 0; case 44: - return genLowcodeFloat32ToInt32(); + /* begin genLowcodeFloat32ToInt32 */ + frTop11 = NoReg; + + /* Float argument */ + rResult14 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop11 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop11 == NoReg) { + frTop11 = allocateFloatRegNotConflictingWith(0); + } + rResult14 = allocateRegNotConflictingWith(0); + assert(!(((frTop11 == NoReg) + || (rResult14 == NoReg)))); + value15 = frTop11; + result4 = rResult14; + + nativePopToReg(ssNativeTop(), value15); + ssNativePop(1); + /* begin ConvertRs:R: */ + genoperandoperand(ConvertRsR, value15, result4); + ssPushNativeRegister(result4); + return 0; case 45: - return genLowcodeFloat32ToInt64(); + /* begin genLowcodeFloat32ToInt64 */ + frTop12 = NoReg; + + /* Float argument */ + rResult15 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop12 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop12 == NoReg) { + frTop12 = allocateFloatRegNotConflictingWith(0); + } + rResult15 = allocateRegNotConflictingWith(0); + assert(!(((frTop12 == NoReg) + || (rResult15 == NoReg)))); + value16 = frTop12; + result5 = rResult15; + + nativePopToReg(ssNativeTop(), value16); + ssNativePop(1); + abort(); + return 0; case 46: - return genLowcodeFloat32ToUInt32(); + /* begin genLowcodeFloat32ToUInt32 */ + frTop13 = NoReg; + + /* Float argument */ + rResult16 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop13 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop13 == NoReg) { + frTop13 = allocateFloatRegNotConflictingWith(0); + } + rResult16 = allocateRegNotConflictingWith(0); + assert(!(((frTop13 == NoReg) + || (rResult16 == NoReg)))); + value17 = frTop13; + result6 = rResult16; + + nativePopToReg(ssNativeTop(), value17); + ssNativePop(1); + /* begin ConvertRs:R: */ + genoperandoperand(ConvertRsR, value17, result6); + ssPushNativeRegister(result6); + return 0; case 47: - return genLowcodeFloat32ToUInt64(); + /* begin genLowcodeFloat32ToUInt64 */ + frTop14 = NoReg; + + /* Float argument */ + rResult17 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop14 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop14 == NoReg) { + frTop14 = allocateFloatRegNotConflictingWith(0); + } + rResult17 = allocateRegNotConflictingWith(0); + assert(!(((frTop14 == NoReg) + || (rResult17 == NoReg)))); + value18 = frTop14; + result7 = rResult17; + + nativePopToReg(ssNativeTop(), value18); + ssNativePop(1); + abort(); + return 0; case 48: - return genLowcodeFloat64Add(); + /* begin genLowcodeFloat64Add */ + topRegistersMask22 = 0; + rTop23 = (rNext19 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop23 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg20 = (rNext19 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask22 = 1U << reg20; + } + if (rTop23 == NoReg) { + rTop23 = allocateFloatRegNotConflictingWith(topRegistersMask22); + } + if (rNext19 == NoReg) { + rNext19 = allocateFloatRegNotConflictingWith(1U << rTop23); + } + assert(!(((rTop23 == NoReg) + || (rNext19 == NoReg)))); + second16 = rTop23; + first16 = rNext19; + + nativePopToReg(ssNativeTop(), second16); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first16); + ssNativePop(1); + /* begin AddRd:Rd: */ + genoperandoperand(AddRdRd, second16, first16); + ssPushNativeRegisterDoubleFloat(first16); + return 0; case 49: - return genLowcodeFloat64Div(); + /* begin genLowcodeFloat64Div */ + topRegistersMask23 = 0; + rTop24 = (rNext20 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop24 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg21 = (rNext20 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask23 = 1U << reg21; + } + if (rTop24 == NoReg) { + rTop24 = allocateFloatRegNotConflictingWith(topRegistersMask23); + } + if (rNext20 == NoReg) { + rNext20 = allocateFloatRegNotConflictingWith(1U << rTop24); + } + assert(!(((rTop24 == NoReg) + || (rNext20 == NoReg)))); + second17 = rTop24; + first17 = rNext20; + + nativePopToReg(ssNativeTop(), second17); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first17); + ssNativePop(1); + /* begin DivRd:Rd: */ + genoperandoperand(DivRdRd, second17, first17); + ssPushNativeRegisterDoubleFloat(first17); + return 0; case 50: - return genLowcodeFloat64Equal(); + /* begin genLowcodeFloat64Equal */ + topRegistersMask24 = 0; + frTop15 = (frNext6 = NoReg); + rResult18 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop15 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg22 = (frNext6 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask24 = 1U << reg22; + } + if (frTop15 == NoReg) { + frTop15 = allocateFloatRegNotConflictingWith(topRegistersMask24); + } + if (frNext6 == NoReg) { + frNext6 = allocateFloatRegNotConflictingWith(1U << frTop15); + } + rResult18 = allocateRegNotConflictingWith(0); + assert(!(((frTop15 == NoReg) + || ((frNext6 == NoReg) + || (rResult18))))); + second18 = frTop15; + first18 = frNext6; + value19 = rResult18; + + nativePopToReg(ssNativeTop(), second18); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first18); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second18, first18); + + /* True result */ + falseJump6 = gJumpFPNotEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction21 = genoperandoperand(MoveCqR, 1, value19); + /* begin Jump: */ + contJump6 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction22 = genoperandoperand(MoveCqR, 0, value19); + jmpTarget(contJump6, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value19); + return 0; case 51: - return genLowcodeFloat64Great(); + /* begin genLowcodeFloat64Great */ + topRegistersMask25 = 0; + frTop16 = (frNext7 = NoReg); + rResult19 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop16 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg23 = (frNext7 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask25 = 1U << reg23; + } + if (frTop16 == NoReg) { + frTop16 = allocateFloatRegNotConflictingWith(topRegistersMask25); + } + if (frNext7 == NoReg) { + frNext7 = allocateFloatRegNotConflictingWith(1U << frTop16); + } + rResult19 = allocateRegNotConflictingWith(0); + assert(!(((frTop16 == NoReg) + || ((frNext7 == NoReg) + || (rResult19))))); + second19 = frTop16; + first19 = frNext7; + value20 = rResult19; + + nativePopToReg(ssNativeTop(), second19); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first19); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second19, first19); + + /* True result */ + falseJump7 = gJumpFPLessOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction23 = genoperandoperand(MoveCqR, 1, value20); + /* begin Jump: */ + contJump7 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction24 = genoperandoperand(MoveCqR, 0, value20); + jmpTarget(contJump7, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value20); + return 0; case 52: - return genLowcodeFloat64GreatEqual(); + /* begin genLowcodeFloat64GreatEqual */ + topRegistersMask26 = 0; + frTop17 = (frNext8 = NoReg); + rResult20 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop17 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg24 = (frNext8 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask26 = 1U << reg24; + } + if (frTop17 == NoReg) { + frTop17 = allocateFloatRegNotConflictingWith(topRegistersMask26); + } + if (frNext8 == NoReg) { + frNext8 = allocateFloatRegNotConflictingWith(1U << frTop17); + } + rResult20 = allocateRegNotConflictingWith(0); + assert(!(((frTop17 == NoReg) + || ((frNext8 == NoReg) + || (rResult20))))); + second20 = frTop17; + first20 = frNext8; + value21 = rResult20; + + nativePopToReg(ssNativeTop(), second20); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first20); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second20, first20); + + /* True result */ + falseJump8 = gJumpFPLess(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction25 = genoperandoperand(MoveCqR, 1, value21); + /* begin Jump: */ + contJump8 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump8, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction26 = genoperandoperand(MoveCqR, 0, value21); + jmpTarget(contJump8, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value21); + return 0; case 53: - return genLowcodeFloat64Less(); + /* begin genLowcodeFloat64Less */ + topRegistersMask27 = 0; + frTop18 = (frNext9 = NoReg); + rResult22 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop18 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg25 = (frNext9 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask27 = 1U << reg25; + } + if (frTop18 == NoReg) { + frTop18 = allocateFloatRegNotConflictingWith(topRegistersMask27); + } + if (frNext9 == NoReg) { + frNext9 = allocateFloatRegNotConflictingWith(1U << frTop18); + } + rResult22 = allocateRegNotConflictingWith(0); + assert(!(((frTop18 == NoReg) + || ((frNext9 == NoReg) + || (rResult22))))); + second21 = frTop18; + first21 = frNext9; + value22 = rResult22; + + nativePopToReg(ssNativeTop(), second21); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first21); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second21, first21); + + /* True result */ + falseJump9 = gJumpFPGreaterOrEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction27 = genoperandoperand(MoveCqR, 1, value22); + /* begin Jump: */ + contJump9 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump9, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction28 = genoperandoperand(MoveCqR, 0, value22); + jmpTarget(contJump9, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value22); + return 0; case 54: - return genLowcodeFloat64LessEqual(); + /* begin genLowcodeFloat64LessEqual */ + topRegistersMask28 = 0; + frTop19 = (frNext10 = NoReg); + rResult23 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop19 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg26 = (frNext10 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask28 = 1U << reg26; + } + if (frTop19 == NoReg) { + frTop19 = allocateFloatRegNotConflictingWith(topRegistersMask28); + } + if (frNext10 == NoReg) { + frNext10 = allocateFloatRegNotConflictingWith(1U << frTop19); + } + rResult23 = allocateRegNotConflictingWith(0); + assert(!(((frTop19 == NoReg) + || ((frNext10 == NoReg) + || (rResult23))))); + second22 = frTop19; + first22 = frNext10; + value23 = rResult23; + + nativePopToReg(ssNativeTop(), second22); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first22); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second22, first22); + + /* True result */ + falseJump10 = gJumpFPGreater(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction29 = genoperandoperand(MoveCqR, 1, value23); + /* begin Jump: */ + contJump10 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump10, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction30 = genoperandoperand(MoveCqR, 0, value23); + jmpTarget(contJump10, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value23); + return 0; case 55: - return genLowcodeFloat64Mul(); + /* begin genLowcodeFloat64Mul */ + topRegistersMask29 = 0; + rTop25 = (rNext21 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop25 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg27 = (rNext21 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask29 = 1U << reg27; + } + if (rTop25 == NoReg) { + rTop25 = allocateFloatRegNotConflictingWith(topRegistersMask29); + } + if (rNext21 == NoReg) { + rNext21 = allocateFloatRegNotConflictingWith(1U << rTop25); + } + assert(!(((rTop25 == NoReg) + || (rNext21 == NoReg)))); + second23 = rTop25; + first23 = rNext21; + + nativePopToReg(ssNativeTop(), second23); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first23); + ssNativePop(1); + /* begin MulRd:Rd: */ + genoperandoperand(MulRdRd, second23, first23); + ssPushNativeRegisterDoubleFloat(first23); + return 0; case 56: - return genLowcodeFloat64Neg(); + /* begin genLowcodeFloat64Neg */ + frTop20 = NoReg; + + /* Float argument */ + frResult3 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop20 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop20 == NoReg) { + frTop20 = allocateFloatRegNotConflictingWith(0); + } + frResult3 = allocateFloatRegNotConflictingWith(1U << frTop20); + assert(!(((frTop20 == NoReg) + || (frResult3 == NoReg)))); + value24 = frTop20; + result8 = frResult3; + + nativePopToReg(ssNativeTop(), value24); + ssNativePop(1); + /* begin XorRd:Rd: */ + genoperandoperand(XorRdRd, result8, result8); + /* begin SubRd:Rd: */ + genoperandoperand(SubRdRd, value24, result8); + ssPushNativeRegisterDoubleFloat(result8); + return 0; case 57: - return genLowcodeFloat64NotEqual(); + /* begin genLowcodeFloat64NotEqual */ + topRegistersMask30 = 0; + frTop21 = (frNext11 = NoReg); + rResult24 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop21 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg28 = (frNext11 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask30 = 1U << reg28; + } + if (frTop21 == NoReg) { + frTop21 = allocateFloatRegNotConflictingWith(topRegistersMask30); + } + if (frNext11 == NoReg) { + frNext11 = allocateFloatRegNotConflictingWith(1U << frTop21); + } + rResult24 = allocateRegNotConflictingWith(0); + assert(!(((frTop21 == NoReg) + || ((frNext11 == NoReg) + || (rResult24))))); + second24 = frTop21; + first24 = frNext11; + value25 = rResult24; + + nativePopToReg(ssNativeTop(), second24); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first24); + ssNativePop(1); + /* begin CmpRd:Rd: */ + genoperandoperand(CmpRdRd, second24, first24); + + /* True result */ + falseJump11 = gJumpFPEqual(0); + /* begin checkQuickConstant:forInstruction: */ + anInstruction31 = genoperandoperand(MoveCqR, 1, value25); + /* begin Jump: */ + contJump11 = genoperand(Jump, ((sqInt)0)); + jmpTarget(falseJump11, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + /* begin checkQuickConstant:forInstruction: */ + anInstruction32 = genoperandoperand(MoveCqR, 0, value25); + jmpTarget(contJump11, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); + ssPushNativeRegister(value25); + return 0; case 58: - return genLowcodeFloat64Sqrt(); + /* begin genLowcodeFloat64Sqrt */ + topRegistersMask31 = 0; + frTop22 = NoReg; + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + frTop22 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if (frTop22 == NoReg) { + frTop22 = allocateFloatRegNotConflictingWith(topRegistersMask31); + } + assert(!((frTop22 == NoReg))); + value26 = frTop22; + + nativePopToReg(ssNativeTop(), value26); + ssNativePop(1); + /* begin SqrtRd: */ + genoperand(SqrtRd, value26); + ssPushNativeRegisterDoubleFloat(value26); + return 0; case 59: - return genLowcodeFloat64Sub(); + /* begin genLowcodeFloat64Sub */ + topRegistersMask32 = 0; + rTop26 = (rNext22 = NoReg); + if ((nativeFloatRegisterOrNone(ssNativeTop())) != NoReg) { + rTop26 = nativeFloatRegisterOrNone(ssNativeTop()); + } + if ((nativeFloatRegisterOrNone(ssNativeValue(1))) != NoReg) { + /* begin registerMaskFor: */ + reg29 = (rNext22 = nativeFloatRegisterOrNone(ssNativeValue(1))); + topRegistersMask32 = 1U << reg29; + } + if (rTop26 == NoReg) { + rTop26 = allocateFloatRegNotConflictingWith(topRegistersMask32); + } + if (rNext22 == NoReg) { + rNext22 = allocateFloatRegNotConflictingWith(1U << rTop26); + } + assert(!(((rTop26 == NoReg) + || (rNext22 == NoReg)))); + second25 = rTop26; + first25 = rNext22; + + nativePopToReg(ssNativeTop(), second25); + ssNativePop(1); + nativePopToReg(ssNativeTop(), first25); + ssNativePop(1); + /* begin SubRd:Rd: */ + genoperandoperand(SubRdRd, second25, first25); + ssPushNativeRegisterDoubleFloat(first25); + return 0; default: return genLowcodeUnaryInlinePrimitive2(prim); @@ -36727,340 +37586,6 @@ genLowcodeUnaryInlinePrimitive(sqInt prim) return 0; } - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnlockVM */ -static sqInt -genLowcodeUnlockVM(void) -{ - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUnpin */ -static sqInt -genLowcodeUnpin(void) -{ - sqInt object; - - if (((object = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((object = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (object == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - popToReg(ssTop(), object); - ssPop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUrem32 */ -static sqInt -genLowcodeUrem32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - gDivRRQuoRem(second, first, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeUrem64 */ -static sqInt -genLowcodeUrem64(void) -{ - sqInt first; - sqInt result; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if (((result = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << second)) | (1U << first)))) == NoReg) { - ssAllocateRequiredReg((result = SendNumArgsReg)); - } - if (((second == ReceiverResultReg) - || (first == ReceiverResultReg)) - || (result == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - abort(); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeXor32 */ -static sqInt -genLowcodeXor32(void) -{ - sqInt first; - sqInt second; - - if (((second = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((second = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((first = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << second)))) == NoReg) { - ssAllocateRequiredReg((first = Arg1Reg)); - } - if ((second == ReceiverResultReg) - || (first == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), second); - ssNativePop(1); - nativePopToReg(ssNativeTop(), first); - ssNativePop(1); - /* begin XorR:R: */ - genoperandoperand(XorRR, second, first); - ssPushNativeRegister(first); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeXor64 */ -static sqInt -genLowcodeXor64(void) -{ - sqInt firstHigh; - sqInt firstLow; - sqInt secondHigh; - sqInt secondLow; - - if (((secondLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((secondLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((secondHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << secondLow)))) == NoReg) { - ssAllocateRequiredReg((secondHigh = Arg1Reg)); - } - if (((firstLow = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)))) == NoReg) { - ssAllocateRequiredReg((firstLow = SendNumArgsReg)); - } - if (((firstHigh = availableRegisterOrNoneFor(backEnd, (((liveRegisters()) | (1U << secondLow)) | (1U << secondHigh)) | (1U << firstLow)))) == NoReg) { - ssAllocateRequiredReg((firstHigh = ClassReg)); - } - if ((((secondLow == ReceiverResultReg) - || (secondHigh == ReceiverResultReg)) - || (firstLow == ReceiverResultReg)) - || (firstHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), secondLow, secondHigh); - ssNativePop(1); - nativePopToRegsecondReg(ssNativeTop(), firstLow, firstHigh); - ssNativePop(1); - /* begin XorR:R: */ - genoperandoperand(XorRR, secondLow, firstLow); - /* begin XorR:R: */ - genoperandoperand(XorRR, secondHigh, firstHigh); - ssPushNativeRegistersecondRegister(firstLow, firstHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend32From16 */ -static sqInt -genLowcodeZeroExtend32From16(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend16R:R: */ - genoperandoperand(ZeroExtend16RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend32From8 */ -static sqInt -genLowcodeZeroExtend32From8(void) -{ - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (value == ReceiverResultReg) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin ZeroExtend8R:R: */ - genoperandoperand(ZeroExtend8RR, value, value); - ssPushNativeRegister(value); - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From16 */ -static sqInt -genLowcodeZeroExtend64From16(void) -{ - AbstractInstruction *anInstruction; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin ZeroExtend16R:R: */ - genoperandoperand(ZeroExtend16RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From32 */ -static sqInt -genLowcodeZeroExtend64From32(void) -{ - AbstractInstruction *anInstruction; - sqInt resultHigh; - sqInt resultLow; - sqInt value; - - if (((value = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((value = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((resultLow = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << value)))) == NoReg) { - ssAllocateRequiredReg((resultLow = Arg1Reg)); - } - if (((resultHigh = availableRegisterOrNoneFor(backEnd, ((liveRegisters()) | (1U << value)) | (1U << resultLow)))) == NoReg) { - ssAllocateRequiredReg((resultHigh = SendNumArgsReg)); - } - if (((value == ReceiverResultReg) - || (resultLow == ReceiverResultReg)) - || (resultHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToReg(ssNativeTop(), value); - ssNativePop(1); - /* begin MoveR:R: */ - genoperandoperand(MoveRR, value, resultLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, resultHigh); - ssPushNativeRegistersecondRegister(resultLow, resultHigh); - - return 0; -} - - -/* Lowcode instruction generator */ - - /* StackToRegisterMappingCogit>>#genLowcodeZeroExtend64From8 */ -static sqInt -genLowcodeZeroExtend64From8(void) -{ - AbstractInstruction *anInstruction; - sqInt valueHigh; - sqInt valueLow; - - if (((valueLow = availableRegisterOrNoneFor(backEnd, liveRegisters()))) == NoReg) { - ssAllocateRequiredReg((valueLow = ((optStatus.isReceiverResultRegLive) - ? Arg0Reg - : ReceiverResultReg))); - } - if (((valueHigh = availableRegisterOrNoneFor(backEnd, (liveRegisters()) | (1U << valueLow)))) == NoReg) { - ssAllocateRequiredReg((valueHigh = Arg1Reg)); - } - if ((valueLow == ReceiverResultReg) - || (valueHigh == ReceiverResultReg)) { - (optStatus.isReceiverResultRegLive = 0); - } - nativePopToRegsecondReg(ssNativeTop(), valueLow, valueHigh); - ssNativePop(1); - /* begin ZeroExtend8R:R: */ - genoperandoperand(ZeroExtend8RR, valueLow, valueLow); - /* begin checkQuickConstant:forInstruction: */ - anInstruction = genoperandoperand(MoveCqR, 0, valueHigh); - ssPushNativeRegistersecondRegister(valueLow, valueHigh); - - return 0; -} - /* StackToRegisterMappingCogit>>#genMarshalledSend:numArgs:sendTable: */ static sqInt NoDbgRegParms genMarshalledSendnumArgssendTable(sqInt selectorIndex, sqInt numArgs, sqInt *sendTable) @@ -37600,7 +38125,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -37886,7 +38412,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -38075,7 +38602,8 @@ genSpecialSelectorComparison(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -38269,7 +38797,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -38340,7 +38869,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -38413,7 +38943,8 @@ genStorePopMaybeContextRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCh ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -38450,7 +38981,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -38475,7 +39007,8 @@ genStorePopRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCheck(sqInt po if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -38621,21 +39154,20 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; (fixup->simNativeStackPtr) = UnknownSimStackPtrFlag; (fixup->simNativeStackSize) = 0; - return fixup; } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ @@ -38864,7 +39396,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -38874,7 +39407,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -38882,7 +39416,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -38921,7 +39456,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -38989,7 +39524,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -39133,9 +39669,8 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; - (self_in_reinitialize->simNativeStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); + (self_in_reinitialize->simNativeStackPtr) = ((self_in_reinitialize->simNativeStackSize) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); @@ -39539,20 +40074,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1U << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushAll */ -static void -ssFlushAll(void) -{ - ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); -} - - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -39598,7 +40119,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -39624,7 +40146,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -39708,6 +40231,13 @@ ssNativeTop(void) return simNativeStackAt(simNativeStackPtr); } + /* StackToRegisterMappingCogit>>#ssNativeValue: */ +static CogSimStackNativeEntry * NoDbgRegParms +ssNativeValue(sqInt n) +{ + return simNativeStackAt(simStackPtr - n); +} + /* StackToRegisterMappingCogit>>#ssPopNativeSize: */ static void NoDbgRegParms ssPopNativeSize(sqInt popSize) @@ -40197,6 +40727,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/spurlowcodesrc/vm/cointerp.c b/spurlowcodesrc/vm/cointerp.c index 48c4d84ca..a92ad6e3a 100644 --- a/spurlowcodesrc/vm/cointerp.c +++ b/spurlowcodesrc/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -732,6 +732,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -904,8 +905,8 @@ static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); -static usqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms copyAndForward(sqInt survivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1166,8 +1167,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1235,6 +1236,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1329,14 +1331,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1465,6 +1468,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1636,8 +1640,8 @@ _iss StackPage * stackPage; _iss sqInt nilObj; _iss usqInt freeStart; _iss sqInt bytecodeSetSelector; -_iss usqInt instructionPointer; _iss sqInt argumentCount; +_iss usqInt instructionPointer; _iss sqInt specialObjectsOop; _iss usqInt newMethod; _iss sqInt messageSelector; @@ -1713,6 +1717,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1721,7 +1726,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1748,6 +1752,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1762,11 +1768,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1801,6 +1805,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1819,7 +1824,6 @@ _iss char * shadowCallStack; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1850,6 +1854,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1865,6 +1870,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2477,7 +2485,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5084,7 +5092,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l3070; + goto l3069; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5132,10 +5140,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l3097; + goto l3096; } ourContext = marryFrameSP(localFP, localSP); - l3097: /* end ensureFrameIsMarried:SP: */; + l3096: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5144,7 +5152,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l3070; + goto l3069; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5153,10 +5161,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l3090; + goto l3089; } ourContext1 = marryFrameSP(localFP, localSP); - l3090: /* end ensureFrameIsMarried:SP: */; + l3089: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5167,7 +5175,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3070; + goto l3069; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -5219,10 +5227,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l3083; + goto l3082; } ourContext2 = marryFrameSP(localFP, localSP); - l3083: /* end ensureFrameIsMarried:SP: */; + l3082: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5231,7 +5239,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l3070; + goto l3069; } } assert(pageListIsWellFormed()); @@ -5336,11 +5344,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3080; + goto l3079; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l3080: /* end maybeReturnToMachineCodeFrame */; + l3079: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5355,7 +5363,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l3070: /* end case */; + l3069: /* end case */; break; case 121: case 345: /*89*/ @@ -5517,27 +5525,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l3103; + goto l3102; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l3103; + goto l3102; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l3103: /* end findFrameAbove:inPage: */; + l3102: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l3111; + goto l3110; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l3111: /* end newStackPage */; + l3110: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5560,7 +5568,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l3099; + goto l3098; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5596,7 +5604,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3099; + goto l3098; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5614,7 +5622,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3099; + goto l3098; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5639,7 +5647,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3099; + goto l3098; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5657,7 +5665,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l3099: /* end case */; + l3098: /* end case */; break; case 126: case 127: @@ -5691,10 +5699,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l3112; + goto l3111; } ourContext = marryFrameSP(theFP, theSP); - l3112: /* end ensureFrameIsMarried:SP: */; + l3111: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6138,12 +6146,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l3130; + goto l3129; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l3130: /* end classAtIndex: */; + l3129: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6164,7 +6172,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3114; + goto l3113; } /* second probe */ @@ -6174,7 +6182,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3114; + goto l3113; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6182,10 +6190,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3114; + goto l3113; } ok = 0; - l3114: /* end inlineLookupInMethodCacheSel:classTag: */; + l3113: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6257,7 +6265,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l3131; + goto l3130; } } /* begin classAtIndex: */ @@ -6270,12 +6278,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l3123; + goto l3122; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l3123: /* end classAtIndex: */; + l3122: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6289,7 +6297,7 @@ interpret(void) addNewMethodToCache(GIV(lkupClass)); } - l3131: /* end internalFindNewMethodOrdinary */; + l3130: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6302,28 +6310,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l3135; + goto l3134; } if (localPrimIndex == 256) { - goto l3135; + goto l3134; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l3135; + goto l3134; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l3135; + goto l3134; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l3135; + goto l3134; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l3135; + goto l3134; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6387,7 +6395,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l3135; + goto l3134; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6469,11 +6477,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l3128; + goto l3127; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l3128: /* end getErrorObjectFromPrimFailCode */; + l3127: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6499,7 +6507,7 @@ interpret(void) } } - l3135: /* end internalExecuteNewMethod */; + l3134: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6951,18 +6959,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7078,7 +7090,7 @@ interpret(void) case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7349,7 +7361,7 @@ interpret(void) sqInt longIndex; sqInt longIndex1; char*memoryPointer; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt newObj1; sqInt newValue; @@ -8540,7 +8552,7 @@ interpret(void) goto l1242; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l1242; } if (fmt >= (firstShortFormat())) { @@ -8555,14 +8567,14 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -16368,7 +16380,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -17085,7 +17097,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3149; + goto l3147; } if (bytecode == 172) { @@ -17094,7 +17106,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3149; + goto l3147; } if (bytecode > 167) { @@ -17104,7 +17116,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3149; + goto l3147; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -17112,7 +17124,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l3149: /* end case */; + l3147: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -17223,7 +17235,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3152; + goto l3150; } if (bytecode == 172) { @@ -17233,14 +17245,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3152; + goto l3150; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l3152: /* end case */; + l3150: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -17890,7 +17902,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -19253,7 +19265,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3153; + goto l3151; } if (bytecode == 239) { @@ -19262,7 +19274,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3153; + goto l3151; } if (bytecode == 238) { @@ -19272,7 +19284,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3153; + goto l3151; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -19280,7 +19292,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l3153: /* end case */; + l3151: /* end case */; break; case 355: /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -19391,7 +19403,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3156; + goto l3154; } if (bytecode == 239) { @@ -19401,14 +19413,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3156; + goto l3154; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l3156: /* end case */; + l3154: /* end case */; break; case 356: /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -20058,7 +20070,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -20880,10 +20892,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l3158; + goto l3156; } ourContext = marryFrameSP(theFP, theSP); - l3158: /* end ensureFrameIsMarried:SP: */; + l3156: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -21117,7 +21129,7 @@ interpret(void) case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -21266,6 +21278,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l1751; } @@ -22196,7 +22209,7 @@ interpret(void) sqInt longIndex; sqInt longIndex1; char*memoryPointer; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt newObj1; sqInt newValue; @@ -23387,7 +23400,7 @@ interpret(void) goto l2056; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l2056; } if (fmt >= (firstShortFormat())) { @@ -23402,14 +23415,14 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -31119,7 +31132,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -31158,7 +31171,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -31170,10 +31182,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l3021; + goto l3011; } context = marryFrameSP(theFP, theSP); - l3021: /* end ensureFrameIsMarried:SP: */; + l3011: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -31201,13 +31213,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l3015; + goto l3020; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l3015: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l3020: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -31265,7 +31277,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -31290,10 +31302,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l3031; + goto l3030; } context = marryFrameSP(theFP, theSP); - l3031: /* end ensureFrameIsMarried:SP: */; + l3030: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -31321,13 +31333,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l3027; + goto l3026; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l3027: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l3026: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -31449,11 +31461,11 @@ interpret(void) value = result; } object2 = value; - goto l3037; + goto l3036; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l3037; + goto l3036; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -31476,7 +31488,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l3037; + goto l3036; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -31484,24 +31496,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l3037; + goto l3036; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l3037; + goto l3036; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); - goto l3037; + goto l3036; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l3037; + goto l3036; } error("bad index"); object2 = 0; - l3037: /* end instVar:ofContext: */; + l3036: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -31605,7 +31617,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l3049; + goto l3048; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -31626,7 +31638,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l3049; + goto l3048; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -31661,7 +31673,7 @@ interpret(void) markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l3049: /* end instVar:ofContext:put: */; + l3048: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -31679,7 +31691,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3052; + goto l3051; } # endif /* IMMUTABILITY */ @@ -31699,7 +31711,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l3052: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l3051: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -31798,7 +31810,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l3059; + goto l3058; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -31819,7 +31831,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l3059; + goto l3058; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -31854,7 +31866,7 @@ interpret(void) markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l3059: /* end instVar:ofContext:put: */; + l3058: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -31872,7 +31884,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3062; + goto l3061; } # endif /* IMMUTABILITY */ @@ -31892,7 +31904,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l3062: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l3061: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -31942,7 +31954,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3063; + goto l3062; } } if (!inverse) { @@ -31951,7 +31963,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3063; + goto l3062; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -31960,7 +31972,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l3063: /* end case */; + l3062: /* end case */; break; } } @@ -32637,7 +32649,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -32659,10 +32670,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -33205,8 +33216,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -33227,8 +33239,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -33591,6 +33604,8 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) sqInt ceNewHashOf(sqInt anObject) { + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); return (((usqInt)(newHashBitsOf(anObject)) << 1) | 1); } @@ -33864,8 +33879,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -34024,7 +34040,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -34141,7 +34156,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -34384,7 +34398,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -34514,18 +34527,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -34610,7 +34627,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -34976,7 +34992,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -35960,7 +35976,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -36074,7 +36090,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) numArgs = ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory()) ? ((mframeCogMethod(theFP))->cmNumArgs) : byteAt((theFP + FoxIFrameFlags) + 1)); - offset = ((sqInt) ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))))); + offset = (FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))); oop = longAt(theFP + offset); if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -37044,7 +37060,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -37647,18 +37663,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -37685,7 +37702,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -38117,7 +38134,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -38182,7 +38199,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -38245,8 +38262,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -38364,7 +38381,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -38815,7 +38832,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -39305,7 +39322,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -39459,6 +39476,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -39661,6 +39681,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -39908,15 +39929,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -39973,6 +40006,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -39985,8 +40019,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -40162,6 +40198,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -40530,7 +40567,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -40622,7 +40659,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -41012,8 +41049,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -41186,6 +41224,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -41506,8 +41545,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41515,14 +41553,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41551,8 +41589,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -41560,14 +41597,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -41598,8 +41635,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -41607,14 +41643,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -43290,8 +43326,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43299,14 +43334,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43330,8 +43365,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43339,14 +43373,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l21; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -43372,8 +43406,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43381,14 +43414,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -43411,6 +43444,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -43863,16 +43897,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -43913,7 +43947,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -44068,7 +44102,7 @@ noInlineSigned32BitValueGutsOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -44458,7 +44492,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -44496,7 +44529,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -45257,8 +45290,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -45437,8 +45470,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -45619,7 +45652,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -45804,8 +45837,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -46204,7 +46237,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -46298,8 +46331,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -46527,7 +46560,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -46794,7 +46827,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -47058,7 +47091,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -47494,7 +47527,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -47504,7 +47537,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -47515,7 +47548,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -47532,7 +47565,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -47544,8 +47577,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47563,7 +47595,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -47681,7 +47713,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -48282,8 +48314,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -48349,7 +48381,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -48407,7 +48439,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -49135,8 +49167,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49144,14 +49175,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49176,8 +49207,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -49185,14 +49215,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49219,8 +49249,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49228,14 +49257,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -49267,7 +49296,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -49475,13 +49504,13 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -49686,7 +49715,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))); @@ -49741,13 +49770,13 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -49952,7 +49981,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))); @@ -50003,14 +50032,14 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -50250,7 +50279,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))); @@ -50334,6 +50363,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -50566,7 +50642,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -50752,7 +50828,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -50927,7 +51003,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -51071,7 +51147,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - usqInt value; + sqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -51090,7 +51166,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; } @@ -52011,7 +52087,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -52247,7 +52323,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -52557,7 +52633,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -52651,7 +52727,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -52712,7 +52788,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -52856,8 +52932,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52865,18 +52940,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -52899,8 +52974,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -52908,18 +52982,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -52931,8 +53005,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -52940,22 +53013,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -53179,7 +53252,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -53195,28 +53268,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = ((usqInt) numSlots2) >> 1; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ setIsMarkedOfto(stack, 1); current = GIV(specialObjectsOop); @@ -53231,28 +53304,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots3) >> 1; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -53262,7 +53335,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -53272,7 +53344,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -53311,7 +53382,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & 1) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -53333,7 +53404,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -53370,28 +53441,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots) >> 1; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -53406,13 +53477,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 1); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -54395,7 +54466,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -54456,7 +54527,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -55684,7 +55755,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -56792,8 +56863,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56801,14 +56871,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56833,8 +56903,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56842,14 +56911,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56876,8 +56945,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56885,14 +56953,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -57151,7 +57219,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -57398,8 +57466,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -57407,14 +57474,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57435,8 +57502,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57444,14 +57510,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57474,8 +57540,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57483,14 +57548,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -57633,18 +57698,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1))) != 7)) { return 0; @@ -57715,8 +57784,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -58124,7 +58192,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; sqInt newFormat; sqInt normalizedInstFormat; @@ -58370,7 +58438,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -58466,7 +58534,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -58482,7 +58550,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -58493,7 +58561,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -58947,8 +59015,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -58956,14 +59023,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58986,8 +59053,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -58995,14 +59061,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -59048,8 +59114,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59057,14 +59122,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -59197,7 +59262,6 @@ copyAndForwardMourner(sqInt mourner) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -59227,12 +59291,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -59262,16 +59325,15 @@ copyAndForwardMourner(sqInt mourner) then corpse is threaded onto the weakList for later treatment. */ /* SpurGenerationScavenger>>#copyAndForward: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForward(sqInt survivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; unsigned int header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -59317,12 +59379,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -59357,12 +59418,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -59560,7 +59621,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -60074,7 +60135,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -60090,8 +60151,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60219,7 +60279,7 @@ scavengeReferentsOf(sqInt referrer) sqInt header; sqInt header1; sqInt i; - usqInt newLocation; + sqInt newLocation; sqInt numLiterals; sqInt numSlots; usqInt numSlots1; @@ -60545,8 +60605,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60554,14 +60613,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -60587,8 +60646,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60596,14 +60654,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -60618,8 +60676,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -60627,14 +60684,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -61008,7 +61065,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -61016,7 +61073,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -61027,8 +61084,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61069,8 +61125,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -61078,14 +61133,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -61124,8 +61179,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -61172,8 +61226,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61181,14 +61234,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -61237,8 +61290,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -61246,14 +61298,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -61299,8 +61351,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -61354,8 +61405,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -61363,14 +61413,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -61429,7 +61479,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -61446,7 +61496,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -61546,8 +61596,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61583,8 +61632,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -61592,14 +61640,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -61636,8 +61684,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -61645,14 +61692,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -61682,8 +61729,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61691,14 +61737,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -61809,8 +61855,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61818,14 +61863,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -61849,8 +61894,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61858,14 +61902,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -61891,8 +61935,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -61900,14 +61943,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -61949,8 +61992,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61958,14 +62000,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -63053,8 +63095,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -63062,14 +63103,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63114,8 +63155,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -63123,14 +63163,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -63210,8 +63250,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -63219,14 +63258,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -63382,12 +63421,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -63430,8 +63469,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -63439,14 +63477,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63497,12 +63535,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -63545,8 +63583,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -63554,14 +63591,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -63655,12 +63692,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -63720,8 +63757,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -63729,14 +63765,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -63786,7 +63822,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -63827,7 +63863,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -64421,8 +64457,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64430,14 +64465,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -64863,8 +64898,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64872,14 +64906,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64911,8 +64945,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -64920,14 +64953,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64961,8 +64994,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -64970,14 +65002,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -65263,7 +65295,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -65519,8 +65550,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -65528,14 +65558,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -65558,8 +65588,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -65567,14 +65596,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -65810,8 +65839,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -65819,14 +65847,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -65859,8 +65887,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -65868,14 +65895,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -65910,8 +65937,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -65919,14 +65945,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -66006,8 +66032,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -66015,14 +66040,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66052,8 +66077,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -66061,14 +66085,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66100,8 +66124,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -66109,14 +66132,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -66676,7 +66699,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -67001,8 +67024,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -67010,14 +67032,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -67040,8 +67062,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -67049,14 +67070,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -67081,8 +67102,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -67090,14 +67110,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -67155,7 +67175,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -67163,7 +67183,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -67202,10 +67222,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -67256,8 +67276,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -67265,14 +67284,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -67309,11 +67328,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -68777,8 +68796,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -68800,8 +68818,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -68845,7 +68862,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop1 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -68853,7 +68870,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex1 & TopHashBit) { if ((classIndex1 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex1 - TopHashBit)) << (shiftForWord()))))); @@ -68861,7 +68878,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } else { @@ -68869,11 +68886,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex1 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) { @@ -68883,7 +68900,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -68891,11 +68908,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } } assert(!(isOopForwarded(objOop1))); @@ -68908,8 +68925,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -68917,17 +68933,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l22; + goto l23; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l26: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -68951,7 +68967,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -68968,7 +68984,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -68989,8 +69005,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -68998,17 +69013,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -69016,8 +69031,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -69025,17 +69039,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -69055,7 +69069,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop2)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -69115,8 +69128,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -69124,14 +69136,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l33; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l33: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -69257,8 +69269,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -69266,14 +69277,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -69303,8 +69314,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -69312,14 +69322,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -69342,8 +69352,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -69351,14 +69360,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -69464,8 +69473,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -69473,14 +69481,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -69534,8 +69542,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -69543,14 +69550,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -69606,8 +69613,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -69615,14 +69621,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -69763,7 +69769,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -69789,7 +69795,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -69814,7 +69820,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -69840,7 +69846,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -69863,8 +69869,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -69872,14 +69877,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -70359,7 +70364,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -70601,7 +70606,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -70974,8 +70979,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71011,7 +71015,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -71026,7 +71030,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -71290,8 +71294,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71313,8 +71316,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71337,8 +71339,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -71359,8 +71360,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -71438,8 +71438,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71447,14 +71446,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71476,8 +71475,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71485,14 +71483,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -71517,8 +71515,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71526,14 +71523,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -71642,8 +71639,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71729,8 +71725,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71738,14 +71733,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -71780,8 +71775,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -71789,14 +71783,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71824,8 +71818,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71833,14 +71826,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -71983,8 +71976,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -72473,8 +72465,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -72482,14 +72473,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72520,8 +72511,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -72529,14 +72519,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -72569,8 +72559,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -72578,14 +72567,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -72689,8 +72678,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -72698,14 +72686,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72743,8 +72731,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -72752,14 +72739,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -72799,8 +72786,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -72808,14 +72794,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -72941,8 +72927,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -72950,14 +72935,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -72987,8 +72972,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -72996,14 +72980,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73026,8 +73010,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -73035,14 +73018,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -73118,8 +73101,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -73127,14 +73109,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73162,8 +73144,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -73171,14 +73152,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -73201,8 +73182,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -73210,14 +73190,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -73563,8 +73543,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -73572,14 +73551,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -73609,8 +73588,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -73618,14 +73596,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73648,8 +73626,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -73657,14 +73634,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -73790,8 +73767,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -73799,14 +73775,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73835,8 +73811,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -73844,14 +73819,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -73882,8 +73857,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -73891,14 +73865,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -73981,8 +73955,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -73990,14 +73963,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74033,8 +74006,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -74042,14 +74014,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -74087,8 +74059,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -74096,14 +74067,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -74187,8 +74158,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -74196,14 +74166,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -74233,8 +74203,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -74242,14 +74211,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74272,8 +74241,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -74281,14 +74249,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -74498,8 +74466,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -74507,14 +74474,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -74542,8 +74509,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -74551,14 +74517,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74579,8 +74545,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -74588,14 +74553,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -74670,13 +74635,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -74684,15 +74649,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -74709,7 +74674,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -74733,8 +74698,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -74742,14 +74706,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74770,13 +74734,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -74784,15 +74748,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -74809,7 +74773,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -74833,8 +74797,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -74842,14 +74805,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -74871,13 +74834,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -74885,15 +74848,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -74910,7 +74873,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -74935,8 +74898,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -74944,14 +74906,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -75362,7 +75324,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -75372,8 +75333,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -75424,7 +75384,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -75617,6 +75577,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -75732,7 +75702,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -75749,7 +75719,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -75773,7 +75743,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -75790,7 +75760,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -75856,8 +75826,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -76020,7 +75989,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -76702,11 +76671,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -76721,7 +76690,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -76735,8 +76704,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -76744,16 +76712,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -76777,8 +76745,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -76786,14 +76753,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -76813,16 +76780,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -76831,11 +76798,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -76843,7 +76810,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -76911,8 +76878,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -76920,14 +76886,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -77026,8 +76992,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -77047,8 +77012,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -77056,14 +77020,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -77121,8 +77085,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -77199,7 +77162,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -77221,7 +77184,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -77270,7 +77233,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -77284,8 +77247,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -77293,16 +77255,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -77367,8 +77329,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -77376,14 +77337,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -77402,9 +77363,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -77420,9 +77378,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -77450,9 +77407,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -77463,8 +77419,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -77474,9 +77429,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -77534,7 +77488,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -77609,8 +77563,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -77666,8 +77619,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -77675,14 +77627,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -77745,8 +77697,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -77754,14 +77705,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -77878,8 +77829,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -77887,14 +77837,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -77934,7 +77884,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -78100,13 +78050,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l66; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l66: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l65; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -78114,15 +78064,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l65; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l65; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l65; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -78139,7 +78089,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals1 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l65: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -78166,8 +78116,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -78175,14 +78124,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -78194,7 +78143,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -78207,13 +78156,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -78221,15 +78170,15 @@ updatePointers(void) numPointerSlots2 = (numSlots5 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots5); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -78246,7 +78195,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals2 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -78274,8 +78223,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots22 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots22 + (numSlots22 & 1)) << (shiftForWord()); @@ -78283,16 +78231,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l39; + goto l40; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l39: /* end objectAfter:limit: */; + l40: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -78333,13 +78281,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -78347,15 +78295,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -78372,7 +78320,7 @@ updatePointers(void) assert((header4 & 1)); numLiterals3 = ((header4 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -78409,8 +78357,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -78445,7 +78392,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -78458,8 +78405,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -78467,18 +78413,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -78501,13 +78447,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -78515,15 +78461,15 @@ updatePointers(void) numPointerSlots = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -78540,7 +78486,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i = 0; i < numPointerSlots; i += 1) { /* begin fetchPointer:ofObject: */ oop = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))); @@ -78569,8 +78515,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -78578,14 +78523,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } } @@ -78787,8 +78732,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -78796,14 +78740,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -78888,7 +78832,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -78988,8 +78932,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -79156,7 +79100,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -79272,8 +79216,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -79281,24 +79224,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -79361,8 +79304,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -79591,8 +79534,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); @@ -79993,8 +79936,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -80002,14 +79944,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -80030,8 +79972,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -80039,14 +79980,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -80069,8 +80010,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -80078,14 +80018,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -80800,7 +80740,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -80810,7 +80750,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -80898,9 +80838,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -81006,6 +80946,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -81627,8 +81596,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -81636,14 +81604,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -81695,8 +81663,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -81704,14 +81671,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -81765,8 +81732,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -81774,20 +81740,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -81820,8 +81786,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -81829,14 +81794,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -81861,8 +81826,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -81870,14 +81834,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -81904,8 +81868,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -81913,16 +81876,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -82047,8 +82010,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -82122,8 +82086,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -82213,8 +82178,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -83576,8 +83542,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -84649,7 +84616,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -84826,7 +84793,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -84996,7 +84963,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -85164,7 +85131,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -85373,7 +85340,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -85720,8 +85687,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -85774,11 +85742,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -85804,11 +85770,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -86007,18 +85971,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -86174,7 +86139,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -86359,6 +86324,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -86414,7 +86412,7 @@ popthenPush(sqInt nItems, sqInt oop) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -86866,8 +86864,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -86875,14 +86872,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -86913,8 +86910,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -86922,14 +86918,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -86953,8 +86949,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -86962,14 +86957,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -87698,7 +87693,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -87709,23 +87704,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -87741,38 +87736,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -87785,7 +87780,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -87793,7 +87788,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -87804,7 +87799,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -87818,7 +87813,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -87831,12 +87826,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -87847,7 +87842,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -87855,9 +87850,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -87871,8 +87866,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -87880,14 +87874,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -87934,7 +87928,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -87945,23 +87939,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -87977,38 +87971,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -88021,7 +88015,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -88029,7 +88023,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -88040,7 +88034,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -88054,7 +88048,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -88067,12 +88061,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -88083,7 +88077,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -88091,9 +88085,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -88107,8 +88101,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -88116,14 +88109,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -88171,7 +88164,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -88182,23 +88175,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -88214,38 +88207,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -88258,7 +88251,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -88266,7 +88259,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -88277,7 +88270,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -88291,7 +88284,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -88304,12 +88297,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -88320,7 +88313,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -88328,9 +88321,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -88345,8 +88338,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -88354,14 +88346,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -89666,11 +89658,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -89762,7 +89756,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - signed char accessorDepth; + sqInt accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -89814,7 +89808,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); header = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); if ((header & 1)) { @@ -89925,14 +89919,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -89949,6 +89952,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -89961,21 +89965,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -89991,12 +89999,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -90012,6 +90023,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -90025,11 +90037,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -90055,6 +90070,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -91480,7 +91499,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -91595,7 +91614,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -92717,8 +92736,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -94839,7 +94858,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -95196,7 +95215,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -95233,7 +95252,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -95536,7 +95555,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -95688,7 +95707,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -95892,7 +95911,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -96184,8 +96203,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -96235,8 +96255,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -96373,6 +96395,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -96382,165 +96405,134 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer = floatObjectOf(getCogCodeZoneThreshold()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (16U << (shiftForWord())), valuePointer); + /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -96548,9 +96540,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -96558,22 +96550,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -96581,192 +96573,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -96795,7 +96692,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -96828,14 +96725,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { result = ConstZero; } + if (arg == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -96911,7 +96811,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -97025,47 +96925,41 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l85; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l85: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -97120,7 +97014,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -97142,12 +97037,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l66; + goto l78; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l66: /* end setCogVMFlags: */; + l78: /* end setCogVMFlags: */; } } if (index == 49) { @@ -97170,14 +97065,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l83; + goto l86; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l83: /* end floatValueOf: */; + l86: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -97388,8 +97283,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -97397,14 +97291,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -97439,8 +97333,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -97448,14 +97341,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -97483,8 +97376,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -97492,14 +97384,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -97524,6 +97416,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -97571,6 +97464,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spurlowcodesrc/vm/cointerp.h b/spurlowcodesrc/vm/cointerp.h index cf42e9040..7adcf7551 100644 --- a/spurlowcodesrc/vm/cointerp.h +++ b/spurlowcodesrc/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ @@ -230,7 +230,7 @@ extern void NeverInline NeverInline markAndTrace(sqInt objOop); extern sqInt maybeSplObj(sqInt index); extern sqInt nilObject(void); extern sqInt nonIndexablePointerFormat(void); -extern usqInt numBytesOf(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); extern sqInt numStrongSlotsOfWeakling(sqInt objOop); @@ -285,8 +285,9 @@ extern sqInt argumentCountOf(sqInt methodPointer); extern sqInt canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader); extern sqInt checkAllAccessibleObjectsOkay(void); extern sqInt checkOkayInterpreterObjects(sqInt writeBack); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt disownVM(sqInt flags); extern sqInt doSignalSemaphoreWithIndex(sqInt index); extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ; extern usqLong getNextWakeupUsecs(void); @@ -311,6 +312,7 @@ extern sqInt methodClassOf(sqInt methodPointer); extern sqInt methodPrimitiveIndex(void); extern sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); extern sqInt objCouldBeClassObj(sqInt objOop); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); @@ -352,6 +354,9 @@ VM_EXPORT sqInt breakSelectorLength ; VM_EXPORT sqInt checkAllocFiller; VM_EXPORT sqInt checkedPluginName; VM_EXPORT sqInt checkForLeaks; +VM_EXPORT sqInt debugCallbackInvokes; +VM_EXPORT sqInt debugCallbackPath; +VM_EXPORT sqInt debugCallbackReturns; VM_EXPORT sqInt deferDisplayUpdates; VM_EXPORT sqInt desiredCogCodeSize; VM_EXPORT sqInt desiredEdenBytes; diff --git a/spurlowcodesrc/vm/gcc3x-cointerp.c b/spurlowcodesrc/vm/gcc3x-cointerp.c index 775e7000e..1aa80bd91 100644 --- a/spurlowcodesrc/vm/gcc3x-cointerp.c +++ b/spurlowcodesrc/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -735,6 +735,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -907,8 +908,8 @@ static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); -static usqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms copyAndForward(sqInt survivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1169,8 +1170,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1238,6 +1239,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1332,14 +1334,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1468,6 +1471,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1639,8 +1643,8 @@ _iss StackPage * stackPage; _iss sqInt nilObj; _iss usqInt freeStart; _iss sqInt bytecodeSetSelector; -_iss usqInt instructionPointer; _iss sqInt argumentCount; +_iss usqInt instructionPointer; _iss sqInt specialObjectsOop; _iss usqInt newMethod; _iss sqInt messageSelector; @@ -1716,6 +1720,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1724,7 +1729,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1751,6 +1755,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1765,11 +1771,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1804,6 +1808,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1822,7 +1827,6 @@ _iss char * shadowCallStack; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1853,6 +1857,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1868,6 +1873,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2480,7 +2488,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5093,7 +5101,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l3070; + goto l3069; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5141,10 +5149,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l3097; + goto l3096; } ourContext = marryFrameSP(localFP, localSP); - l3097: /* end ensureFrameIsMarried:SP: */; + l3096: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5153,7 +5161,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l3070; + goto l3069; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5162,10 +5170,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l3090; + goto l3089; } ourContext1 = marryFrameSP(localFP, localSP); - l3090: /* end ensureFrameIsMarried:SP: */; + l3089: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5176,7 +5184,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3070; + goto l3069; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -5228,10 +5236,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l3083; + goto l3082; } ourContext2 = marryFrameSP(localFP, localSP); - l3083: /* end ensureFrameIsMarried:SP: */; + l3082: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5240,7 +5248,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l3070; + goto l3069; } } assert(pageListIsWellFormed()); @@ -5345,11 +5353,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3080; + goto l3079; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l3080: /* end maybeReturnToMachineCodeFrame */; + l3079: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5364,7 +5372,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l3070: /* end case */; + l3069: /* end case */; BREAK; CASE(121) CASE(345) /*89*/ @@ -5526,27 +5534,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l3103; + goto l3102; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l3103; + goto l3102; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l3103: /* end findFrameAbove:inPage: */; + l3102: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l3111; + goto l3110; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l3111: /* end newStackPage */; + l3110: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5569,7 +5577,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l3099; + goto l3098; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5605,7 +5613,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3099; + goto l3098; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5623,7 +5631,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3099; + goto l3098; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5648,7 +5656,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l3099; + goto l3098; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5666,7 +5674,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l3099: /* end case */; + l3098: /* end case */; BREAK; CASE(126) CASE(127) @@ -5700,10 +5708,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l3112; + goto l3111; } ourContext = marryFrameSP(theFP, theSP); - l3112: /* end ensureFrameIsMarried:SP: */; + l3111: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6147,12 +6155,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l3130; + goto l3129; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l3130: /* end classAtIndex: */; + l3129: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6173,7 +6181,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3114; + goto l3113; } /* second probe */ @@ -6183,7 +6191,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3114; + goto l3113; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6191,10 +6199,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l3114; + goto l3113; } ok = 0; - l3114: /* end inlineLookupInMethodCacheSel:classTag: */; + l3113: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6266,7 +6274,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l3131; + goto l3130; } } /* begin classAtIndex: */ @@ -6279,12 +6287,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l3123; + goto l3122; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l3123: /* end classAtIndex: */; + l3122: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6298,7 +6306,7 @@ interpret(void) addNewMethodToCache(GIV(lkupClass)); } - l3131: /* end internalFindNewMethodOrdinary */; + l3130: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6311,28 +6319,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l3135; + goto l3134; } if (localPrimIndex == 256) { - goto l3135; + goto l3134; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l3135; + goto l3134; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l3135; + goto l3134; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l3135; + goto l3134; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l3135; + goto l3134; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6396,7 +6404,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l3135; + goto l3134; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6478,11 +6486,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l3128; + goto l3127; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l3128: /* end getErrorObjectFromPrimFailCode */; + l3127: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6508,7 +6516,7 @@ interpret(void) } } - l3135: /* end internalExecuteNewMethod */; + l3134: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6960,18 +6968,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7087,7 +7099,7 @@ interpret(void) CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7358,7 +7370,7 @@ interpret(void) sqInt longIndex; sqInt longIndex1; char*memoryPointer; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt newObj1; sqInt newValue; @@ -8549,7 +8561,7 @@ interpret(void) goto l1242; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l1242; } if (fmt >= (firstShortFormat())) { @@ -8564,14 +8576,14 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -16377,7 +16389,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -17094,7 +17106,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3149; + goto l3147; } if (bytecode == 172) { @@ -17103,7 +17115,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3149; + goto l3147; } if (bytecode > 167) { @@ -17113,7 +17125,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3149; + goto l3147; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -17121,7 +17133,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l3149: /* end case */; + l3147: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -17232,7 +17244,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3152; + goto l3150; } if (bytecode == 172) { @@ -17242,14 +17254,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3152; + goto l3150; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l3152: /* end case */; + l3150: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -17899,7 +17911,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -19262,7 +19274,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3153; + goto l3151; } if (bytecode == 239) { @@ -19271,7 +19283,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3153; + goto l3151; } if (bytecode == 238) { @@ -19281,7 +19293,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3153; + goto l3151; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -19289,7 +19301,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l3153: /* end case */; + l3151: /* end case */; BREAK; CASE(355) /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -19400,7 +19412,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3156; + goto l3154; } if (bytecode == 239) { @@ -19410,14 +19422,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l3156; + goto l3154; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l3156: /* end case */; + l3154: /* end case */; BREAK; CASE(356) /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -20067,7 +20079,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -20889,10 +20901,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l3158; + goto l3156; } ourContext = marryFrameSP(theFP, theSP); - l3158: /* end ensureFrameIsMarried:SP: */; + l3156: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -21126,7 +21138,7 @@ interpret(void) CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -21275,6 +21287,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l1751; } @@ -22205,7 +22218,7 @@ interpret(void) sqInt longIndex; sqInt longIndex1; char*memoryPointer; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt newObj1; sqInt newValue; @@ -23396,7 +23409,7 @@ interpret(void) goto l2056; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l2056; } if (fmt >= (firstShortFormat())) { @@ -23411,14 +23424,14 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -31128,7 +31141,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -31167,7 +31180,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -31179,10 +31191,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l3021; + goto l3011; } context = marryFrameSP(theFP, theSP); - l3021: /* end ensureFrameIsMarried:SP: */; + l3011: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -31210,13 +31222,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l3015; + goto l3020; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l3015: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l3020: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -31274,7 +31286,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -31299,10 +31311,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l3031; + goto l3030; } context = marryFrameSP(theFP, theSP); - l3031: /* end ensureFrameIsMarried:SP: */; + l3030: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -31330,13 +31342,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l3027; + goto l3026; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l3027: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l3026: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -31458,11 +31470,11 @@ interpret(void) value = result; } object2 = value; - goto l3037; + goto l3036; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l3037; + goto l3036; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -31485,7 +31497,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l3037; + goto l3036; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -31493,24 +31505,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l3037; + goto l3036; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l3037; + goto l3036; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); - goto l3037; + goto l3036; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l3037; + goto l3036; } error("bad index"); object2 = 0; - l3037: /* end instVar:ofContext: */; + l3036: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -31614,7 +31626,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l3049; + goto l3048; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -31635,7 +31647,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l3049; + goto l3048; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -31670,7 +31682,7 @@ interpret(void) markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l3049: /* end instVar:ofContext:put: */; + l3048: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -31688,7 +31700,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3052; + goto l3051; } # endif /* IMMUTABILITY */ @@ -31708,7 +31720,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l3052: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l3051: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -31807,7 +31819,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l3059; + goto l3058; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -31828,7 +31840,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l3059; + goto l3058; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -31863,7 +31875,7 @@ interpret(void) markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l3059: /* end instVar:ofContext:put: */; + l3058: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -31881,7 +31893,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l3062; + goto l3061; } # endif /* IMMUTABILITY */ @@ -31901,7 +31913,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l3062: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l3061: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -31951,7 +31963,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3063; + goto l3062; } } if (!inverse) { @@ -31960,7 +31972,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l3063; + goto l3062; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -31969,7 +31981,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l3063: /* end case */; + l3062: /* end case */; BREAK; } } @@ -32646,7 +32658,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -32668,10 +32679,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -33214,8 +33225,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -33236,8 +33248,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -33600,6 +33613,8 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) sqInt ceNewHashOf(sqInt anObject) { + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); return (((usqInt)(newHashBitsOf(anObject)) << 1) | 1); } @@ -33873,8 +33888,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -34033,7 +34049,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -34150,7 +34165,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -34393,7 +34407,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -34523,18 +34536,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -34619,7 +34636,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -34985,7 +35001,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -35969,7 +35985,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -36083,7 +36099,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) numArgs = ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory()) ? ((mframeCogMethod(theFP))->cmNumArgs) : byteAt((theFP + FoxIFrameFlags) + 1)); - offset = ((sqInt) ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))))); + offset = (FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))); oop = longAt(theFP + offset); if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -37053,7 +37069,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -37656,18 +37672,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -37694,7 +37711,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -38126,7 +38143,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -38191,7 +38208,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -38254,8 +38271,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -38373,7 +38390,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -38824,7 +38841,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -39314,7 +39331,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -39468,6 +39485,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -39670,6 +39690,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -39917,15 +39938,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -39982,6 +40015,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -39994,8 +40028,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -40171,6 +40207,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -40539,7 +40576,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -40631,7 +40668,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -41021,8 +41058,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -41195,6 +41233,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -41515,8 +41554,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41524,14 +41562,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41560,8 +41598,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -41569,14 +41606,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -41607,8 +41644,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -41616,14 +41652,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -43299,8 +43335,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43308,14 +43343,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43339,8 +43374,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43348,14 +43382,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l21; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -43381,8 +43415,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43390,14 +43423,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -43420,6 +43453,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -43872,16 +43906,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -43922,7 +43956,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -44077,7 +44111,7 @@ noInlineSigned32BitValueGutsOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -44467,7 +44501,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -44505,7 +44538,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -45266,8 +45299,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -45446,8 +45479,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -45628,7 +45661,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -45813,8 +45846,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -46213,7 +46246,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -46307,8 +46340,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -46536,7 +46569,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -46803,7 +46836,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -47067,7 +47100,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -47503,7 +47536,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -47513,7 +47546,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -47524,7 +47557,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -47541,7 +47574,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -47553,8 +47586,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47572,7 +47604,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -47690,7 +47722,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -48291,8 +48323,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -48358,7 +48390,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -48416,7 +48448,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -49144,8 +49176,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49153,14 +49184,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49185,8 +49216,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -49194,14 +49224,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49228,8 +49258,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49237,14 +49266,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -49276,7 +49305,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -49484,13 +49513,13 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -49695,7 +49724,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))); @@ -49750,13 +49779,13 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -49961,7 +49990,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))); @@ -50012,14 +50041,14 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -50259,7 +50288,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))); @@ -50343,6 +50372,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -50575,7 +50651,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -50761,7 +50837,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -50936,7 +51012,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -51080,7 +51156,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - usqInt value; + sqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -51099,7 +51175,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; } @@ -52020,7 +52096,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -52256,7 +52332,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -52566,7 +52642,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -52660,7 +52736,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -52721,7 +52797,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -52865,8 +52941,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52874,18 +52949,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -52908,8 +52983,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -52917,18 +52991,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -52940,8 +53014,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -52949,22 +53022,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -53188,7 +53261,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -53204,28 +53277,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = ((usqInt) numSlots2) >> 1; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ setIsMarkedOfto(stack, 1); current = GIV(specialObjectsOop); @@ -53240,28 +53313,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots3) >> 1; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -53271,7 +53344,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -53281,7 +53353,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -53320,7 +53391,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & 1) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -53342,7 +53413,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -53379,28 +53450,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots) >> 1; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -53415,13 +53486,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 1); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -54404,7 +54475,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -54465,7 +54536,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -55693,7 +55764,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -56801,8 +56872,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56810,14 +56880,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56842,8 +56912,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56851,14 +56920,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56885,8 +56954,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56894,14 +56962,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -57160,7 +57228,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -57407,8 +57475,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -57416,14 +57483,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57444,8 +57511,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57453,14 +57519,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57483,8 +57549,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57492,14 +57557,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -57642,18 +57707,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1))) != 7)) { return 0; @@ -57724,8 +57793,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -58133,7 +58201,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; sqInt newFormat; sqInt normalizedInstFormat; @@ -58379,7 +58447,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -58475,7 +58543,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -58491,7 +58559,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -58502,7 +58570,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -58956,8 +59024,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -58965,14 +59032,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58995,8 +59062,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59004,14 +59070,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -59057,8 +59123,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59066,14 +59131,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -59206,7 +59271,6 @@ copyAndForwardMourner(sqInt mourner) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -59236,12 +59300,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -59271,16 +59334,15 @@ copyAndForwardMourner(sqInt mourner) then corpse is threaded onto the weakList for later treatment. */ /* SpurGenerationScavenger>>#copyAndForward: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForward(sqInt survivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; unsigned int header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -59326,12 +59388,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -59366,12 +59427,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -59569,7 +59630,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -60083,7 +60144,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -60099,8 +60160,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60228,7 +60288,7 @@ scavengeReferentsOf(sqInt referrer) sqInt header; sqInt header1; sqInt i; - usqInt newLocation; + sqInt newLocation; sqInt numLiterals; sqInt numSlots; usqInt numSlots1; @@ -60554,8 +60614,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60563,14 +60622,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -60596,8 +60655,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60605,14 +60663,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -60627,8 +60685,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -60636,14 +60693,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -61017,7 +61074,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -61025,7 +61082,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -61036,8 +61093,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61078,8 +61134,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -61087,14 +61142,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -61133,8 +61188,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -61181,8 +61235,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61190,14 +61243,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -61246,8 +61299,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -61255,14 +61307,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -61308,8 +61360,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -61363,8 +61414,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -61372,14 +61422,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -61438,7 +61488,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -61455,7 +61505,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -61555,8 +61605,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61592,8 +61641,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -61601,14 +61649,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -61645,8 +61693,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -61654,14 +61701,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -61691,8 +61738,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61700,14 +61746,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -61818,8 +61864,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61827,14 +61872,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -61858,8 +61903,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61867,14 +61911,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -61900,8 +61944,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -61909,14 +61952,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -61958,8 +62001,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61967,14 +62009,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -63062,8 +63104,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -63071,14 +63112,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63123,8 +63164,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -63132,14 +63172,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -63219,8 +63259,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -63228,14 +63267,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -63391,12 +63430,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -63439,8 +63478,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -63448,14 +63486,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63506,12 +63544,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -63554,8 +63592,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -63563,14 +63600,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -63664,12 +63701,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -63729,8 +63766,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -63738,14 +63774,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -63795,7 +63831,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -63836,7 +63872,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -64430,8 +64466,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64439,14 +64474,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -64872,8 +64907,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64881,14 +64915,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64920,8 +64954,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -64929,14 +64962,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64970,8 +65003,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -64979,14 +65011,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -65272,7 +65304,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -65528,8 +65559,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -65537,14 +65567,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -65567,8 +65597,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -65576,14 +65605,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -65819,8 +65848,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -65828,14 +65856,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -65868,8 +65896,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -65877,14 +65904,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -65919,8 +65946,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -65928,14 +65954,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -66015,8 +66041,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -66024,14 +66049,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66061,8 +66086,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -66070,14 +66094,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66109,8 +66133,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -66118,14 +66141,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -66685,7 +66708,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -67010,8 +67033,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -67019,14 +67041,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -67049,8 +67071,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -67058,14 +67079,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -67090,8 +67111,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -67099,14 +67119,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -67164,7 +67184,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -67172,7 +67192,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -67211,10 +67231,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -67265,8 +67285,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -67274,14 +67293,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -67318,11 +67337,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -68786,8 +68805,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -68809,8 +68827,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -68854,7 +68871,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop1 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -68862,7 +68879,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex1 & TopHashBit) { if ((classIndex1 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex1 - TopHashBit)) << (shiftForWord()))))); @@ -68870,7 +68887,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } else { @@ -68878,11 +68895,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex1 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) { @@ -68892,7 +68909,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -68900,11 +68917,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } } assert(!(isOopForwarded(objOop1))); @@ -68917,8 +68934,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -68926,17 +68942,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l22; + goto l23; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l26: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -68960,7 +68976,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -68977,7 +68993,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -68998,8 +69014,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -69007,17 +69022,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -69025,8 +69040,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -69034,17 +69048,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -69064,7 +69078,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop2)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -69124,8 +69137,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -69133,14 +69145,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l33; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l33: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -69266,8 +69278,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -69275,14 +69286,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -69312,8 +69323,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -69321,14 +69331,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -69351,8 +69361,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -69360,14 +69369,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -69473,8 +69482,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -69482,14 +69490,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -69543,8 +69551,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -69552,14 +69559,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -69615,8 +69622,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -69624,14 +69630,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -69772,7 +69778,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -69798,7 +69804,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -69823,7 +69829,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -69849,7 +69855,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -69872,8 +69878,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -69881,14 +69886,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -70368,7 +70373,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -70610,7 +70615,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -70983,8 +70988,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71020,7 +71024,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -71035,7 +71039,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -71299,8 +71303,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71322,8 +71325,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71346,8 +71348,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -71368,8 +71369,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -71447,8 +71447,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71456,14 +71455,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71485,8 +71484,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71494,14 +71492,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -71526,8 +71524,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71535,14 +71532,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -71651,8 +71648,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71738,8 +71734,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71747,14 +71742,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -71789,8 +71784,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -71798,14 +71792,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71833,8 +71827,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71842,14 +71835,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -71992,8 +71985,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -72482,8 +72474,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -72491,14 +72482,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72529,8 +72520,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -72538,14 +72528,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -72578,8 +72568,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -72587,14 +72576,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -72698,8 +72687,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -72707,14 +72695,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72752,8 +72740,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -72761,14 +72748,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -72808,8 +72795,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -72817,14 +72803,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -72950,8 +72936,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -72959,14 +72944,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -72996,8 +72981,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -73005,14 +72989,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73035,8 +73019,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -73044,14 +73027,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -73127,8 +73110,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -73136,14 +73118,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73171,8 +73153,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -73180,14 +73161,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -73210,8 +73191,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -73219,14 +73199,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -73572,8 +73552,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -73581,14 +73560,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -73618,8 +73597,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -73627,14 +73605,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73657,8 +73635,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -73666,14 +73643,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -73799,8 +73776,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -73808,14 +73784,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -73844,8 +73820,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -73853,14 +73828,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -73891,8 +73866,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -73900,14 +73874,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -73990,8 +73964,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -73999,14 +73972,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74042,8 +74015,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -74051,14 +74023,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -74096,8 +74068,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -74105,14 +74076,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -74196,8 +74167,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -74205,14 +74175,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -74242,8 +74212,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -74251,14 +74220,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74281,8 +74250,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -74290,14 +74258,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -74507,8 +74475,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -74516,14 +74483,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -74551,8 +74518,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -74560,14 +74526,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74588,8 +74554,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -74597,14 +74562,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -74679,13 +74644,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -74693,15 +74658,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -74718,7 +74683,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -74742,8 +74707,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -74751,14 +74715,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -74779,13 +74743,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -74793,15 +74757,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -74818,7 +74782,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -74842,8 +74806,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -74851,14 +74814,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -74880,13 +74843,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -74894,15 +74857,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -74919,7 +74882,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -74944,8 +74907,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -74953,14 +74915,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -75371,7 +75333,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -75381,8 +75342,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -75433,7 +75393,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -75626,6 +75586,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -75741,7 +75711,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -75758,7 +75728,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -75782,7 +75752,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -75799,7 +75769,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -75865,8 +75835,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -76029,7 +75998,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -76711,11 +76680,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -76730,7 +76699,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -76744,8 +76713,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -76753,16 +76721,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -76786,8 +76754,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -76795,14 +76762,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -76822,16 +76789,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -76840,11 +76807,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -76852,7 +76819,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -76920,8 +76887,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -76929,14 +76895,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -77035,8 +77001,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -77056,8 +77021,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -77065,14 +77029,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -77130,8 +77094,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -77208,7 +77171,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -77230,7 +77193,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -77279,7 +77242,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -77293,8 +77256,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -77302,16 +77264,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -77376,8 +77338,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -77385,14 +77346,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -77411,9 +77372,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -77429,9 +77387,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -77459,9 +77416,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -77472,8 +77428,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -77483,9 +77438,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -77543,7 +77497,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -77618,8 +77572,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -77675,8 +77628,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -77684,14 +77636,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -77754,8 +77706,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -77763,14 +77714,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -77887,8 +77838,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -77896,14 +77846,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -77943,7 +77893,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -78109,13 +78059,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l66; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l66: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l65; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -78123,15 +78073,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l65; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l65; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l65; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -78148,7 +78098,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals1 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l65: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -78175,8 +78125,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -78184,14 +78133,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -78203,7 +78152,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -78216,13 +78165,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -78230,15 +78179,15 @@ updatePointers(void) numPointerSlots2 = (numSlots5 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots5); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -78255,7 +78204,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals2 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -78283,8 +78232,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots22 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots22 + (numSlots22 & 1)) << (shiftForWord()); @@ -78292,16 +78240,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l39; + goto l40; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l39: /* end objectAfter:limit: */; + l40: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -78342,13 +78290,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -78356,15 +78304,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -78381,7 +78329,7 @@ updatePointers(void) assert((header4 & 1)); numLiterals3 = ((header4 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -78418,8 +78366,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -78454,7 +78401,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -78467,8 +78414,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -78476,18 +78422,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -78510,13 +78456,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -78524,15 +78470,15 @@ updatePointers(void) numPointerSlots = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -78549,7 +78495,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i = 0; i < numPointerSlots; i += 1) { /* begin fetchPointer:ofObject: */ oop = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))); @@ -78578,8 +78524,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -78587,14 +78532,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } } @@ -78796,8 +78741,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -78805,14 +78749,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -78897,7 +78841,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -78997,8 +78941,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -79165,7 +79109,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -79281,8 +79225,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -79290,24 +79233,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -79370,8 +79313,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -79600,8 +79543,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); @@ -80002,8 +79945,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -80011,14 +79953,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -80039,8 +79981,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -80048,14 +79989,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -80078,8 +80019,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -80087,14 +80027,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -80809,7 +80749,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -80819,7 +80759,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -80907,9 +80847,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -81015,6 +80955,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -81636,8 +81605,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -81645,14 +81613,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -81704,8 +81672,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -81713,14 +81680,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -81774,8 +81741,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -81783,20 +81749,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -81829,8 +81795,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -81838,14 +81803,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -81870,8 +81835,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -81879,14 +81843,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -81913,8 +81877,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -81922,16 +81885,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -82056,8 +82019,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -82131,8 +82095,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -82222,8 +82187,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -83585,8 +83551,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -84658,7 +84625,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -84835,7 +84802,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -85005,7 +84972,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -85173,7 +85140,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -85382,7 +85349,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -85729,8 +85696,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -85783,11 +85751,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -85813,11 +85779,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -86016,18 +85980,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -86183,7 +86148,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -86368,6 +86333,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -86423,7 +86421,7 @@ popthenPush(sqInt nItems, sqInt oop) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -86875,8 +86873,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -86884,14 +86881,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -86922,8 +86919,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -86931,14 +86927,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -86962,8 +86958,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -86971,14 +86966,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -87707,7 +87702,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -87718,23 +87713,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -87750,38 +87745,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -87794,7 +87789,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -87802,7 +87797,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -87813,7 +87808,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -87827,7 +87822,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -87840,12 +87835,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -87856,7 +87851,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -87864,9 +87859,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -87880,8 +87875,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -87889,14 +87883,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -87943,7 +87937,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -87954,23 +87948,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -87986,38 +87980,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -88030,7 +88024,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -88038,7 +88032,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -88049,7 +88043,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -88063,7 +88057,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -88076,12 +88070,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -88092,7 +88086,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -88100,9 +88094,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -88116,8 +88110,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -88125,14 +88118,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -88180,7 +88173,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -88191,23 +88184,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -88223,38 +88216,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -88267,7 +88260,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -88275,7 +88268,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -88286,7 +88279,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -88300,7 +88293,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -88313,12 +88306,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -88329,7 +88322,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -88337,9 +88330,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -88354,8 +88347,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -88363,14 +88355,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -89675,11 +89667,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -89771,7 +89765,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - signed char accessorDepth; + sqInt accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -89823,7 +89817,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); header = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); if ((header & 1)) { @@ -89934,14 +89928,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -89958,6 +89961,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -89970,21 +89974,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -90000,12 +90008,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -90021,6 +90032,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -90034,11 +90046,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -90064,6 +90079,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -91489,7 +91508,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -91604,7 +91623,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -92726,8 +92745,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -94848,7 +94867,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -95205,7 +95224,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -95242,7 +95261,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -95545,7 +95564,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -95697,7 +95716,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -95901,7 +95920,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -96193,8 +96212,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -96244,8 +96264,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -96382,6 +96404,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -96391,165 +96414,134 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer = floatObjectOf(getCogCodeZoneThreshold()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (16U << (shiftForWord())), valuePointer); + /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -96557,9 +96549,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -96567,22 +96559,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -96590,192 +96582,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -96804,7 +96701,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -96837,14 +96734,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { result = ConstZero; } + if (arg == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -96920,7 +96820,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -97034,47 +96934,41 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l85; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l85: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -97129,7 +97023,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -97151,12 +97046,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l66; + goto l78; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l66: /* end setCogVMFlags: */; + l78: /* end setCogVMFlags: */; } } if (index == 49) { @@ -97179,14 +97074,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l83; + goto l86; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l83: /* end floatValueOf: */; + l86: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -97397,8 +97292,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -97406,14 +97300,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -97448,8 +97342,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -97457,14 +97350,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -97492,8 +97385,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -97501,14 +97393,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -97533,6 +97425,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -97580,6 +97473,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spurlowcodesrc/vm/interp.h b/spurlowcodesrc/vm/interp.h index 774f60d8f..9f7e97027 100644 --- a/spurlowcodesrc/vm/interp.h +++ b/spurlowcodesrc/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2134 uuid: 4721ad0c-159c-4bf2-9f3e-c9917fcdead5 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 4 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1073741824 #define MaxSmallInteger 1073741823 diff --git a/spurlowcodesrc/vm/vmCallback.h b/spurlowcodesrc/vm/vmCallback.h index 034579042..3bf23acc7 100644 --- a/spurlowcodesrc/vm/vmCallback.h +++ b/spurlowcodesrc/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-rsf.2127 uuid: 1a6d3cce-b752-4e79-905f-e1b6c155d910 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/spurlowcodestack64src/vm/gcc3x-interp.c b/spurlowcodestack64src/vm/gcc3x-interp.c index 30fae0d01..8df0ebf5f 100644 --- a/spurlowcodestack64src/vm/gcc3x-interp.c +++ b/spurlowcodestack64src/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -458,6 +458,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -624,6 +625,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -651,7 +653,7 @@ static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -912,8 +914,8 @@ static sqInt NoDbgRegParms noFixupFollowFieldofObject(sqInt fieldIndex, sqInt an static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -981,6 +983,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1080,14 +1083,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1234,6 +1238,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1440,9 +1445,9 @@ _iss char * framePointer; _iss usqInt freeStart; _iss sqInt specialObjectsOop; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss usqInt newMethod; _iss sqInt messageSelector; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss usqInt instructionPointer; _iss sqInt trueObj; @@ -1541,6 +1546,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1554,11 +1561,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1591,6 +1596,7 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1608,7 +1614,6 @@ _iss char * shadowCallStack; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; #undef _iss #if SQ_USE_GLOBAL_STRUCT } fum; @@ -1636,6 +1641,7 @@ static struct foo * foo = &fum; #endif static void (*primitiveFunctionPointer)(); sqInt checkForLeaks; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; @@ -1648,6 +1654,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; char * breakSelector; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2229,7 +2238,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.2142]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.2165]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -5985,11 +5994,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l1731; + goto l1740; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l1731: /* end getErrorObjectFromPrimFailCode */; + l1740: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6430,18 +6439,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -6551,7 +6564,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7710,7 +7723,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif goto l450; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l450; } if (fmt >= (firstShortFormat())) { @@ -7725,7 +7738,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -7739,7 +7752,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -12409,9 +12422,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt blockSize; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -12439,7 +12451,6 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l542: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -12478,7 +12489,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -13217,7 +13228,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1755; + goto l1754; } if (bytecode == 172) { @@ -13226,7 +13237,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1755; + goto l1754; } if (bytecode > 167) { @@ -13236,7 +13247,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1755; + goto l1754; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -13244,7 +13255,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l1755: /* end case */; + l1754: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -13402,7 +13413,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1758; + goto l1757; } if (bytecode == 172) { @@ -13412,14 +13423,14 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1758; + goto l1757; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l1758: /* end case */; + l1757: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -14775,7 +14786,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -16377,7 +16388,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1759; + goto l1758; } if (bytecode == 239) { @@ -16386,7 +16397,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1759; + goto l1758; } if (bytecode == 238) { @@ -16396,7 +16407,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1759; + goto l1758; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -16404,7 +16415,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l1759: /* end case */; + l1758: /* end case */; BREAK; CASE(355) /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -16562,7 +16573,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1762; + goto l1761; } if (bytecode == 239) { @@ -16572,14 +16583,14 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1762; + goto l1761; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l1762: /* end case */; + l1761: /* end case */; BREAK; CASE(356) /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -17935,7 +17946,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -18889,10 +18900,10 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l1764; + goto l1763; } ourContext = marryFrameSP(localFP, localSP); - l1764: /* end ensureFrameIsMarried:SP: */; + l1763: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -19095,7 +19106,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -19241,6 +19252,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l1156; } @@ -21018,7 +21030,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif goto l1344; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l1344; } if (fmt >= (firstShortFormat())) { @@ -21033,7 +21045,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -21047,7 +21059,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -25619,8 +25631,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt header; sqInt i; int ignoreContext; - sqInt newClosure; - sqInt newClosure1; + usqInt newClosure; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -25659,7 +25671,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin ensureFrameIsMarried:SP: */ if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); - longAt(localFP + FoxThisContext); + context = longAt(localFP + FoxThisContext); goto l1624; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); @@ -25748,9 +25760,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt byte; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -25775,7 +25786,6 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l1642: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -25814,7 +25824,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -26837,16 +26847,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -26873,7 +26883,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -26982,7 +26992,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -27051,7 +27061,7 @@ positive64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -27430,7 +27440,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -28181,8 +28190,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28361,8 +28370,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28678,8 +28687,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29083,7 +29092,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -29307,7 +29316,7 @@ primitiveClosureValue(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -29430,7 +29439,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -29550,7 +29559,7 @@ primitiveClosureValueWithArgs(void) sqInt i; sqInt index; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -29848,7 +29857,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -29858,7 +29867,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -29869,7 +29878,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -29886,7 +29895,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -29898,8 +29907,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -29917,7 +29925,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -30035,7 +30043,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -31965,8 +31973,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31974,14 +31981,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -32006,8 +32013,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -32015,14 +32021,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -32049,8 +32055,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -32058,14 +32063,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -32097,7 +32102,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -32255,7 +32260,7 @@ primitiveFullClosureValue(void) sqInt i; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32371,7 +32376,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt i; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32484,7 +32489,7 @@ primitiveFullClosureValueWithArgs(void) sqInt index; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -32664,6 +32669,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -32896,7 +32948,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -34364,7 +34416,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -34602,7 +34654,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -34913,7 +34965,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -35007,7 +35059,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -35067,7 +35119,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -35211,8 +35263,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -35220,18 +35271,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -35254,8 +35305,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -35263,18 +35313,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -35286,8 +35336,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -35295,22 +35344,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -37149,7 +37198,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -40728,8 +40777,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40737,14 +40785,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40769,8 +40817,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -40778,14 +40825,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40812,8 +40859,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -40821,14 +40867,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -41194,7 +41240,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -41283,7 +41329,7 @@ signed64BitValueOf(sqInt oop) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -41585,8 +41631,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41993,9 +42038,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -42172,7 +42217,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -42244,6 +42289,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -42275,7 +42331,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -42396,7 +42452,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -42408,7 +42464,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -42419,7 +42475,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -42887,8 +42943,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42896,14 +42951,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42926,8 +42981,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42935,14 +42989,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -42988,8 +43042,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42997,14 +43050,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -43136,7 +43189,6 @@ copyAndForwardMourner(sqInt mourner) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43166,12 +43218,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -43209,7 +43260,6 @@ copyAndForward(sqInt survivor) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43255,12 +43305,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -43294,12 +43343,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -43498,7 +43547,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -44025,8 +44074,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -44461,8 +44509,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44470,14 +44517,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -44503,8 +44550,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -44512,14 +44558,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -44534,8 +44580,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -44543,14 +44588,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -44924,7 +44969,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -44932,7 +44977,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -44943,8 +44988,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44985,8 +45029,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44994,14 +45037,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45040,8 +45083,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45088,8 +45130,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45097,14 +45138,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -45152,8 +45193,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -45161,14 +45201,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45213,8 +45253,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -45267,8 +45306,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -45276,14 +45314,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -45327,7 +45365,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -45346,7 +45384,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -45362,7 +45400,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -45462,8 +45500,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45499,8 +45536,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45508,14 +45544,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45552,8 +45588,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45561,14 +45596,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45598,8 +45633,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45607,14 +45641,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -45725,8 +45759,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45734,14 +45767,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45765,8 +45798,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45774,14 +45806,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45807,8 +45839,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45816,14 +45847,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -45865,8 +45896,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45874,14 +45904,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -46942,8 +46972,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46951,14 +46980,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47003,8 +47032,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47012,14 +47040,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47099,8 +47127,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47108,14 +47135,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -47271,12 +47298,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -47319,8 +47346,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47328,14 +47354,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47386,12 +47412,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -47434,8 +47460,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47443,14 +47468,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47543,12 +47568,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -47607,8 +47632,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47616,14 +47640,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -47673,7 +47697,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -47714,7 +47738,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -48308,8 +48332,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48317,14 +48340,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -48393,8 +48416,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48402,14 +48424,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48430,8 +48452,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48439,14 +48460,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48469,8 +48490,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -48478,14 +48498,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -48868,8 +48888,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48877,14 +48896,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48916,8 +48935,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48925,14 +48943,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48966,8 +48984,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -48975,14 +48992,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -49268,7 +49285,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -49521,8 +49537,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49530,14 +49545,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49560,8 +49575,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49569,14 +49583,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -49812,8 +49826,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49821,14 +49834,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49861,8 +49874,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49870,14 +49882,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49912,8 +49924,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49921,14 +49932,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -50008,8 +50019,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50017,14 +50027,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50054,8 +50064,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50063,14 +50072,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50102,8 +50111,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50111,14 +50119,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -50716,7 +50724,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51040,8 +51048,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51049,14 +51056,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51079,8 +51086,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -51088,14 +51094,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -51120,8 +51126,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -51129,14 +51134,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -51194,7 +51199,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -51202,7 +51207,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -51241,10 +51246,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -51295,8 +51300,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51304,14 +51308,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -51347,11 +51351,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i1; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -52793,8 +52797,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -52816,8 +52819,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -52861,7 +52863,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -52869,7 +52871,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -52877,7 +52879,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -52885,11 +52887,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -52899,7 +52901,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -52907,11 +52909,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -52924,8 +52926,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -52933,17 +52934,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -52952,7 +52953,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -52971,7 +52972,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -52987,7 +52988,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -53008,8 +53009,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -53017,17 +53017,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -53035,8 +53035,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53044,17 +53043,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -53074,7 +53073,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -53132,8 +53130,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -53141,14 +53138,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -53274,8 +53271,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53283,14 +53279,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -53320,8 +53316,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53329,14 +53324,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53359,8 +53354,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53368,14 +53362,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -53486,8 +53480,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -53495,14 +53488,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53561,8 +53554,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53570,14 +53562,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53638,8 +53630,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53647,14 +53638,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -53794,7 +53785,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -53822,7 +53813,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -53846,7 +53837,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -53874,7 +53865,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -53897,8 +53888,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53906,14 +53896,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -54399,7 +54389,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -54651,7 +54641,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -55004,8 +54994,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55041,7 +55030,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -55056,7 +55045,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -55304,8 +55293,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55327,8 +55315,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55351,8 +55338,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -55373,8 +55359,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -55452,8 +55437,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55461,14 +55445,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55490,8 +55474,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55499,14 +55482,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -55531,8 +55514,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55540,14 +55522,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -55659,8 +55641,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55756,8 +55737,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55765,14 +55745,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55811,8 +55791,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -55820,14 +55799,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55859,8 +55838,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55868,14 +55846,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -56016,8 +55994,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56496,8 +56473,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56505,14 +56481,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56543,8 +56519,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56552,14 +56527,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56592,8 +56567,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56601,14 +56575,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56712,8 +56686,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56721,14 +56694,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56766,8 +56739,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56775,14 +56747,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56822,8 +56794,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56831,14 +56802,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56964,8 +56935,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56973,14 +56943,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57010,8 +56980,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57019,14 +56988,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57049,8 +57018,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57058,14 +57026,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57141,8 +57109,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57150,14 +57117,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57185,8 +57152,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57194,14 +57160,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -57224,8 +57190,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57233,14 +57198,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -57588,8 +57553,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57597,14 +57561,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57634,8 +57598,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57643,14 +57606,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57673,8 +57636,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57682,14 +57644,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57815,8 +57777,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57824,14 +57785,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57860,8 +57821,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57869,14 +57829,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57907,8 +57867,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57916,14 +57875,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58011,8 +57970,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58020,14 +57978,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58068,8 +58026,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58077,14 +58034,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58127,8 +58084,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58136,14 +58092,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58227,8 +58183,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58236,14 +58191,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58273,8 +58228,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58282,14 +58236,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58312,8 +58266,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58321,14 +58274,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58538,8 +58491,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58547,14 +58499,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58582,8 +58534,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58591,14 +58542,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58619,8 +58570,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58628,14 +58578,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58709,13 +58659,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -58723,15 +58673,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -58741,7 +58691,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -58765,8 +58715,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -58774,14 +58723,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58802,13 +58751,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -58816,15 +58765,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -58834,7 +58783,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -58858,8 +58807,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58867,14 +58815,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58896,13 +58844,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -58910,15 +58858,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -58928,7 +58876,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -58953,8 +58901,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58962,14 +58909,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -59401,7 +59348,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -59411,8 +59357,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -59463,7 +59408,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -59656,6 +59601,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -59756,7 +59711,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -59775,7 +59730,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -59791,7 +59746,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -59800,7 +59755,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -59819,7 +59774,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -59835,7 +59790,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -59899,8 +59854,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60066,7 +60020,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -60748,11 +60702,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -60767,7 +60721,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -60783,8 +60737,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -60792,16 +60745,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -60827,8 +60780,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60836,14 +60788,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -60863,16 +60815,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -60881,11 +60833,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -60893,7 +60845,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -60963,8 +60915,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -60972,14 +60923,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -61078,8 +61029,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -61099,8 +61049,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -61108,14 +61057,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -61177,8 +61126,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61257,7 +61205,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -61279,7 +61227,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -61328,7 +61276,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -61344,8 +61292,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61353,16 +61300,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -61433,8 +61380,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -61442,14 +61388,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -61468,9 +61414,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -61486,9 +61429,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -61520,9 +61462,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -61533,8 +61474,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61544,9 +61484,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -61604,7 +61543,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -61679,8 +61618,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61736,8 +61674,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -61745,14 +61682,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -61817,8 +61754,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61826,14 +61762,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -61949,8 +61885,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61958,14 +61893,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -62004,7 +61939,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -62166,13 +62101,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l57; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l57: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l56; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -62180,15 +62115,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l56; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l56; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l56; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -62198,7 +62133,7 @@ updatePointers(void) numLiterals1 = ((header1 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l56: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -62225,8 +62160,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -62234,14 +62168,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -62253,7 +62187,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -62266,13 +62200,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l64; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l64: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l63; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -62280,15 +62214,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l63; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l63; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l63; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -62298,7 +62232,7 @@ updatePointers(void) numLiterals2 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l63: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -62326,8 +62260,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -62335,16 +62268,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -62385,13 +62318,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -62399,15 +62332,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -62417,7 +62350,7 @@ updatePointers(void) numLiterals3 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -62454,8 +62387,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -62490,7 +62422,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -62503,8 +62435,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -62512,18 +62443,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -62546,13 +62477,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l62; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l62: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l63; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -62560,15 +62491,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l63; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l63; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l63; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -62578,7 +62509,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l63: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -62607,8 +62538,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62616,14 +62546,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -62818,8 +62748,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62827,14 +62756,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -62919,7 +62848,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -63019,8 +62948,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -63187,7 +63116,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -63303,8 +63232,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63312,24 +63240,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -63392,8 +63320,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -63622,8 +63550,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); @@ -64096,7 +64024,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -64190,8 +64117,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64199,14 +64125,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64227,8 +64153,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -64236,14 +64161,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64266,8 +64191,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -64275,14 +64199,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -65165,7 +65089,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -65175,7 +65099,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -65263,9 +65187,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -65371,6 +65295,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -65944,8 +65897,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -65953,14 +65905,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -66012,8 +65964,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -66021,14 +65972,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66082,8 +66033,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -66091,20 +66041,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -66137,8 +66087,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -66146,14 +66095,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66178,8 +66127,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -66187,14 +66135,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66221,8 +66169,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -66230,16 +66177,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -66322,8 +66269,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -66400,8 +66348,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66523,8 +66472,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -68020,8 +67970,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* To overflow the stack this must be a new frame, but in Cog base frames are married. */ assert(!(frameHasContext(GIV(framePointer)))); @@ -69139,7 +69090,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69314,7 +69265,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69480,7 +69431,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -69804,7 +69755,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -70294,8 +70245,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); GIV(method) = aMethodObj; @@ -70346,7 +70298,6 @@ marryFrameSP(char *theFP, char *theSP) numArgs = byteAt((theFP + FoxFrameFlags) + 1); numStack = (((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1)); if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) { - /* begin pushedReceiverOrClosureOfFrame: */ closureOrNil = longAt(theFP + (frameStackedReceiverOffset(theFP))); } else { @@ -70555,18 +70506,19 @@ longAt((methodPointer + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (sh objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* StackInterpreter>>#methodHeaderIndicatesLargeFrame: */ @@ -70942,6 +70894,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -71020,7 +71005,7 @@ positive32BitIntegerFor(unsigned int integerValue) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -71465,8 +71450,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71474,14 +71458,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -71512,8 +71496,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -71521,14 +71504,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71552,8 +71535,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71561,14 +71543,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -72303,7 +72285,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72314,7 +72296,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72325,23 +72307,23 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l29; + goto l26; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l29; + goto l26; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l29; + goto l26; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72357,39 +72339,39 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l29; + goto l26; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l29; + goto l26; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l29; + goto l26; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l29; + goto l26; } if (oop == GIV(nilObj)) { print("nil"); - goto l29; + goto l26; } if (oop == GIV(trueObj)) { print("true"); - goto l29; + goto l26; } if (oop == GIV(falseObj)) { print("false"); - goto l29; + goto l26; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l29; + goto l26; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72402,7 +72384,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l29; + goto l26; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72410,7 +72392,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l29; + goto l26; } } if ((nameLen == 9) @@ -72421,7 +72403,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l29; + goto l26; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72435,7 +72417,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l29; + goto l26; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72448,12 +72430,12 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l30; + goto l27; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72464,7 +72446,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l30: ; + l27: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72472,9 +72454,9 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l29: /* end printOopShortInner: */; + l26: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72488,8 +72470,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72497,14 +72478,14 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l20; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72556,7 +72537,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72567,7 +72548,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72578,23 +72559,23 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l32; + goto l29; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l32; + goto l29; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l32; + goto l29; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72610,39 +72591,39 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l32; + goto l29; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l32; + goto l29; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l32; + goto l29; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l32; + goto l29; } if (oop == GIV(nilObj)) { print("nil"); - goto l32; + goto l29; } if (oop == GIV(trueObj)) { print("true"); - goto l32; + goto l29; } if (oop == GIV(falseObj)) { print("false"); - goto l32; + goto l29; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l32; + goto l29; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72655,7 +72636,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l32; + goto l29; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72663,7 +72644,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l32; + goto l29; } } if ((nameLen == 9) @@ -72674,7 +72655,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l32; + goto l29; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72688,7 +72669,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l32; + goto l29; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72701,12 +72682,12 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l33; + goto l30; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72717,7 +72698,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l33: ; + l30: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72725,9 +72706,9 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l32: /* end printOopShortInner: */; + l29: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72741,8 +72722,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -72750,14 +72730,14 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l24; + goto l19; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l24: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -72810,7 +72790,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72821,7 +72801,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72832,23 +72812,23 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l35; + goto l32; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l35; + goto l32; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l35; + goto l32; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72864,39 +72844,39 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l35; + goto l32; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l35; + goto l32; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l35; + goto l32; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l35; + goto l32; } if (oop == GIV(nilObj)) { print("nil"); - goto l35; + goto l32; } if (oop == GIV(trueObj)) { print("true"); - goto l35; + goto l32; } if (oop == GIV(falseObj)) { print("false"); - goto l35; + goto l32; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l35; + goto l32; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72909,7 +72889,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l35; + goto l32; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72917,7 +72897,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l35; + goto l32; } } if ((nameLen == 9) @@ -72928,7 +72908,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l35; + goto l32; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72942,7 +72922,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l35; + goto l32; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72955,12 +72935,12 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l37; + goto l34; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l36; + goto l33; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72971,7 +72951,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l36: ; + l33: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72979,9 +72959,9 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l37: ; + l34: ; } - l35: /* end printOopShortInner: */; + l32: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72996,8 +72976,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -73005,14 +72984,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l28; + goto l21; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l28: /* end objectAfter:limit: */; + l21: /* end objectAfter:limit: */; } } @@ -74334,7 +74313,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -74686,6 +74665,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); return dataSize; } @@ -74796,11 +74776,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -75105,14 +75087,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -75129,6 +75120,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75141,21 +75133,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); assert(isOopCompiledMethod(GIV(method))); @@ -75163,12 +75159,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? 256 : 0); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !0, __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -75184,6 +75183,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -75197,11 +75197,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -75221,6 +75224,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -75393,15 +75400,27 @@ schedulerPointer(void) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* StackInterpreter>>#sendInvokeCallbackContext: */ EXPORT(sqInt) @@ -75435,6 +75454,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) char *sp7; sqInt table; + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -75447,8 +75467,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin push: */ object3 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); longAtput((sp3 = GIV(stackPointer) - BytesPerWord), object3); @@ -75561,6 +75583,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ interpret(); return 1; @@ -76205,7 +76228,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -77162,7 +77185,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -78015,6 +78038,7 @@ transferTo(sqInt newProc) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin setMethod: */ @@ -78333,8 +78357,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -78342,14 +78365,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -78378,8 +78401,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -78387,14 +78409,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -78425,8 +78447,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -78434,14 +78455,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return activeContext; } @@ -78898,10 +78919,9 @@ primitiveClosureCopyWithCopiedValues(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt copiedValues; sqInt i; - sqInt initialIP; sqInt integerPointer; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -78936,7 +78956,6 @@ primitiveClosureCopyWithCopiedValues(void) return; } /* begin closureIn:numArgs:instructionPointer:copiedValues: */ - initialIP = (GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize); copiedValues = longAt(GIV(stackPointer)); /* begin numSlotsOf: */ assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); @@ -78982,7 +79001,7 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), longAt(GIV(stackPointer) + (2 * BytesPerWord))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)((GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -81630,7 +81649,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -81667,7 +81686,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -82125,7 +82144,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -82431,7 +82450,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -82744,8 +82763,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -83128,8 +83148,10 @@ primitiveTerminateTo(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -83215,7 +83237,6 @@ primitiveVMParameter(void) char *sp1; char *sp2; sqInt tagBits; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -83265,6 +83286,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -83274,165 +83296,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -83440,9 +83426,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -83450,213 +83436,118 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = GIV(nilObj); + valuePointer35 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = GIV(nilObj); + valuePointer36 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)((((GIV(preemptionYields) + valuePointer37 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = GIV(nilObj); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = GIV(nilObj); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = ConstZero; + valuePointer48 = ConstZero; assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -83685,7 +83576,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -83718,14 +83609,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -83801,7 +83695,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -83917,48 +83811,42 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l93; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l93: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -84024,11 +83912,11 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if ((((usqInt)arg)) > 0x1F) { /* begin primitiveFailFor: */ GIV(primFailCode) = PrimErrUnsupported; - goto l70; + goto l82; } GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l70: /* end setCogVMFlags: */; + l82: /* end setCogVMFlags: */; } } if (index == 49) { @@ -84276,8 +84164,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -84285,14 +84172,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -84331,8 +84218,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -84340,14 +84226,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -84379,8 +84265,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -84388,14 +84273,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -84444,6 +84329,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -84489,6 +84375,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spurlowcodestack64src/vm/interp.c b/spurlowcodestack64src/vm/interp.c index ee7b0a7ef..a2be55a8b 100644 --- a/spurlowcodestack64src/vm/interp.c +++ b/spurlowcodestack64src/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -455,6 +455,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -621,6 +622,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -648,7 +650,7 @@ static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -909,8 +911,8 @@ static sqInt NoDbgRegParms noFixupFollowFieldofObject(sqInt fieldIndex, sqInt an static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -978,6 +980,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1077,14 +1080,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1231,6 +1235,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1437,9 +1442,9 @@ _iss char * framePointer; _iss usqInt freeStart; _iss sqInt specialObjectsOop; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss usqInt newMethod; _iss sqInt messageSelector; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss usqInt instructionPointer; _iss sqInt trueObj; @@ -1538,6 +1543,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1551,11 +1558,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1588,6 +1593,7 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1605,7 +1611,6 @@ _iss char * shadowCallStack; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; #undef _iss #if SQ_USE_GLOBAL_STRUCT } fum; @@ -1633,6 +1638,7 @@ static struct foo * foo = &fum; #endif static void (*primitiveFunctionPointer)(); sqInt checkForLeaks; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; @@ -1645,6 +1651,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; char * breakSelector; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2226,7 +2235,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.2142]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.2165]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -5976,11 +5985,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l1731; + goto l1740; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l1731: /* end getErrorObjectFromPrimFailCode */; + l1740: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6421,18 +6430,22 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -6542,7 +6555,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7701,7 +7714,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif goto l450; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l450; } if (fmt >= (firstShortFormat())) { @@ -7716,7 +7729,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -7730,7 +7743,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -12400,9 +12413,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt blockSize; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -12430,7 +12442,6 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l542: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -12469,7 +12480,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -13208,7 +13219,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1755; + goto l1754; } if (bytecode == 172) { @@ -13217,7 +13228,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1755; + goto l1754; } if (bytecode > 167) { @@ -13227,7 +13238,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1755; + goto l1754; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -13235,7 +13246,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l1755: /* end case */; + l1754: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -13393,7 +13404,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1758; + goto l1757; } if (bytecode == 172) { @@ -13403,14 +13414,14 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1758; + goto l1757; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l1758: /* end case */; + l1757: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -14766,7 +14777,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -16368,7 +16379,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1759; + goto l1758; } if (bytecode == 239) { @@ -16377,7 +16388,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1759; + goto l1758; } if (bytecode == 238) { @@ -16387,7 +16398,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1759; + goto l1758; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -16395,7 +16406,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l1759: /* end case */; + l1758: /* end case */; break; case 355: /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -16553,7 +16564,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1762; + goto l1761; } if (bytecode == 239) { @@ -16563,14 +16574,14 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1762; + goto l1761; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l1762: /* end case */; + l1761: /* end case */; break; case 356: /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -17926,7 +17937,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -18880,10 +18891,10 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l1764; + goto l1763; } ourContext = marryFrameSP(localFP, localSP); - l1764: /* end ensureFrameIsMarried:SP: */; + l1763: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -19086,7 +19097,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -19232,6 +19243,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l1156; } @@ -21009,7 +21021,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif goto l1344; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l1344; } if (fmt >= (firstShortFormat())) { @@ -21024,7 +21036,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -21038,7 +21050,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -25610,8 +25622,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt header; sqInt i; int ignoreContext; - sqInt newClosure; - sqInt newClosure1; + usqInt newClosure; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -25650,7 +25662,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif /* begin ensureFrameIsMarried:SP: */ if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); - longAt(localFP + FoxThisContext); + context = longAt(localFP + FoxThisContext); goto l1624; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); @@ -25739,9 +25751,8 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif sqInt byte; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -25766,7 +25777,6 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l1642: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -25805,7 +25815,7 @@ longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shif longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -26828,16 +26838,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -26864,7 +26874,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -26973,7 +26983,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -27042,7 +27052,7 @@ positive64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -27421,7 +27431,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -28172,8 +28181,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28352,8 +28361,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28669,8 +28678,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29074,7 +29083,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -29298,7 +29307,7 @@ primitiveClosureValue(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -29421,7 +29430,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -29541,7 +29550,7 @@ primitiveClosureValueWithArgs(void) sqInt i; sqInt index; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -29839,7 +29848,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -29849,7 +29858,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -29860,7 +29869,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -29877,7 +29886,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -29889,8 +29898,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -29908,7 +29916,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -30026,7 +30034,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -31956,8 +31964,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -31965,14 +31972,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -31997,8 +32004,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -32006,14 +32012,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -32040,8 +32046,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -32049,14 +32054,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -32088,7 +32093,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -32246,7 +32251,7 @@ primitiveFullClosureValue(void) sqInt i; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32362,7 +32367,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt i; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32475,7 +32480,7 @@ primitiveFullClosureValueWithArgs(void) sqInt index; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -32655,6 +32660,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -32887,7 +32939,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -34355,7 +34407,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -34593,7 +34645,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -34904,7 +34956,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -34998,7 +35050,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -35058,7 +35110,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -35202,8 +35254,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -35211,18 +35262,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -35245,8 +35296,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -35254,18 +35304,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -35277,8 +35327,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -35286,22 +35335,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -37140,7 +37189,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -40719,8 +40768,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -40728,14 +40776,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40760,8 +40808,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -40769,14 +40816,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40803,8 +40850,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -40812,14 +40858,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -41185,7 +41231,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -41274,7 +41320,7 @@ signed64BitValueOf(sqInt oop) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -41576,8 +41622,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41984,9 +42029,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -42163,7 +42208,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) /* begin set:classIndexTo:formatTo: */ assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); - longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & (~(usqIntptr_t)((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -42235,6 +42280,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -42266,7 +42322,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -42387,7 +42443,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -42399,7 +42455,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -42410,7 +42466,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -42878,8 +42934,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42887,14 +42942,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42917,8 +42972,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42926,14 +42980,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -42979,8 +43033,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42988,14 +43041,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -43127,7 +43180,6 @@ copyAndForwardMourner(sqInt mourner) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43157,12 +43209,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -43200,7 +43251,6 @@ copyAndForward(sqInt survivor) sqInt header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43246,12 +43296,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -43285,12 +43334,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -43489,7 +43538,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -44016,8 +44065,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -44452,8 +44500,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44461,14 +44508,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -44494,8 +44541,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -44503,14 +44549,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -44525,8 +44571,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -44534,14 +44579,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -44915,7 +44960,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -44923,7 +44968,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -44934,8 +44979,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -44976,8 +45020,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -44985,14 +45028,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45031,8 +45074,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45079,8 +45121,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45088,14 +45129,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -45143,8 +45184,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -45152,14 +45192,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45204,8 +45244,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -45258,8 +45297,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -45267,14 +45305,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -45318,7 +45356,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -45337,7 +45375,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -45353,7 +45391,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -45453,8 +45491,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45490,8 +45527,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45499,14 +45535,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45543,8 +45579,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45552,14 +45587,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45589,8 +45624,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45598,14 +45632,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -45716,8 +45750,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45725,14 +45758,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45756,8 +45789,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45765,14 +45797,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -45798,8 +45830,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45807,14 +45838,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -45856,8 +45887,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45865,14 +45895,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -46933,8 +46963,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46942,14 +46971,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46994,8 +47023,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47003,14 +47031,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47090,8 +47118,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47099,14 +47126,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -47262,12 +47289,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -47310,8 +47337,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47319,14 +47345,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47377,12 +47403,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -47425,8 +47451,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47434,14 +47459,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47534,12 +47559,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -47598,8 +47623,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47607,14 +47631,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -47664,7 +47688,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -47705,7 +47729,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -48299,8 +48323,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48308,14 +48331,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -48384,8 +48407,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48393,14 +48415,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48421,8 +48443,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48430,14 +48451,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48460,8 +48481,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -48469,14 +48489,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -48859,8 +48879,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48868,14 +48887,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48907,8 +48926,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48916,14 +48934,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48957,8 +48975,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -48966,14 +48983,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -49259,7 +49276,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -49512,8 +49528,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49521,14 +49536,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49551,8 +49566,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49560,14 +49574,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -49803,8 +49817,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49812,14 +49825,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49852,8 +49865,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49861,14 +49873,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49903,8 +49915,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49912,14 +49923,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49999,8 +50010,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50008,14 +50018,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50045,8 +50055,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50054,14 +50063,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50093,8 +50102,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50102,14 +50110,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -50707,7 +50715,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51031,8 +51039,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51040,14 +51047,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51070,8 +51077,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -51079,14 +51085,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -51111,8 +51117,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -51120,14 +51125,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -51185,7 +51190,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -51193,7 +51198,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -51232,10 +51237,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i = 2; i < GIV(numClassTablePages); i += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -51286,8 +51291,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51295,14 +51299,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -51338,11 +51342,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i1; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -52784,8 +52788,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -52807,8 +52810,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -52852,7 +52854,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -52860,7 +52862,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -52868,7 +52870,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -52876,11 +52878,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -52890,7 +52892,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -52898,11 +52900,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -52915,8 +52917,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -52924,17 +52925,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -52943,7 +52944,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -52962,7 +52963,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -52978,7 +52979,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -52999,8 +53000,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -53008,17 +53008,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -53026,8 +53026,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53035,17 +53034,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -53065,7 +53064,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -53123,8 +53121,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -53132,14 +53129,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -53265,8 +53262,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53274,14 +53270,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -53311,8 +53307,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53320,14 +53315,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53350,8 +53345,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53359,14 +53353,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -53477,8 +53471,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -53486,14 +53479,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53552,8 +53545,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53561,14 +53553,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -53629,8 +53621,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53638,14 +53629,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -53785,7 +53776,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -53813,7 +53804,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -53837,7 +53828,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -53865,7 +53856,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -53888,8 +53879,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53897,14 +53887,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -54390,7 +54380,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -54642,7 +54632,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -54995,8 +54985,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55032,7 +55021,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -55047,7 +55036,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -55295,8 +55284,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55318,8 +55306,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55342,8 +55329,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -55364,8 +55350,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -55443,8 +55428,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55452,14 +55436,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55481,8 +55465,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55490,14 +55473,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -55522,8 +55505,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55531,14 +55513,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -55650,8 +55632,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55747,8 +55728,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -55756,14 +55736,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55802,8 +55782,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -55811,14 +55790,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55850,8 +55829,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -55859,14 +55837,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -56007,8 +55985,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56487,8 +56464,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56496,14 +56472,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56534,8 +56510,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56543,14 +56518,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56583,8 +56558,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56592,14 +56566,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56703,8 +56677,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56712,14 +56685,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56757,8 +56730,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56766,14 +56738,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56813,8 +56785,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56822,14 +56793,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56955,8 +56926,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56964,14 +56934,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57001,8 +56971,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57010,14 +56979,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57040,8 +57009,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57049,14 +57017,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57132,8 +57100,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57141,14 +57108,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57176,8 +57143,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57185,14 +57151,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -57215,8 +57181,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57224,14 +57189,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -57579,8 +57544,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57588,14 +57552,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57625,8 +57589,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57634,14 +57597,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57664,8 +57627,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57673,14 +57635,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57806,8 +57768,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57815,14 +57776,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57851,8 +57812,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57860,14 +57820,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57898,8 +57858,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57907,14 +57866,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58002,8 +57961,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58011,14 +57969,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58059,8 +58017,7 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58068,14 +58025,14 @@ longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFor followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58118,8 +58075,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58127,14 +58083,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58218,8 +58174,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58227,14 +58182,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58264,8 +58219,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58273,14 +58227,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58303,8 +58257,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58312,14 +58265,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58529,8 +58482,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58538,14 +58490,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58573,8 +58525,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58582,14 +58533,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58610,8 +58561,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58619,14 +58569,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58700,13 +58650,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -58714,15 +58664,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -58732,7 +58682,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -58756,8 +58706,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -58765,14 +58714,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58793,13 +58742,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -58807,15 +58756,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -58825,7 +58774,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -58849,8 +58798,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58858,14 +58806,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58887,13 +58835,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -58901,15 +58849,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -58919,7 +58867,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -58944,8 +58892,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58953,14 +58900,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -59392,7 +59339,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -59402,8 +59348,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -59454,7 +59399,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -59647,6 +59592,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -59747,7 +59702,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -59766,7 +59721,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -59782,7 +59737,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -59791,7 +59746,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -59810,7 +59765,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -59826,7 +59781,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -59890,8 +59845,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60057,7 +60011,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -60739,11 +60693,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -60758,7 +60712,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -60774,8 +60728,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -60783,16 +60736,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -60818,8 +60771,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -60827,14 +60779,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -60854,16 +60806,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -60872,11 +60824,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -60884,7 +60836,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -60954,8 +60906,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -60963,14 +60914,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -61069,8 +61020,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -61090,8 +61040,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -61099,14 +61048,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -61168,8 +61117,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61248,7 +61196,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -61270,7 +61218,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -61319,7 +61267,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -61335,8 +61283,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61344,16 +61291,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -61424,8 +61371,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -61433,14 +61379,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -61459,9 +61405,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -61477,9 +61420,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -61511,9 +61453,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -61524,8 +61465,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61535,9 +61475,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -61595,7 +61534,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -61670,8 +61609,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61727,8 +61665,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -61736,14 +61673,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -61808,8 +61745,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61817,14 +61753,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -61940,8 +61876,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61949,14 +61884,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -61995,7 +61930,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -62157,13 +62092,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l57; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l57: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l56; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -62171,15 +62106,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l56; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l56; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l56; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -62189,7 +62124,7 @@ updatePointers(void) numLiterals1 = ((header1 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l56: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -62216,8 +62151,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -62225,14 +62159,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -62244,7 +62178,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -62257,13 +62191,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l64; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l64: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l63; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -62271,15 +62205,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l63; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l63; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l63; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -62289,7 +62223,7 @@ updatePointers(void) numLiterals2 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l63: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -62317,8 +62251,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -62326,16 +62259,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -62376,13 +62309,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -62390,15 +62323,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -62408,7 +62341,7 @@ updatePointers(void) numLiterals3 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -62445,8 +62378,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -62481,7 +62413,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -62494,8 +62426,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -62503,18 +62434,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -62537,13 +62468,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l62; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l62: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l63; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -62551,15 +62482,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l63; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l63; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l63; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -62569,7 +62500,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l63: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -62598,8 +62529,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62607,14 +62537,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -62809,8 +62739,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62818,14 +62747,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -62910,7 +62839,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -63010,8 +62939,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -63178,7 +63107,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -63294,8 +63223,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63303,24 +63231,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -63383,8 +63311,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -63613,8 +63541,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); @@ -64087,7 +64015,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -64181,8 +64108,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64190,14 +64116,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64218,8 +64144,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -64227,14 +64152,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64257,8 +64182,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -64266,14 +64190,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -65156,7 +65080,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -65166,7 +65090,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -65254,9 +65178,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -65362,6 +65286,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -65935,8 +65888,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -65944,14 +65896,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -66003,8 +65955,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -66012,14 +65963,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66073,8 +66024,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -66082,20 +66032,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -66128,8 +66078,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -66137,14 +66086,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66169,8 +66118,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -66178,14 +66126,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66212,8 +66160,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -66221,16 +66168,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -66313,8 +66260,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -66391,8 +66339,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66514,8 +66463,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -68011,8 +67961,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* To overflow the stack this must be a new frame, but in Cog base frames are married. */ assert(!(frameHasContext(GIV(framePointer)))); @@ -69130,7 +69081,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69305,7 +69256,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69471,7 +69422,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -69795,7 +69746,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -70285,8 +70236,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); GIV(method) = aMethodObj; @@ -70337,7 +70289,6 @@ marryFrameSP(char *theFP, char *theSP) numArgs = byteAt((theFP + FoxFrameFlags) + 1); numStack = (((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1)); if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) { - /* begin pushedReceiverOrClosureOfFrame: */ closureOrNil = longAt(theFP + (frameStackedReceiverOffset(theFP))); } else { @@ -70546,18 +70497,19 @@ longAt((methodPointer + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (sh objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* StackInterpreter>>#methodHeaderIndicatesLargeFrame: */ @@ -70933,6 +70885,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -71011,7 +70996,7 @@ positive32BitIntegerFor(unsigned int integerValue) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -71456,8 +71441,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71465,14 +71449,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -71503,8 +71487,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -71512,14 +71495,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71543,8 +71526,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71552,14 +71534,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -72294,7 +72276,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72305,7 +72287,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72316,23 +72298,23 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l29; + goto l26; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l29; + goto l26; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l29; + goto l26; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l29; + goto l26; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72348,39 +72330,39 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l29; + goto l26; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l29; + goto l26; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l29; + goto l26; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l29; + goto l26; } if (oop == GIV(nilObj)) { print("nil"); - goto l29; + goto l26; } if (oop == GIV(trueObj)) { print("true"); - goto l29; + goto l26; } if (oop == GIV(falseObj)) { print("false"); - goto l29; + goto l26; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l29; + goto l26; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72393,7 +72375,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l29; + goto l26; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72401,7 +72383,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l29; + goto l26; } } if ((nameLen == 9) @@ -72412,7 +72394,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l29; + goto l26; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72426,7 +72408,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l29; + goto l26; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72439,12 +72421,12 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l30; + goto l27; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72455,7 +72437,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l30: ; + l27: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72463,9 +72445,9 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l29: /* end printOopShortInner: */; + l26: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72479,8 +72461,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72488,14 +72469,14 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l20; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72547,7 +72528,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72558,7 +72539,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72569,23 +72550,23 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l32; + goto l29; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l32; + goto l29; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l32; + goto l29; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l32; + goto l29; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72601,39 +72582,39 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l32; + goto l29; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l32; + goto l29; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l32; + goto l29; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l32; + goto l29; } if (oop == GIV(nilObj)) { print("nil"); - goto l32; + goto l29; } if (oop == GIV(trueObj)) { print("true"); - goto l32; + goto l29; } if (oop == GIV(falseObj)) { print("false"); - goto l32; + goto l29; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l32; + goto l29; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72646,7 +72627,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l32; + goto l29; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72654,7 +72635,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l32; + goto l29; } } if ((nameLen == 9) @@ -72665,7 +72646,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l32; + goto l29; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72679,7 +72660,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l32; + goto l29; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72692,12 +72673,12 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l33; + goto l30; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72708,7 +72689,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l33: ; + l30: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72716,9 +72697,9 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l32: /* end printOopShortInner: */; + l29: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72732,8 +72713,7 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -72741,14 +72721,14 @@ longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l24; + goto l19; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l24: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -72801,7 +72781,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72812,7 +72792,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72823,23 +72803,23 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar(')'); - goto l35; + goto l32; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l35; + goto l32; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l35; + goto l32; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l35; + goto l32; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72855,39 +72835,39 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l35; + goto l32; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l35; + goto l32; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l35; + goto l32; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l35; + goto l32; } if (oop == GIV(nilObj)) { print("nil"); - goto l35; + goto l32; } if (oop == GIV(trueObj)) { print("true"); - goto l35; + goto l32; } if (oop == GIV(falseObj)) { print("false"); - goto l35; + goto l32; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l35; + goto l32; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72900,7 +72880,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('\''); - goto l35; + goto l32; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72908,7 +72888,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l35; + goto l32; } } if ((nameLen == 9) @@ -72919,7 +72899,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l35; + goto l32; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72933,7 +72913,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l35; + goto l32; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72946,12 +72926,12 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l37; + goto l34; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l36; + goto l33; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72962,7 +72942,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo } theClass1 = objOop1; } - l36: ; + l33: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72970,9 +72950,9 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l37: ; + l34: ; } - l35: /* end printOopShortInner: */; + l32: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72987,8 +72967,7 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -72996,14 +72975,14 @@ longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(HeaderIndex) << (shiftFo followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l28; + goto l21; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l28: /* end objectAfter:limit: */; + l21: /* end objectAfter:limit: */; } } @@ -74325,7 +74304,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -74677,6 +74656,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); return dataSize; } @@ -74787,11 +74767,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -75096,14 +75078,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -75120,6 +75111,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -75132,21 +75124,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); assert(isOopCompiledMethod(GIV(method))); @@ -75154,12 +75150,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? 256 : 0); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !0, __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -75175,6 +75174,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -75188,11 +75188,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -75212,6 +75215,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -75384,15 +75391,27 @@ schedulerPointer(void) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* StackInterpreter>>#sendInvokeCallbackContext: */ EXPORT(sqInt) @@ -75426,6 +75445,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) char *sp7; sqInt table; + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -75438,8 +75458,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin push: */ object3 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); longAtput((sp3 = GIV(stackPointer) - BytesPerWord), object3); @@ -75552,6 +75574,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ interpret(); return 1; @@ -76196,7 +76219,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -77153,7 +77176,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -78006,6 +78029,7 @@ transferTo(sqInt newProc) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin setMethod: */ @@ -78324,8 +78348,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -78333,14 +78356,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -78369,8 +78392,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -78378,14 +78400,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -78416,8 +78438,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -78425,14 +78446,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return activeContext; } @@ -78889,10 +78910,9 @@ primitiveClosureCopyWithCopiedValues(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt copiedValues; sqInt i; - sqInt initialIP; sqInt integerPointer; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -78927,7 +78947,6 @@ primitiveClosureCopyWithCopiedValues(void) return; } /* begin closureIn:numArgs:instructionPointer:copiedValues: */ - initialIP = (GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize); copiedValues = longAt(GIV(stackPointer)); /* begin numSlotsOf: */ assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); @@ -78973,7 +78992,7 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), longAt(GIV(stackPointer) + (2 * BytesPerWord))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 3) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)((GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize)) << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((sqInt)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 3) | 1)); @@ -81621,7 +81640,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -81658,7 +81677,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -82116,7 +82135,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -82422,7 +82441,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -82735,8 +82754,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -83119,8 +83139,10 @@ primitiveTerminateTo(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -83206,7 +83228,6 @@ primitiveVMParameter(void) char *sp1; char *sp2; sqInt tagBits; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -83256,6 +83277,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -83265,165 +83287,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -83431,9 +83417,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -83441,213 +83427,118 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = GIV(nilObj); + valuePointer35 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = GIV(nilObj); + valuePointer36 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)((((GIV(preemptionYields) + valuePointer37 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = GIV(nilObj); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = GIV(nilObj); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = ConstZero; + valuePointer48 = ConstZero; assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -83676,7 +83567,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -83709,14 +83600,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -83792,7 +83686,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -83908,48 +83802,42 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l93; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l93: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -84015,11 +83903,11 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if ((((usqInt)arg)) > 0x1F) { /* begin primitiveFailFor: */ GIV(primFailCode) = PrimErrUnsupported; - goto l70; + goto l82; } GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l70: /* end setCogVMFlags: */; + l82: /* end setCogVMFlags: */; } } if (index == 49) { @@ -84267,8 +84155,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -84276,14 +84163,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -84322,8 +84209,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -84331,14 +84217,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -84370,8 +84256,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -84379,14 +84264,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -84435,6 +84320,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -84480,6 +84366,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spurlowcodestack64src/vm/interp.h b/spurlowcodestack64src/vm/interp.h index c3521a146..8e998e98e 100644 --- a/spurlowcodestack64src/vm/interp.h +++ b/spurlowcodestack64src/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2134 uuid: 4721ad0c-159c-4bf2-9f3e-c9917fcdead5 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 8 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1152921504606846976 #define MaxSmallInteger 1152921504606846975 diff --git a/spurlowcodestack64src/vm/vmCallback.h b/spurlowcodestack64src/vm/vmCallback.h index f996f567b..3bf23acc7 100644 --- a/spurlowcodestack64src/vm/vmCallback.h +++ b/spurlowcodestack64src/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2134 uuid: 4721ad0c-159c-4bf2-9f3e-c9917fcdead5 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/spurlowcodestacksrc/vm/gcc3x-interp.c b/spurlowcodestacksrc/vm/gcc3x-interp.c index 74a4aa620..f78608143 100644 --- a/spurlowcodestacksrc/vm/gcc3x-interp.c +++ b/spurlowcodestacksrc/vm/gcc3x-interp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -458,6 +458,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -631,7 +632,7 @@ static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -892,8 +893,8 @@ static sqInt NoDbgRegParms noFixupFollowFieldofObject(sqInt fieldIndex, sqInt an static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -961,6 +962,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1060,14 +1062,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1215,6 +1218,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1421,9 +1425,9 @@ _iss sqInt argumentCount; _iss char * framePointer; _iss sqInt specialObjectsOop; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; -_iss sqInt messageSelector; _iss usqInt newMethod; +_iss sqInt messageSelector; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss usqInt instructionPointer; _iss sqInt needGCFlag; @@ -1522,6 +1526,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1535,11 +1541,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1572,6 +1576,7 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1589,7 +1594,6 @@ _iss char * shadowCallStack; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; #undef _iss #if SQ_USE_GLOBAL_STRUCT } fum; @@ -1617,6 +1621,7 @@ static struct foo * foo = &fum; #endif static void (*primitiveFunctionPointer)(); sqInt checkForLeaks; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; @@ -1629,6 +1634,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; char * breakSelector; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2210,7 +2218,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.2142]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.2165]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -5964,11 +5972,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l1684; + goto l1681; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l1684: /* end getErrorObjectFromPrimFailCode */; + l1681: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6407,18 +6415,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -6528,7 +6540,7 @@ interpret(void) CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -6796,7 +6808,7 @@ interpret(void) sqInt longIndex; sqInt longIndex1; char*memoryPointer; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt newObj1; sqInt newValue; @@ -7693,7 +7705,7 @@ interpret(void) goto l489; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l489; } if (fmt >= (firstShortFormat())) { @@ -7708,7 +7720,7 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -7722,7 +7734,7 @@ interpret(void) case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -12459,9 +12471,8 @@ interpret(void) sqInt blockSize; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -12489,7 +12500,6 @@ interpret(void) context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l549: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -12528,7 +12538,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -13126,7 +13136,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1704; + goto l1703; } if (bytecode == 172) { @@ -13135,7 +13145,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1704; + goto l1703; } if (bytecode > 167) { @@ -13145,7 +13155,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1704; + goto l1703; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -13153,7 +13163,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l1704: /* end case */; + l1703: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -13264,7 +13274,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1707; + goto l1706; } if (bytecode == 172) { @@ -13274,14 +13284,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1707; + goto l1706; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l1707: /* end case */; + l1706: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -13925,7 +13935,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -14193,7 +14203,7 @@ interpret(void) sqLong hdr1; sqInt index; sqInt index1; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots11; @@ -14453,7 +14463,7 @@ interpret(void) if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -15920,7 +15930,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1708; + goto l1707; } if (bytecode == 239) { @@ -15929,7 +15939,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1708; + goto l1707; } if (bytecode == 238) { @@ -15939,7 +15949,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1708; + goto l1707; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -15947,7 +15957,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l1708: /* end case */; + l1707: /* end case */; BREAK; CASE(355) /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -16058,7 +16068,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1711; + goto l1710; } if (bytecode == 239) { @@ -16068,14 +16078,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1711; + goto l1710; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l1711: /* end case */; + l1710: /* end case */; BREAK; CASE(356) /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -16719,7 +16729,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -16987,7 +16997,7 @@ interpret(void) sqLong hdr1; sqInt index; sqInt index1; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots11; @@ -17247,7 +17257,7 @@ interpret(void) if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -18201,10 +18211,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l1713; + goto l1712; } ourContext = marryFrameSP(localFP, localSP); - l1713: /* end ensureFrameIsMarried:SP: */; + l1712: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -18407,7 +18417,7 @@ interpret(void) CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -18555,6 +18565,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l1099; } @@ -19441,7 +19452,7 @@ interpret(void) sqInt longIndex; sqInt longIndex1; char*memoryPointer; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt newObj1; sqInt newValue; @@ -20338,7 +20349,7 @@ interpret(void) goto l1416; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l1416; } if (fmt >= (firstShortFormat())) { @@ -20353,7 +20364,7 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -20367,7 +20378,7 @@ interpret(void) case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -25006,8 +25017,8 @@ interpret(void) sqInt header; sqInt i; int ignoreContext; - sqInt newClosure; - sqInt newClosure1; + usqInt newClosure; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -25046,7 +25057,7 @@ interpret(void) /* begin ensureFrameIsMarried:SP: */ if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); - longAt(localFP + FoxThisContext); + context = longAt(localFP + FoxThisContext); goto l1574; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); @@ -25135,9 +25146,8 @@ interpret(void) sqInt byte; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -25162,7 +25172,6 @@ interpret(void) context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l1592: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -25201,7 +25210,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -26227,16 +26236,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -26277,7 +26286,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -26433,7 +26442,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -26500,7 +26509,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -26569,7 +26578,7 @@ positive64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -26964,7 +26973,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -27002,7 +27010,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -27763,8 +27771,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -27943,8 +27951,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28125,7 +28133,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -28310,8 +28318,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28715,7 +28723,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -28809,8 +28817,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -29032,7 +29040,7 @@ primitiveClosureValue(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -29155,7 +29163,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -29275,7 +29283,7 @@ primitiveClosureValueWithArgs(void) sqInt i; sqInt index; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -29573,7 +29581,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -29583,7 +29591,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -29594,7 +29602,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -29611,7 +29619,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -29623,8 +29631,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -29642,7 +29649,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -29760,7 +29767,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -30473,8 +30480,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -30540,7 +30547,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -30598,7 +30605,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -31326,8 +31333,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -31335,14 +31341,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -31367,8 +31373,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -31376,14 +31381,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -31410,8 +31415,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -31419,14 +31423,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -31458,7 +31462,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -31666,7 +31670,7 @@ primitiveFullClosureValue(void) sqInt i; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -31782,7 +31786,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt i; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -31895,7 +31899,7 @@ primitiveFullClosureValueWithArgs(void) sqInt index; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -32075,6 +32079,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -32307,7 +32358,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -32493,7 +32544,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -32668,7 +32719,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -33881,7 +33932,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -34117,7 +34168,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -34427,7 +34478,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -34521,7 +34572,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -34582,7 +34633,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -34726,8 +34777,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -34735,18 +34785,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -34769,8 +34819,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -34778,18 +34827,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -34801,8 +34850,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -34810,22 +34858,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -36659,7 +36707,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -36720,7 +36768,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -37981,7 +38029,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -39281,8 +39329,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -39290,14 +39337,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39322,8 +39369,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -39331,14 +39377,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -39365,8 +39411,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -39374,14 +39419,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -39733,7 +39778,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -39822,7 +39867,7 @@ signed64BitValueOf(sqInt oop) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -40124,8 +40169,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40533,9 +40577,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -40710,7 +40754,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -40779,7 +40823,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -40875,7 +40919,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -40891,7 +40935,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -40902,7 +40946,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -41356,8 +41400,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41365,14 +41408,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41395,8 +41438,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -41404,14 +41446,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -41457,8 +41499,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41466,14 +41507,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -41605,7 +41646,6 @@ copyAndForwardMourner(sqInt mourner) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -41635,12 +41675,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -41679,7 +41718,6 @@ copyAndForward(sqInt survivor) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -41725,12 +41763,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -41765,12 +41802,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -41967,7 +42004,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -42496,8 +42533,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -42942,8 +42978,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42951,14 +42986,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -42984,8 +43019,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -42993,14 +43027,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43015,8 +43049,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -43024,14 +43057,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -43405,7 +43438,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -43413,7 +43446,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -43424,8 +43457,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43466,8 +43498,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43475,14 +43506,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43521,8 +43552,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -43569,8 +43599,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43578,14 +43607,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -43634,8 +43663,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -43643,14 +43671,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43696,8 +43724,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -43751,8 +43778,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -43760,14 +43786,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -43826,7 +43852,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -43843,7 +43869,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -43943,8 +43969,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43980,8 +44005,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43989,14 +44013,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44033,8 +44057,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -44042,14 +44065,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44079,8 +44102,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44088,14 +44110,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -44206,8 +44228,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44215,14 +44236,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44246,8 +44267,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44255,14 +44275,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -44288,8 +44308,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44297,14 +44316,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -44346,8 +44365,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44355,14 +44373,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -45425,8 +45443,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45434,14 +45451,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45486,8 +45503,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45495,14 +45511,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -45582,8 +45598,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45591,14 +45606,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -45754,12 +45769,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -45802,8 +45817,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45811,14 +45825,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45869,12 +45883,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -45917,8 +45931,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45926,14 +45939,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46026,12 +46039,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -46090,8 +46103,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46099,14 +46111,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -46156,7 +46168,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -46197,7 +46209,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -46791,8 +46803,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46800,14 +46811,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -46876,8 +46887,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46885,14 +46895,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46913,8 +46923,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46922,14 +46931,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46952,8 +46961,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46961,14 +46969,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -47348,8 +47356,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47357,14 +47364,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47396,8 +47403,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -47405,14 +47411,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47446,8 +47452,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -47455,14 +47460,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -47748,7 +47753,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -48002,8 +48006,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48011,14 +48014,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48041,8 +48044,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48050,14 +48052,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -48293,8 +48295,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48302,14 +48303,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48342,8 +48343,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48351,14 +48351,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48393,8 +48393,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48402,14 +48401,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -48489,8 +48488,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48498,14 +48496,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48535,8 +48533,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48544,14 +48541,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48583,8 +48580,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48592,14 +48588,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49187,7 +49183,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -49511,8 +49507,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49520,14 +49515,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49550,8 +49545,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -49559,14 +49553,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49591,8 +49585,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49600,14 +49593,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -49665,7 +49658,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -49673,7 +49666,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -49712,10 +49705,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -49766,8 +49759,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49775,14 +49767,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -49819,11 +49811,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -51264,8 +51256,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -51287,8 +51278,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51332,7 +51322,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -51340,7 +51330,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -51348,7 +51338,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -51356,11 +51346,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -51370,7 +51360,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -51378,11 +51368,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -51395,8 +51385,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -51404,17 +51393,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -51438,7 +51427,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -51455,7 +51444,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -51476,8 +51465,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -51485,17 +51473,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -51503,8 +51491,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -51512,17 +51499,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -51542,7 +51529,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -51602,8 +51588,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -51611,14 +51596,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -51744,8 +51729,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51753,14 +51737,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -51790,8 +51774,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -51799,14 +51782,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51829,8 +51812,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -51838,14 +51820,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -51951,8 +51933,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -51960,14 +51941,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52021,8 +52002,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52030,14 +52010,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -52093,8 +52073,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -52102,14 +52081,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -52250,7 +52229,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52276,7 +52255,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52301,7 +52280,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52327,7 +52306,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52350,8 +52329,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52359,14 +52337,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -52838,7 +52816,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -53078,7 +53056,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -53429,8 +53407,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53466,7 +53443,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -53481,7 +53458,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -53729,8 +53706,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53752,8 +53728,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -53776,8 +53751,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -53798,8 +53772,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -53877,8 +53850,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53886,14 +53858,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53915,8 +53887,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -53924,14 +53895,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -53956,8 +53927,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -53965,14 +53935,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -54081,8 +54051,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54168,8 +54137,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54177,14 +54145,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -54219,8 +54187,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -54228,14 +54195,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54263,8 +54230,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54272,14 +54238,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -54422,8 +54388,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54905,8 +54870,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54914,14 +54878,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54952,8 +54916,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54961,14 +54924,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55001,8 +54964,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55010,14 +54972,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55121,8 +55083,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55130,14 +55091,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55175,8 +55136,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55184,14 +55144,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55231,8 +55191,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55240,14 +55199,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55373,8 +55332,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55382,14 +55340,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55419,8 +55377,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55428,14 +55385,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55458,8 +55415,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55467,14 +55423,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -55550,8 +55506,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55559,14 +55514,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55594,8 +55549,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55603,14 +55557,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -55633,8 +55587,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55642,14 +55595,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -55995,8 +55948,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56004,14 +55956,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56041,8 +55993,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56050,14 +56001,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56080,8 +56031,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56089,14 +56039,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56222,8 +56172,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56231,14 +56180,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56267,8 +56216,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56276,14 +56224,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56314,8 +56262,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56323,14 +56270,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56413,8 +56360,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56422,14 +56368,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56465,8 +56411,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56474,14 +56419,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56519,8 +56464,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56528,14 +56472,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56619,8 +56563,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56628,14 +56571,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56665,8 +56608,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56674,14 +56616,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56704,8 +56646,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56713,14 +56654,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56930,8 +56871,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56939,14 +56879,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56974,8 +56914,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56983,14 +56922,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57011,8 +56950,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57020,14 +56958,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57101,13 +57039,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57115,15 +57053,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57133,7 +57071,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57157,8 +57095,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -57166,14 +57103,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57194,13 +57131,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57208,15 +57145,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57226,7 +57163,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57250,8 +57187,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57259,14 +57195,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57288,13 +57224,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -57302,15 +57238,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -57320,7 +57256,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -57345,8 +57281,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57354,14 +57289,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57791,7 +57726,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -57801,8 +57735,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -57853,7 +57786,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -58046,6 +57979,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -58161,7 +58104,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -58178,7 +58121,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -58202,7 +58145,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -58219,7 +58162,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -58285,8 +58228,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -58449,7 +58391,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -59131,11 +59073,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -59150,7 +59092,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -59164,8 +59106,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59173,16 +59114,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -59206,8 +59147,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59215,14 +59155,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -59242,16 +59182,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -59260,11 +59200,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -59272,7 +59212,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -59340,8 +59280,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -59349,14 +59288,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -59455,8 +59394,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59476,8 +59414,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -59485,14 +59422,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -59550,8 +59487,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59628,7 +59564,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -59650,7 +59586,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -59699,7 +59635,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -59713,8 +59649,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59722,16 +59657,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -59796,8 +59731,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59805,14 +59739,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -59831,9 +59765,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -59849,9 +59780,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -59879,9 +59809,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -59892,8 +59821,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59903,9 +59831,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -59963,7 +59890,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -60038,8 +59965,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60095,8 +60021,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60104,14 +60029,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -60174,8 +60099,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60183,14 +60107,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -60306,8 +60230,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60315,14 +60238,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -60361,7 +60284,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -60523,13 +60446,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l65; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l65: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l66; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -60537,15 +60460,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l66; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l66; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l66; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -60555,7 +60478,7 @@ updatePointers(void) assert((header1 & 1)); numLiterals1 = ((header1 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -60582,8 +60505,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -60591,14 +60513,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -60610,7 +60532,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -60623,13 +60545,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -60637,15 +60559,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots22); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -60655,7 +60577,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals2 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -60683,8 +60605,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -60692,16 +60613,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l33; + goto l35; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l33: /* end objectAfter:limit: */; + l35: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -60742,13 +60663,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -60756,15 +60677,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -60774,7 +60695,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals3 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -60811,8 +60732,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -60847,7 +60767,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -60860,8 +60780,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -60869,18 +60788,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -60903,13 +60822,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -60917,15 +60836,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots2); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -60935,7 +60854,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -60964,8 +60883,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60973,14 +60891,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } } @@ -61175,8 +61093,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61184,14 +61101,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -61276,7 +61193,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -61376,8 +61293,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -61544,7 +61461,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -61660,8 +61577,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61669,24 +61585,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -61749,8 +61665,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -61979,8 +61895,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); @@ -62549,8 +62465,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -62558,14 +62473,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -62586,8 +62501,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -62595,14 +62509,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -62625,8 +62539,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -62634,14 +62547,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -63519,7 +63432,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -63529,7 +63442,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -63617,9 +63530,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -63725,6 +63638,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -64296,8 +64238,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -64305,14 +64246,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -64364,8 +64305,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -64373,14 +64313,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64434,8 +64374,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -64443,20 +64382,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -64489,8 +64428,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64498,14 +64436,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64530,8 +64468,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -64539,14 +64476,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64573,8 +64510,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -64582,16 +64518,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -64674,8 +64610,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -64752,8 +64689,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -64875,8 +64813,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66401,8 +66340,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* To overflow the stack this must be a new frame, but in Cog base frames are married. */ assert(!(frameHasContext(GIV(framePointer)))); @@ -67518,7 +67458,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67695,7 +67635,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67863,7 +67803,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -68189,7 +68129,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -68679,8 +68619,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); GIV(method) = aMethodObj; @@ -68731,7 +68672,6 @@ marryFrameSP(char *theFP, char *theSP) numArgs = byteAt((theFP + FoxFrameFlags) + 1); numStack = (((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1)); if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) { - /* begin pushedReceiverOrClosureOfFrame: */ closureOrNil = longAt(theFP + (frameStackedReceiverOffset(theFP))); } else { @@ -68930,18 +68870,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* StackInterpreter>>#methodHeaderIndicatesLargeFrame: */ @@ -69212,7 +69153,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69385,6 +69326,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -69446,7 +69420,7 @@ popthenPush(sqInt nItems, sqInt oop) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69507,8 +69481,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -69620,7 +69594,7 @@ positive64BitIntegerFor(usqLong integerValue) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -70064,8 +70038,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -70073,14 +70046,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -70111,8 +70084,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -70120,14 +70092,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70151,8 +70123,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -70160,14 +70131,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -70896,7 +70867,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -70907,23 +70878,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -70939,38 +70910,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -70983,7 +70954,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -70991,7 +70962,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -71002,7 +70973,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71016,7 +70987,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71029,12 +71000,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71045,7 +71016,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71053,9 +71024,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71069,8 +71040,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71078,14 +71048,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71132,7 +71102,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71143,23 +71113,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71175,38 +71145,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71219,7 +71189,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71227,7 +71197,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -71238,7 +71208,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71252,7 +71222,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71265,12 +71235,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71281,7 +71251,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71289,9 +71259,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71305,8 +71275,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71314,14 +71283,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71369,7 +71338,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71380,23 +71349,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71412,38 +71381,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71456,7 +71425,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71464,7 +71433,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -71475,7 +71444,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71489,7 +71458,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71502,12 +71471,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71518,7 +71487,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71526,9 +71495,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71543,8 +71512,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71552,14 +71520,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -72868,7 +72836,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -73220,6 +73188,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); return dataSize; } @@ -73330,11 +73299,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73544,7 +73515,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); /* begin fetchPointer:ofObject: */ methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); @@ -73640,14 +73611,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -73664,6 +73644,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -73676,21 +73657,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); assert(isOopCompiledMethod(GIV(method))); @@ -73698,12 +73683,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? 256 : 0); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !0, __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -73719,6 +73707,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -73732,11 +73721,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73756,6 +73748,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -73923,15 +73919,27 @@ schedulerPointer(void) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* StackInterpreter>>#sendInvokeCallbackContext: */ EXPORT(sqInt) @@ -73965,6 +73973,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) char *sp7; sqInt table; + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -73977,8 +73986,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin push: */ object3 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); longAtput((sp3 = GIV(stackPointer) - BytesPerWord), object3); @@ -74091,6 +74102,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ interpret(); return 1; @@ -74736,7 +74748,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -75723,7 +75735,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -75838,7 +75850,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -76618,6 +76630,7 @@ transferTo(sqInt newProc) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin setMethod: */ @@ -76931,8 +76944,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -76940,14 +76952,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -76976,8 +76988,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -76985,14 +76996,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -77023,8 +77034,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -77032,14 +77042,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return activeContext; } @@ -77491,10 +77501,9 @@ primitiveClosureCopyWithCopiedValues(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt copiedValues; sqInt i; - sqInt initialIP; sqInt integerPointer; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -77529,7 +77538,6 @@ primitiveClosureCopyWithCopiedValues(void) return; } /* begin closureIn:numArgs:instructionPointer:copiedValues: */ - initialIP = (GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize); copiedValues = longAt(GIV(stackPointer)); /* begin numSlotsOf: */ assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); @@ -77575,7 +77583,7 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), longAt(GIV(stackPointer) + (2 * BytesPerWord))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)((GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -77614,8 +77622,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -80008,7 +80016,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -80365,7 +80373,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -80402,7 +80410,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -80862,7 +80870,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -81014,7 +81022,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -81218,7 +81226,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -81511,8 +81519,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -81895,8 +81904,10 @@ primitiveTerminateTo(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -81983,7 +81994,6 @@ primitiveVMParameter(void) char *sp; char *sp1; char *sp2; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -82033,6 +82043,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -82042,165 +82053,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -82208,9 +82183,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -82218,213 +82193,118 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = GIV(nilObj); + valuePointer35 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = GIV(nilObj); + valuePointer36 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)((((GIV(preemptionYields) + valuePointer37 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = GIV(nilObj); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = GIV(nilObj); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = ConstZero; + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = ConstZero; + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -82453,7 +82333,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -82486,14 +82366,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -82569,7 +82452,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -82687,47 +82570,41 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l95; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l95: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -82793,11 +82670,11 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if ((((usqInt)arg)) > 0x1F) { /* begin primitiveFailFor: */ GIV(primFailCode) = PrimErrUnsupported; - goto l72; + goto l84; } GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l72: /* end setCogVMFlags: */; + l84: /* end setCogVMFlags: */; } } if (index == 49) { @@ -82820,14 +82697,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l93; + goto l96; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l93: /* end floatValueOf: */; + l96: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -83053,8 +82930,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -83062,14 +82938,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -83104,8 +82980,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -83113,14 +82988,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -83148,8 +83023,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -83157,14 +83031,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -83213,6 +83087,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -83258,6 +83133,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spurlowcodestacksrc/vm/interp.c b/spurlowcodestacksrc/vm/interp.c index 5d31a887c..032ffa74a 100644 --- a/spurlowcodestacksrc/vm/interp.c +++ b/spurlowcodestacksrc/vm/interp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -455,6 +455,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -628,7 +629,7 @@ static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -889,8 +890,8 @@ static sqInt NoDbgRegParms noFixupFollowFieldofObject(sqInt fieldIndex, sqInt an static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -958,6 +959,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1057,14 +1059,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1212,6 +1215,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1418,9 +1422,9 @@ _iss sqInt argumentCount; _iss char * framePointer; _iss sqInt specialObjectsOop; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; -_iss sqInt messageSelector; _iss usqInt newMethod; +_iss sqInt messageSelector; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss usqInt instructionPointer; _iss sqInt needGCFlag; @@ -1519,6 +1523,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1532,11 +1538,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1569,6 +1573,7 @@ _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; _iss sqInt theUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt atCache[AtCacheTotalSize + 1 /* 65 */]; _iss sqInt remapBuffer[RemapBufferSize + 1 /* 26 */]; @@ -1586,7 +1591,6 @@ _iss char * shadowCallStack; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; #undef _iss #if SQ_USE_GLOBAL_STRUCT } fum; @@ -1614,6 +1618,7 @@ static struct foo * foo = &fum; #endif static void (*primitiveFunctionPointer)(); sqInt checkForLeaks; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt desiredEdenBytes; sqInt desiredNumStackPages; @@ -1626,6 +1631,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; char * breakSelector; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2207,7 +2215,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.2142]"; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives VMMaker.oscog-eem.2165]"; volatile int sendTrace; sqInt suppressHeartbeatFlag; @@ -5955,11 +5963,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l1684; + goto l1681; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l1684: /* end getErrorObjectFromPrimFailCode */; + l1681: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6398,18 +6406,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -6519,7 +6531,7 @@ interpret(void) case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -6787,7 +6799,7 @@ interpret(void) sqInt longIndex; sqInt longIndex1; char*memoryPointer; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt newObj1; sqInt newValue; @@ -7684,7 +7696,7 @@ interpret(void) goto l489; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l489; } if (fmt >= (firstShortFormat())) { @@ -7699,7 +7711,7 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -7713,7 +7725,7 @@ interpret(void) case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -12450,9 +12462,8 @@ interpret(void) sqInt blockSize; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -12480,7 +12491,6 @@ interpret(void) context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l549: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -12519,7 +12529,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -13117,7 +13127,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1704; + goto l1703; } if (bytecode == 172) { @@ -13126,7 +13136,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1704; + goto l1703; } if (bytecode > 167) { @@ -13136,7 +13146,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1704; + goto l1703; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -13144,7 +13154,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l1704: /* end case */; + l1703: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -13255,7 +13265,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1707; + goto l1706; } if (bytecode == 172) { @@ -13265,14 +13275,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1707; + goto l1706; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l1707: /* end case */; + l1706: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -13916,7 +13926,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -14184,7 +14194,7 @@ interpret(void) sqLong hdr1; sqInt index; sqInt index1; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots11; @@ -14444,7 +14454,7 @@ interpret(void) if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -15911,7 +15921,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1708; + goto l1707; } if (bytecode == 239) { @@ -15920,7 +15930,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l1708; + goto l1707; } if (bytecode == 238) { @@ -15930,7 +15940,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1708; + goto l1707; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -15938,7 +15948,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l1708: /* end case */; + l1707: /* end case */; break; case 355: /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -16049,7 +16059,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1711; + goto l1710; } if (bytecode == 239) { @@ -16059,14 +16069,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l1711; + goto l1710; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l1711: /* end case */; + l1710: /* end case */; break; case 356: /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -16710,7 +16720,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -16978,7 +16988,7 @@ interpret(void) sqLong hdr1; sqInt index; sqInt index1; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots11; @@ -17238,7 +17248,7 @@ interpret(void) if (fmt2 < ((firstByteFormat()) + 32)) { if (fmt2 < ((firstShortFormat()) + 32)) { /* begin fetchLong32:ofObject: */ - result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); } else { /* begin fetchUnsignedShort16:ofObject: */ @@ -18192,10 +18202,10 @@ interpret(void) if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l1713; + goto l1712; } ourContext = marryFrameSP(localFP, localSP); - l1713: /* end ensureFrameIsMarried:SP: */; + l1712: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -18398,7 +18408,7 @@ interpret(void) case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -18546,6 +18556,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l1099; } @@ -19432,7 +19443,7 @@ interpret(void) sqInt longIndex; sqInt longIndex1; char*memoryPointer; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt newObj1; sqInt newValue; @@ -20329,7 +20340,7 @@ interpret(void) goto l1416; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l1416; } if (fmt >= (firstShortFormat())) { @@ -20344,7 +20355,7 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -20358,7 +20369,7 @@ interpret(void) case 6: /* begin num64BitUnitsOf: */ objOop41 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop41))) >> 3)); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -24997,8 +25008,8 @@ interpret(void) sqInt header; sqInt i; int ignoreContext; - sqInt newClosure; - sqInt newClosure1; + usqInt newClosure; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -25037,7 +25048,7 @@ interpret(void) /* begin ensureFrameIsMarried:SP: */ if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { assert(isContext(frameContext(localFP))); - longAt(localFP + FoxThisContext); + context = longAt(localFP + FoxThisContext); goto l1574; } context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); @@ -25126,9 +25137,8 @@ interpret(void) sqInt byte; sqInt context; sqInt i; - sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -25153,7 +25163,6 @@ interpret(void) context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); l1592: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ - initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ objFormat = indexablePointersFormat(); numSlots = ClosureFirstCopiedValueIndex + numCopied; @@ -25192,7 +25201,7 @@ interpret(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -26218,16 +26227,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -26268,7 +26277,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -26424,7 +26433,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -26491,7 +26500,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -26560,7 +26569,7 @@ positive64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -26955,7 +26964,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -26993,7 +27001,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -27754,8 +27762,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -27934,8 +27942,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28116,7 +28124,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -28301,8 +28309,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28706,7 +28714,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -28800,8 +28808,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -29023,7 +29031,7 @@ primitiveClosureValue(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -29146,7 +29154,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt closureMethod; sqInt i; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt objOop; @@ -29266,7 +29274,7 @@ primitiveClosureValueWithArgs(void) sqInt i; sqInt index; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -29564,7 +29572,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -29574,7 +29582,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -29585,7 +29593,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -29602,7 +29610,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -29614,8 +29622,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -29633,7 +29640,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -29751,7 +29758,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -30464,8 +30471,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -30531,7 +30538,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -30589,7 +30596,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -31317,8 +31324,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -31326,14 +31332,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -31358,8 +31364,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -31367,14 +31372,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -31401,8 +31406,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -31410,14 +31414,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -31449,7 +31453,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -31657,7 +31661,7 @@ primitiveFullClosureValue(void) sqInt i; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -31773,7 +31777,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt i; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -31886,7 +31890,7 @@ primitiveFullClosureValueWithArgs(void) sqInt index; sqInt methodHeader; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -32066,6 +32070,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -32298,7 +32349,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -32484,7 +32535,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -32659,7 +32710,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -33872,7 +33923,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -34108,7 +34159,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -34418,7 +34469,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -34512,7 +34563,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -34573,7 +34624,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -34717,8 +34768,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -34726,18 +34776,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -34760,8 +34810,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -34769,18 +34818,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -34792,8 +34841,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -34801,22 +34849,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -36650,7 +36698,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -36711,7 +36759,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -37972,7 +38020,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -39272,8 +39320,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -39281,14 +39328,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39313,8 +39360,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -39322,14 +39368,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -39356,8 +39402,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -39365,14 +39410,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -39724,7 +39769,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -39813,7 +39858,7 @@ signed64BitValueOf(sqInt oop) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -40115,8 +40160,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40524,9 +40568,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -40701,7 +40745,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -40770,7 +40814,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -40866,7 +40910,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -40882,7 +40926,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -40893,7 +40937,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -41347,8 +41391,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41356,14 +41399,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41386,8 +41429,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -41395,14 +41437,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -41448,8 +41490,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41457,14 +41498,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -41596,7 +41637,6 @@ copyAndForwardMourner(sqInt mourner) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -41626,12 +41666,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -41670,7 +41709,6 @@ copyAndForward(sqInt survivor) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -41716,12 +41754,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -41756,12 +41793,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -41958,7 +41995,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -42487,8 +42524,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -42933,8 +42969,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42942,14 +42977,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -42975,8 +43010,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -42984,14 +43018,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43006,8 +43040,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -43015,14 +43048,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -43396,7 +43429,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -43404,7 +43437,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -43415,8 +43448,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43457,8 +43489,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43466,14 +43497,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43512,8 +43543,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -43560,8 +43590,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43569,14 +43598,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -43625,8 +43654,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -43634,14 +43662,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -43687,8 +43715,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -43742,8 +43769,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -43751,14 +43777,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -43817,7 +43843,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -43834,7 +43860,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -43934,8 +43960,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43971,8 +43996,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -43980,14 +44004,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44024,8 +44048,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -44033,14 +44056,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44070,8 +44093,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44079,14 +44101,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -44197,8 +44219,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44206,14 +44227,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44237,8 +44258,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44246,14 +44266,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -44279,8 +44299,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44288,14 +44307,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -44337,8 +44356,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44346,14 +44364,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -45416,8 +45434,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45425,14 +45442,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45477,8 +45494,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45486,14 +45502,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -45573,8 +45589,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -45582,14 +45597,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -45745,12 +45760,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -45793,8 +45808,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -45802,14 +45816,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -45860,12 +45874,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -45908,8 +45922,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -45917,14 +45930,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46017,12 +46030,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -46081,8 +46094,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46090,14 +46102,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -46147,7 +46159,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -46188,7 +46200,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -46782,8 +46794,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46791,14 +46802,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -46867,8 +46878,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46876,14 +46886,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46904,8 +46914,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46913,14 +46922,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46943,8 +46952,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46952,14 +46960,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -47339,8 +47347,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47348,14 +47355,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47387,8 +47394,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -47396,14 +47402,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47437,8 +47443,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -47446,14 +47451,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -47739,7 +47744,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -47993,8 +47997,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48002,14 +48005,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48032,8 +48035,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48041,14 +48043,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -48284,8 +48286,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48293,14 +48294,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48333,8 +48334,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48342,14 +48342,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48384,8 +48384,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48393,14 +48392,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -48480,8 +48479,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48489,14 +48487,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48526,8 +48524,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48535,14 +48532,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48574,8 +48571,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48583,14 +48579,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49178,7 +49174,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -49502,8 +49498,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49511,14 +49506,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49541,8 +49536,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -49550,14 +49544,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49582,8 +49576,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49591,14 +49584,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -49656,7 +49649,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -49664,7 +49657,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -49703,10 +49696,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -49757,8 +49750,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49766,14 +49758,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -49810,11 +49802,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -51255,8 +51247,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -51278,8 +51269,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51323,7 +51313,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -51331,7 +51321,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -51339,7 +51329,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -51347,11 +51337,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -51361,7 +51351,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -51369,11 +51359,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -51386,8 +51376,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -51395,17 +51384,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -51429,7 +51418,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -51446,7 +51435,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -51467,8 +51456,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -51476,17 +51464,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -51494,8 +51482,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -51503,17 +51490,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -51533,7 +51520,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -51593,8 +51579,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -51602,14 +51587,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -51735,8 +51720,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51744,14 +51728,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -51781,8 +51765,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -51790,14 +51773,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51820,8 +51803,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -51829,14 +51811,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -51942,8 +51924,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -51951,14 +51932,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52012,8 +51993,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52021,14 +52001,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -52084,8 +52064,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -52093,14 +52072,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -52241,7 +52220,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52267,7 +52246,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52292,7 +52271,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52318,7 +52297,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52341,8 +52320,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52350,14 +52328,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -52829,7 +52807,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -53069,7 +53047,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -53420,8 +53398,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53457,7 +53434,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -53472,7 +53449,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -53720,8 +53697,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53743,8 +53719,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -53767,8 +53742,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -53789,8 +53763,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -53868,8 +53841,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -53877,14 +53849,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53906,8 +53878,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -53915,14 +53886,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -53947,8 +53918,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -53956,14 +53926,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -54072,8 +54042,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54159,8 +54128,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54168,14 +54136,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -54210,8 +54178,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -54219,14 +54186,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54254,8 +54221,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54263,14 +54229,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -54413,8 +54379,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54896,8 +54861,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54905,14 +54869,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54943,8 +54907,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54952,14 +54915,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -54992,8 +54955,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55001,14 +54963,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55112,8 +55074,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55121,14 +55082,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55166,8 +55127,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55175,14 +55135,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55222,8 +55182,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55231,14 +55190,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55364,8 +55323,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55373,14 +55331,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55410,8 +55368,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55419,14 +55376,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55449,8 +55406,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55458,14 +55414,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -55541,8 +55497,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55550,14 +55505,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55585,8 +55540,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55594,14 +55548,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -55624,8 +55578,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55633,14 +55586,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -55986,8 +55939,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55995,14 +55947,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56032,8 +55984,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56041,14 +55992,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56071,8 +56022,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56080,14 +56030,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56213,8 +56163,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56222,14 +56171,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56258,8 +56207,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56267,14 +56215,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56305,8 +56253,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56314,14 +56261,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56404,8 +56351,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56413,14 +56359,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56456,8 +56402,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56465,14 +56410,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56510,8 +56455,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56519,14 +56463,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56610,8 +56554,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56619,14 +56562,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56656,8 +56599,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56665,14 +56607,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56695,8 +56637,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56704,14 +56645,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56921,8 +56862,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56930,14 +56870,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56965,8 +56905,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56974,14 +56913,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57002,8 +56941,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57011,14 +56949,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57092,13 +57030,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57106,15 +57044,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57124,7 +57062,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57148,8 +57086,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -57157,14 +57094,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57185,13 +57122,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57199,15 +57136,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57217,7 +57154,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57241,8 +57178,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57250,14 +57186,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57279,13 +57215,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -57293,15 +57229,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -57311,7 +57247,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -57336,8 +57272,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57345,14 +57280,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57782,7 +57717,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -57792,8 +57726,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -57844,7 +57777,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -58037,6 +57970,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -58152,7 +58095,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -58169,7 +58112,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -58193,7 +58136,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -58210,7 +58153,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -58276,8 +58219,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -58440,7 +58382,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -59122,11 +59064,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -59141,7 +59083,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -59155,8 +59097,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59164,16 +59105,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -59197,8 +59138,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59206,14 +59146,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -59233,16 +59173,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -59251,11 +59191,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -59263,7 +59203,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -59331,8 +59271,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -59340,14 +59279,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -59446,8 +59385,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59467,8 +59405,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -59476,14 +59413,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -59541,8 +59478,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59619,7 +59555,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -59641,7 +59577,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -59690,7 +59626,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -59704,8 +59640,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59713,16 +59648,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -59787,8 +59722,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59796,14 +59730,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -59822,9 +59756,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -59840,9 +59771,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -59870,9 +59800,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -59883,8 +59812,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59894,9 +59822,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -59954,7 +59881,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -60029,8 +59956,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60086,8 +60012,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60095,14 +60020,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -60165,8 +60090,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60174,14 +60098,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -60297,8 +60221,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60306,14 +60229,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -60352,7 +60275,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -60514,13 +60437,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l65; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l65: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l66; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -60528,15 +60451,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l66; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l66; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l66; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -60546,7 +60469,7 @@ updatePointers(void) assert((header1 & 1)); numLiterals1 = ((header1 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -60573,8 +60496,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -60582,14 +60504,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -60601,7 +60523,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -60614,13 +60536,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -60628,15 +60550,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots22); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -60646,7 +60568,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals2 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -60674,8 +60596,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -60683,16 +60604,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l33; + goto l35; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l33: /* end objectAfter:limit: */; + l35: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -60733,13 +60654,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -60747,15 +60668,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -60765,7 +60686,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals3 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -60802,8 +60723,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -60838,7 +60758,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -60851,8 +60771,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -60860,18 +60779,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -60894,13 +60813,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -60908,15 +60827,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots2); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -60926,7 +60845,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -60955,8 +60874,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60964,14 +60882,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } } @@ -61166,8 +61084,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61175,14 +61092,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -61267,7 +61184,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -61367,8 +61284,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -61535,7 +61452,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -61651,8 +61568,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61660,24 +61576,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -61740,8 +61656,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -61970,8 +61886,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); @@ -62540,8 +62456,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -62549,14 +62464,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -62577,8 +62492,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -62586,14 +62500,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -62616,8 +62530,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -62625,14 +62538,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -63510,7 +63423,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -63520,7 +63433,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -63608,9 +63521,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -63716,6 +63629,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -64287,8 +64229,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -64296,14 +64237,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -64355,8 +64296,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -64364,14 +64304,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64425,8 +64365,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -64434,20 +64373,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -64480,8 +64419,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64489,14 +64427,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64521,8 +64459,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -64530,14 +64467,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64564,8 +64501,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -64573,16 +64509,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -64665,8 +64601,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -64743,8 +64680,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -64866,8 +64804,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66392,8 +66331,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* To overflow the stack this must be a new frame, but in Cog base frames are married. */ assert(!(frameHasContext(GIV(framePointer)))); @@ -67509,7 +67449,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67686,7 +67626,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67854,7 +67794,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -68180,7 +68120,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -68670,8 +68610,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); GIV(method) = aMethodObj; @@ -68722,7 +68663,6 @@ marryFrameSP(char *theFP, char *theSP) numArgs = byteAt((theFP + FoxFrameFlags) + 1); numStack = (((usqInt) ((theFP + FoxReceiver) - theSP)) >> (shiftForWord())) + (byteAt((theFP + FoxFrameFlags) + 1)); if ((byteAt((theFP + FoxFrameFlags) + 3)) != 0) { - /* begin pushedReceiverOrClosureOfFrame: */ closureOrNil = longAt(theFP + (frameStackedReceiverOffset(theFP))); } else { @@ -68921,18 +68861,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* StackInterpreter>>#methodHeaderIndicatesLargeFrame: */ @@ -69203,7 +69144,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69376,6 +69317,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -69437,7 +69411,7 @@ popthenPush(sqInt nItems, sqInt oop) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69498,8 +69472,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -69611,7 +69585,7 @@ positive64BitIntegerFor(usqLong integerValue) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -70055,8 +70029,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -70064,14 +70037,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -70102,8 +70075,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -70111,14 +70083,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70142,8 +70114,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -70151,14 +70122,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -70887,7 +70858,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -70898,23 +70869,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -70930,38 +70901,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -70974,7 +70945,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -70982,7 +70953,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -70993,7 +70964,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71007,7 +70978,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71020,12 +70991,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71036,7 +71007,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71044,9 +71015,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71060,8 +71031,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -71069,14 +71039,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71123,7 +71093,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71134,23 +71104,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71166,38 +71136,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71210,7 +71180,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71218,7 +71188,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -71229,7 +71199,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71243,7 +71213,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71256,12 +71226,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71272,7 +71242,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71280,9 +71250,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71296,8 +71266,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71305,14 +71274,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71360,7 +71329,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71371,23 +71340,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71403,38 +71372,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71447,7 +71416,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71455,7 +71424,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -71466,7 +71435,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71480,7 +71449,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71493,12 +71462,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71509,7 +71478,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71517,9 +71486,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71534,8 +71503,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71543,14 +71511,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -72859,7 +72827,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -73211,6 +73179,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); return dataSize; } @@ -73321,11 +73290,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73535,7 +73506,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); /* begin fetchPointer:ofObject: */ methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); @@ -73631,14 +73602,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -73655,6 +73635,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -73667,21 +73648,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ GIV(method) = longAt(GIV(framePointer) + FoxMethod); assert(isOopCompiledMethod(GIV(method))); @@ -73689,12 +73674,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? 256 : 0); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !0, __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -73710,6 +73698,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -73723,11 +73712,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73747,6 +73739,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -73914,15 +73910,27 @@ schedulerPointer(void) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* StackInterpreter>>#sendInvokeCallbackContext: */ EXPORT(sqInt) @@ -73956,6 +73964,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) char *sp7; sqInt table; + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -73968,8 +73977,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin push: */ object3 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); longAtput((sp3 = GIV(stackPointer) - BytesPerWord), object3); @@ -74082,6 +74093,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ interpret(); return 1; @@ -74727,7 +74739,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -75714,7 +75726,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -75829,7 +75841,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -76609,6 +76621,7 @@ transferTo(sqInt newProc) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin setMethod: */ @@ -76922,8 +76935,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -76931,14 +76943,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -76967,8 +76979,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -76976,14 +76987,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -77014,8 +77025,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -77023,14 +77033,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return activeContext; } @@ -77482,10 +77492,9 @@ primitiveClosureCopyWithCopiedValues(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt copiedValues; sqInt i; - sqInt initialIP; sqInt integerPointer; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -77520,7 +77529,6 @@ primitiveClosureCopyWithCopiedValues(void) return; } /* begin closureIn:numArgs:instructionPointer:copiedValues: */ - initialIP = (GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize); copiedValues = longAt(GIV(stackPointer)); /* begin numSlotsOf: */ assert((classIndexOf(copiedValues)) > (isForwardedObjectClassIndexPun())); @@ -77566,7 +77574,7 @@ primitiveClosureCopyWithCopiedValues(void) longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), longAt(GIV(stackPointer) + (2 * BytesPerWord))); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); - longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)initialIP << 1) | 1)); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)((GIV(instructionPointer) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); @@ -77605,8 +77613,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -79999,7 +80007,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -80356,7 +80364,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -80393,7 +80401,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -80853,7 +80861,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -81005,7 +81013,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -81209,7 +81217,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -81502,8 +81510,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -81886,8 +81895,10 @@ primitiveTerminateTo(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -81974,7 +81985,6 @@ primitiveVMParameter(void) char *sp; char *sp1; char *sp2; - sqInt valuePointer; sqInt valuePointer1; sqInt valuePointer10; sqInt valuePointer11; @@ -82024,6 +82034,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -82033,165 +82044,129 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -82199,9 +82174,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -82209,213 +82184,118 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = GIV(nilObj); + valuePointer35 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = GIV(nilObj); + valuePointer36 = GIV(nilObj); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)((((GIV(preemptionYields) + valuePointer37 = (((usqInt)((((GIV(preemptionYields) ? 0 : 4)) + ((GIV(newFinalization) ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | (4 + 16)) - (4 + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = GIV(nilObj); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = GIV(nilObj); + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = ConstZero; + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = GIV(nilObj); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = ConstZero; + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -82444,7 +82324,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -82477,14 +82357,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { + result = ConstZero; + } + if (arg == 17) { result = ConstZero; } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -82560,7 +82443,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -82678,47 +82561,41 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l95; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l95: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -82784,11 +82661,11 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if ((((usqInt)arg)) > 0x1F) { /* begin primitiveFailFor: */ GIV(primFailCode) = PrimErrUnsupported; - goto l72; + goto l84; } GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l72: /* end setCogVMFlags: */; + l84: /* end setCogVMFlags: */; } } if (index == 49) { @@ -82811,14 +82688,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l93; + goto l96; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l93: /* end floatValueOf: */; + l96: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -83044,8 +82921,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -83053,14 +82929,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -83095,8 +82971,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -83104,14 +82979,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -83139,8 +83014,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -83148,14 +83022,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -83204,6 +83078,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -83249,6 +83124,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spurlowcodestacksrc/vm/interp.h b/spurlowcodestacksrc/vm/interp.h index eb8f2562a..31dbb55e9 100644 --- a/spurlowcodestacksrc/vm/interp.h +++ b/spurlowcodestacksrc/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-rsf.2127 uuid: 1a6d3cce-b752-4e79-905f-e1b6c155d910 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 4 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1073741824 #define MaxSmallInteger 1073741823 diff --git a/spurlowcodestacksrc/vm/vmCallback.h b/spurlowcodestacksrc/vm/vmCallback.h index 034579042..3bf23acc7 100644 --- a/spurlowcodestacksrc/vm/vmCallback.h +++ b/spurlowcodestacksrc/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-rsf.2127 uuid: 1a6d3cce-b752-4e79-905f-e1b6c155d910 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/spursista64src/vm/cogit.h b/spursista64src/vm/cogit.h index f4de8af4a..f359d988f 100644 --- a/spursista64src/vm/cogit.h +++ b/spursista64src/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ @@ -41,7 +41,6 @@ extern sqInt cogMethodDoesntLookKosher(CogMethod *cogMethod); extern CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs); extern CogMethod * cogselector(sqInt aMethodObj, sqInt aSelectorOop); extern void compactCogCompiledCode(void); -extern sqInt defaultCogCodeSize(void); extern void enterCogCodePopReceiver(void); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); extern void followForwardedLiteralsIn(CogMethod *cogMethod); @@ -94,9 +93,12 @@ extern sqInt mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj); extern void recordCallOffsetIn(CogMethod *cogMethod); extern void rewritePrimInvocationInto(CogMethod *cogMethod, void (*primFunctionPointer)(void)); extern void voidCogCompiledCode(void); +extern sqInt defaultCogCodeSize(void); extern usqInt getJumpTargetPCAt(sqInt pc); extern void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); +extern double getCogCodeZoneThreshold(void); +extern sqInt setCogCodeZoneThreshold(double ratio); extern void callCogCodePopReceiverArg0Regs(void); extern void callCogCodePopReceiverArg1Arg0Regs(void); @@ -149,6 +151,7 @@ VM_EXPORT sqInt traceStores; #define getCFramePointer() CFramePointer #define getCStackPointer() CStackPointer #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define noCheckEntryOffset() cmNoCheckEntryOffset #define noContextSwitchBlockEntryOffset() blockNoContextSwitchOffset #define printOnTrace() (traceFlags & 1) diff --git a/spursista64src/vm/cogitX64.c b/spursista64src/vm/cogitX64.c index f3984c36a..07e47c8aa 100644 --- a/spursista64src/vm/cogitX64.c +++ b/spursista64src/vm/cogitX64.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - SistaCogit VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + SistaCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -261,7 +261,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 70 : 65) +#define NumTrampolines (IMMUTABILITY ? 71 : 66) #define OrCqR 108 #define OrCwR 116 #define OrRR 102 @@ -273,6 +273,7 @@ char *__cogitBuildInfo = __buildInfo; #define PrimCallMayCallBack 4 #define PrimCallNeedsNewMethod 1 #define PrimCallNeedsPrimitiveFunction 2 +#define PrimErrBadArgument 3 #define PrimErrNoMemory 9 #define PrimErrWritePastObject 17 #define PushCq 83 @@ -353,8 +354,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; unsigned char machineCode [14]; } AbstractInstruction; @@ -424,10 +425,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -558,7 +561,6 @@ static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC); static usqInt cPICPrototypeCaseOffset(void); static sqInt NoDbgRegParms cPICHasTarget(CogMethod *cPIC, CogMethod *targetMethod); static AbstractInstruction * NoDbgRegParms gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder); -extern sqInt defaultCogCodeSize(void); static sqInt NoDbgRegParms deltaToSkipPrimAndErrorStoreInheader(sqInt aMethodObj, sqInt aMethodHeader); static sqInt NoDbgRegParms endPCOf(sqInt aMethod); extern void enterCogCodePopReceiver(void); @@ -569,7 +571,7 @@ static sqInt extBBytecode(void); static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static usqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -589,7 +591,7 @@ static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointe static void generateClosedPICPrototype(void); static CogMethod * generateCogFullBlock(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateOpenPICPrototype(void); static void generateRunTimeTrampolines(void); static void generateStackPointerCapture(void); @@ -637,7 +639,7 @@ static BytecodeDescriptor * loadBytesAndGetDescriptor(void); static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc); static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); -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); @@ -717,7 +719,7 @@ static void zeroOpcodeIndexForNewOpcodes(void); extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void NoDbgRegParms clearSavedPICUsageCount(CogMethod *cogMethod); static void compactCompiledCode(void); @@ -726,7 +728,6 @@ static void followForwardedLiteralsInOpenPICList(void); extern void freeMethod(CogMethod *cogMethod); static void freeOlderMethodsForCompaction(void); static sqInt kosherYoungReferrers(void); -static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); extern CogMethod * methodFor(void *address); extern sqInt methodsCompiledToMachineCodeInto(sqInt arrayObj); extern sqInt numMethods(void); @@ -803,6 +804,7 @@ static sqInt NoDbgRegParms genSmallIntegerComparisonorDoubleComparisoninvert(sqI static sqInt NoDbgRegParms isUnannotatableConstant(CogSimStackEntry *simStackEntry); static sqInt NoDbgRegParms allImmediatebranchIfinstanceOfBehaviorstarget(sqInt immediateMask, sqInt reg, sqInt arrayObj, AbstractInstruction *targetFixUp); static sqInt NoDbgRegParms allImmediatebranchIfnotInstanceOfBehaviorstarget(sqInt immediateMask, sqInt reg, sqInt arrayObj, AbstractInstruction *targetFixUp); +static sqInt NoDbgRegParms classForInlineCacheTag(sqInt classIndex); static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister); static AbstractInstruction * NoDbgRegParms genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt scratch1, sqInt scratch2); static sqInt NoDbgRegParms genClearAndSetSmallIntegerTagsIn(sqInt scratchReg); @@ -847,14 +849,13 @@ static sqInt NoDbgRegParms genShiftAwaySmallIntegerTagsInScratchReg(sqInt scratc static sqInt NoDbgRegParms getLiteralCountOfplusOneinBytesintoscratch(sqInt methodReg, sqInt plusOne, sqInt inBytes, sqInt litCountReg, sqInt scratchReg); static sqInt NoDbgRegParms inlineCacheTagForInstance(sqInt oop); static void maybeGenerateSelectorIndexDereferenceRoutine(void); -static sqInt NoDbgRegParms numCountersFor(usqInt theCounters); +static usqInt NoDbgRegParms numCountersFor(usqInt theCounters); static sqInt NoDbgRegParms validInlineCacheTag(sqInt classIndexOrTagPattern); static sqInt NoDbgRegParms branchIfinstanceOfBehaviorstarget(sqInt reg, sqInt arrayObj, AbstractInstruction *targetFixUp); static sqInt NoDbgRegParms branchIfnotInstanceOfBehaviorstarget(sqInt reg, sqInt arrayObj, AbstractInstruction *targetFixUp); static sqInt NoDbgRegParms cacheTagIsMarked(sqInt cacheTag); static sqInt NoDbgRegParms checkValidDerivedObjectReference(sqInt bodyAddress); static sqInt NoDbgRegParms checkValidOopReference(sqInt anOop); -static sqInt NoDbgRegParms classForInlineCacheTag(sqInt classIndex); static sqInt NoDbgRegParms couldBeDerivedObject(sqInt bodyAddress); static sqInt NoDbgRegParms couldBeObject(sqInt literal); static sqInt NoDbgRegParms genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, char *aString); @@ -1005,7 +1006,7 @@ static AbstractInstruction * NoDbgRegParms relocateCallBeforeReturnPCby(Abstract static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta); static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); static sqInt NoDbgRegParms rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); -static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress); +static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr); static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms rewriteJumpFullAttarget(AbstractInstruction * self_in_rewriteJumpFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -1121,6 +1122,7 @@ static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied); static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector); static void compileFrameBuild(void); static void NoDbgRegParms compileFullBlockMethodFrameBuild(sqInt numCopied); +extern sqInt defaultCogCodeSize(void); static void NoDbgRegParms fillInCountersatStartAddress(sqInt nCounters, sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms genBinaryConstOpVarInlinePrimitive(sqInt prim); @@ -1148,6 +1150,9 @@ static sqInt NoDbgRegParms picDataForSendTomethodClassIfSuperatbcpc(CogMethod *c static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); static void NoDbgRegParms populatewithPICInfoForfirstCacheTag(sqInt tuple, CogMethod *cPIC, sqInt firstCacheTag); +extern double getCogCodeZoneThreshold(void); +static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); +extern sqInt setCogCodeZoneThreshold(double ratio); static BlockStart * NoDbgRegParms addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span); static void NoDbgRegParms adjustArgumentsForPerform(sqInt numArgs); static sqInt NoDbgRegParms allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask); @@ -1231,7 +1236,7 @@ static sqInt NoDbgRegParms genStorePopRemoteInstVarofObjectAtneedsStoreCheckneed static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1260,7 +1265,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1283,6 +1287,7 @@ static void voidReceiverResultRegContainsSelf(void); /*** Variables ***/ static AbstractInstruction * abstractOpcodes; +static usqInt allocationThreshold; static AbstractInstruction aMethodLabel; static AbstractInstruction * const backEnd = &aMethodLabel; static usqInt baseAddress; @@ -1290,7 +1295,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt branchReachedOnlyForCounterTrip; static sqInt breakBlock; @@ -1330,6 +1334,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1373,6 +1378,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt counterIndex; static usqInt counters; @@ -1985,6 +1991,7 @@ static AbstractInstruction * stackCheckLabel; static AbstractInstruction * stackOverflowCall; static sqInt superSendTrampolines[NumSendTrampolines]; static sqInt tempOop; +static double thresholdRatio = 0.5; int traceFlags = 8 /* prim trace log on by default */; sqInt traceStores; static char *trampolineAddresses[NumTrampolines*2]; @@ -2022,6 +2029,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -2354,9 +2362,9 @@ computeSizeOfArithCwR(AbstractInstruction * self_in_computeSizeOfArithCwR) static usqInt NoDbgRegParms concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64opcode) { - usqIntptr_t reg; + usqInt reg; sqInt reverse; - usqIntptr_t value; + usqInt value; value = ((self_in_concretizeArithCwR->operands))[0]; reg = ((self_in_concretizeArithCwR->operands))[1]; @@ -2392,9 +2400,9 @@ concretizeArithCwR(AbstractInstruction * self_in_concretizeArithCwR, sqInt x64op static usqInt NoDbgRegParms concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { - usqIntptr_t offset; - usqIntptr_t reg; - usqIntptr_t value; + sqInt offset; + usqInt reg; + usqInt value; value = ((self_in_concretizeMoveCwR->operands))[0]; reg = ((self_in_concretizeMoveCwR->operands))[1]; @@ -2511,9 +2519,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - usqIntptr_t alignment; - usqIntptr_t maximumSpan; - usqIntptr_t target; + usqInt alignment; + sqInt maximumSpan; + usqInt target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -2851,7 +2859,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; @@ -2895,7 +2903,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -3725,7 +3733,7 @@ static sqInt NoDbgRegParms closedPICRefersToUnmarkedObject(CogMethod *cPIC) { sqInt i; - usqInt object; + sqInt object; sqInt pc; if (!((isImmediate((cPIC->selector))) @@ -4072,7 +4080,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -4131,7 +4139,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -4199,7 +4207,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -4871,7 +4879,7 @@ static sqInt NoDbgRegParms configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs, sqInt addrDelta) { sqInt caseEndAddress; - sqInt jumpTargetAddress; + sqInt jumpTargetAddr; sqInt operand; sqInt pc; usqIntptr_t targetEntry; @@ -4910,8 +4918,8 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod && (((byteAt(pc - 7)) | (modRMRO(((AbstractInstruction *) backEnd), 0, 0, 7))) == (modRMRO(((AbstractInstruction *) backEnd), ModRegInd, 5, 7))))); ((AbstractInstruction *) backEnd); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress = cPICMissTrampolineFor(numArgs); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddress); + jumpTargetAddr = cPICMissTrampolineFor(numArgs); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddr); return 0; } @@ -4929,8 +4937,8 @@ configureCPICCase0Case1MethodtagisMNUCasenumArgsdelta(CogMethod *cPIC, CogMethod static sqInt NoDbgRegParms configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, sqInt numArgs, sqInt addrDelta) { - sqInt jumpTargetAddress; - sqInt jumpTargetAddress1; + sqInt jumpTargetAddr; + sqInt jumpTargetAddr1; sqInt operand; sqInt pc; sqInt target; @@ -4943,12 +4951,12 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, ? 0 : methodOperand); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress = (((sqInt)cPIC)) + (sizeof(CogMethod)); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + firstCPICCaseOffset, jumpTargetAddress); + jumpTargetAddr = (((sqInt)cPIC)) + (sizeof(CogMethod)); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + firstCPICCaseOffset, jumpTargetAddr); storeLiteralbeforeFollowingAddress(backEnd, operand, ((((sqInt)cPIC)) + firstCPICCaseOffset) - 5); /* begin rewriteJumpLongAt:target: */ - jumpTargetAddress1 = cPICMissTrampolineFor(numArgs); - rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddress1); + jumpTargetAddr1 = cPICMissTrampolineFor(numArgs); + rewriteCallAttarget(((AbstractInstruction *) backEnd), (((sqInt)cPIC)) + cPICEndOfCodeOffset, jumpTargetAddr1); /* begin relocateMethodReferenceBeforeAddress:by: */ pc = ((((sqInt)cPIC)) + cPICEndOfCodeOffset) - 5; assert((((byteAt(pc - 6)) == 141) @@ -5154,19 +5162,6 @@ gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder) } -/* Return the default number of bytes to allocate for native code at startup. - The actual value can be set via vmParameterAt: and/or a preference in the - ini file. */ - - /* Cogit>>#defaultCogCodeSize */ -sqInt -defaultCogCodeSize(void) -{ - /* begin getDefaultCogCodeSize */ - return 1024 * 1400; -} - - /* Answer the number of bytecodes to skip to get to the first bytecode past the primitive call and any store of the error code. */ @@ -5188,7 +5183,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -5274,11 +5269,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { usqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -5422,8 +5417,8 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) } /* Cogit>>#findMapLocationForMcpc:inMethod: */ -static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +static usqInt NoDbgRegParms +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -5959,7 +5954,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -5975,7 +5970,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, 3133021973U + h, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -6021,7 +6016,7 @@ generateCogFullBlock(void) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -6070,7 +6065,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -6116,17 +6111,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; - usqIntptr_t delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqIntptr_t location; - usqIntptr_t mapEntry; + usqInt location; + sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -7101,7 +7096,7 @@ gMoveCwR(sqInt wordConstant, sqInt reg) /* 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; @@ -8055,7 +8050,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -9030,7 +9025,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -9848,14 +9843,14 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; sqInt roundedBytes; roundedBytes = (numBytes + 7) & -8; - if ((mzFreeStart + roundedBytes) >= (limitAddress - (methodCount * BytesPerWord))) { + if ((mzFreeStart + roundedBytes) >= ((((limitAddress - (methodCount * BytesPerWord)) < allocationThreshold) ? (limitAddress - (methodCount * BytesPerWord)) : allocationThreshold))) { return 0; } allocation = mzFreeStart; @@ -10045,15 +10040,15 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; - zoneSize = limitAddress - baseAddress; - initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; + zoneSize = ((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - baseAddress; + initialFreeSpace = (((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - mzFreeStart) + methodBytesFreedSinceLastCompaction; freedSoFar = initialFreeSpace; /* 4 needs to be e.g. a start-up parameter */ @@ -10104,17 +10099,6 @@ kosherYoungReferrers(void) return 1; } - /* CogMethodZone>>#manageFrom:to: */ -static void NoDbgRegParms -manageFromto(sqInt theStartAddress, sqInt theLimitAddress) -{ - mzFreeStart = (baseAddress = theStartAddress); - youngReferrers = (limitAddress = theLimitAddress); - openPICList = null; - methodBytesFreedSinceLastCompaction = 0; - methodCount = 0; -} - /* CogMethodZone>>#methodFor: */ CogMethod * methodFor(void *address) @@ -11681,6 +11665,13 @@ allImmediatebranchIfnotInstanceOfBehaviorstarget(sqInt immediateMask, sqInt reg, return 0; } + /* CogObjectRepresentationFor64BitSpur>>#classForInlineCacheTag: */ +static sqInt NoDbgRegParms +classForInlineCacheTag(sqInt classIndex) +{ + return classOrNilAtIndex(classIndex); +} + /* CogObjectRepresentationFor64BitSpur>>#genAddSmallIntegerTagsTo: */ static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister) @@ -13003,6 +12994,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *anInstruction1; AbstractInstruction *jumpImm; @@ -13046,7 +13038,17 @@ genPrimitiveIdentityHash(void) genoperand(RetN, 0); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } /* CogObjectRepresentationFor64BitSpur>>#genPrimitiveImmediateAsInteger */ @@ -14163,10 +14165,10 @@ maybeGenerateSelectorIndexDereferenceRoutine(void) } /* CogObjectRepresentationFor64BitSpur>>#numCountersFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms numCountersFor(usqInt theCounters) { - usqInt objOop; + sqInt objOop; if (theCounters == 0) { return 0; @@ -14301,13 +14303,6 @@ checkValidOopReference(sqInt anOop) || ((heapMapAtWord(pointerForOop(anOop))) != 0); } - /* CogObjectRepresentationForSpur>>#classForInlineCacheTag: */ -static sqInt NoDbgRegParms -classForInlineCacheTag(sqInt classIndex) -{ - return classOrNilAtIndex(classIndex); -} - /* CogObjectRepresentationForSpur>>#couldBeDerivedObject: */ static sqInt NoDbgRegParms couldBeDerivedObject(sqInt bodyAddress) @@ -14722,7 +14717,9 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ - ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(1, "newHashTrampoline", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 1); + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); + ceInlineNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceInlineNewHash", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { @@ -15349,7 +15346,7 @@ genGetIdentityHashresultReg(sqInt rcvrReg, sqInt resultReg) /* begin MoveR:R: */ genoperandoperand(MoveRR, rcvrReg, resultReg); /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceNewHashTrampoline); + abstractInstruction = genoperand(Call, ceInlineNewHashTrampoline); (abstractInstruction->annotation = IsRelativeCall); /* begin annotateBytecode: */ abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -15363,7 +15360,7 @@ genGetIdentityHashresultReg(sqInt rcvrReg, sqInt resultReg) /* begin JumpNonZero: */ jumpSet = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CallRT: */ - abstractInstruction2 = genoperand(Call, ceNewHashTrampoline); + abstractInstruction2 = genoperand(Call, ceInlineNewHashTrampoline); (abstractInstruction2->annotation = IsRelativeCall); /* begin annotateBytecode: */ abstractInstruction3 = genoperandoperand(MoveRR, ReceiverResultReg, resultReg); @@ -17667,7 +17664,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - usqIntptr_t shiftCountReg; + usqInt shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == RCX @@ -17694,8 +17691,8 @@ computeSizeOfPushCw(AbstractInstruction * self_in_computeSizeOfPushCw) static usqInt NoDbgRegParms concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithCqRWithROraxOpcode, sqInt regOpcode, sqInt raxOpcode) { - usqIntptr_t reg; - usqIntptr_t value; + usqInt reg; + usqInt value; value = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[0]; reg = ((self_in_concretizeArithCqRWithROraxOpcode->operands))[1]; @@ -17746,10 +17743,10 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) { - usqIntptr_t base; - usqIntptr_t index; + usqInt base; + usqInt index; sqInt offset; - usqIntptr_t src; + usqInt src; src = ((self_in_concretizeMoveRX32rR->operands))[0]; index = ((self_in_concretizeMoveRX32rR->operands))[1]; @@ -17783,9 +17780,9 @@ concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR) static usqInt NoDbgRegParms concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) { - usqIntptr_t base; - usqIntptr_t dest; - usqIntptr_t index; + usqInt base; + usqInt dest; + usqInt index; sqInt offset; index = ((self_in_concretizeMoveX32rRR->operands))[0]; @@ -17820,8 +17817,8 @@ concretizeMoveX32rRR(AbstractInstruction * self_in_concretizeMoveX32rRR) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -17840,8 +17837,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x64opcode) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - usqIntptr_t offset; - usqIntptr_t operand; + sqInt offset; + usqInt operand; operand = ((self_in_concretizePrefetchAw->operands))[0]; if (!((operand != null) @@ -17868,8 +17865,8 @@ concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x64opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -17883,8 +17880,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) { - usqIntptr_t r1; - usqIntptr_t r2; + usqInt r1; + usqInt r2; r1 = ((self_in_concretizeXCHGRR->operands))[0]; r2 = ((self_in_concretizeXCHGRR->operands))[1]; @@ -17913,64 +17910,64 @@ concretizeXCHGRR(AbstractInstruction * self_in_concretizeXCHGRR) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt addressOperand2; + usqInt addressOperand3; + usqInt addressOperand4; + usqInt addressOperand5; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; + usqInt baseReg; + usqInt baseReg1; AbstractInstruction *dependentChain; - 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 destReg16; - usqIntptr_t destReg17; - usqIntptr_t destReg18; - usqIntptr_t destReg19; - usqIntptr_t destReg2; - usqIntptr_t destReg20; - usqIntptr_t destReg21; - usqIntptr_t destReg22; - usqIntptr_t destReg23; - usqIntptr_t destReg24; - usqIntptr_t destReg25; - usqIntptr_t destReg26; - usqIntptr_t destReg27; - usqIntptr_t destReg28; - usqIntptr_t destReg29; - usqIntptr_t destReg3; - usqIntptr_t destReg30; - usqIntptr_t destReg31; - usqIntptr_t destReg32; - 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; + usqInt dest; + usqInt dest1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg13; + usqInt destReg14; + usqInt destReg15; + usqInt destReg16; + usqInt destReg17; + usqInt destReg18; + usqInt destReg19; + usqInt destReg2; + usqInt destReg20; + usqInt destReg21; + usqInt destReg22; + usqInt destReg23; + usqInt destReg24; + usqInt destReg25; + usqInt destReg26; + usqInt destReg27; + usqInt destReg28; + usqInt destReg29; + usqInt destReg3; + usqInt destReg30; + usqInt destReg31; + usqInt destReg32; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; + usqInt distance; + usqInt distance1; + usqInt distance2; + usqInt distance3; + usqInt distance4; sqInt i; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -18039,8 +18036,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget9; sqInt offset; sqInt offset1; - usqIntptr_t offset10; - usqIntptr_t offset11; + usqInt offset10; + usqInt offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -18051,28 +18048,28 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - usqIntptr_t offset12; + usqInt offset12; sqInt offset120; sqInt offset121; sqInt offset122; sqInt offset123; sqInt offset124; sqInt offset125; - usqIntptr_t offset126; - usqIntptr_t offset127; - usqIntptr_t offset128; - usqIntptr_t offset129; - usqIntptr_t offset13; - usqIntptr_t offset14; - usqIntptr_t offset15; + usqInt offset126; + usqInt offset127; + usqInt offset128; + usqInt offset129; + usqInt offset13; + usqInt offset14; + usqInt offset15; sqInt offset16; - usqIntptr_t offset17; - usqIntptr_t offset18; - usqIntptr_t offset19; + usqInt offset17; + usqInt offset18; + usqInt offset19; sqInt offset2; - usqIntptr_t offset20; - usqIntptr_t offset21; - usqIntptr_t offset22; + usqInt offset20; + sqInt offset21; + sqInt offset22; sqInt offset23; sqInt offset24; sqInt offset25; @@ -18080,7 +18077,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - usqIntptr_t offset3; + usqInt offset3; sqInt offset30; sqInt offset31; sqInt offset32; @@ -18091,74 +18088,74 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset37; sqInt offset38; sqInt offset39; - usqIntptr_t offset4; + usqInt offset4; sqInt offset40; sqInt offset41; sqInt offset42; - usqIntptr_t offset5; + sqInt offset5; sqInt offset6; sqInt offset7; - usqIntptr_t offset8; - usqIntptr_t offset9; - 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 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 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 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; - usqIntptr_t save0; - usqIntptr_t save01; - usqIntptr_t save1; - usqIntptr_t save11; - usqIntptr_t save12; - usqIntptr_t save13; - usqIntptr_t shiftCountReg; - usqIntptr_t shiftCountReg1; + usqInt offset8; + usqInt offset9; + usqInt operand; + usqInt operand1; + usqInt reg; + usqInt reg1; + usqInt reg10; + usqInt reg11; + usqInt reg12; + usqInt reg13; + usqInt reg14; + usqInt reg15; + usqInt reg16; + usqInt reg17; + usqInt reg18; + usqInt reg19; + usqInt reg2; + usqInt reg20; + usqInt reg21; + usqInt reg22; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt reg8; + usqInt reg9; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS10; + usqInt regLHS11; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regLHS5; + usqInt regLHS6; + usqInt regLHS7; + usqInt regLHS8; + usqInt regLHS9; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS10; + usqInt regRHS11; + usqInt regRHS2; + usqInt regRHS3; + usqInt regRHS4; + usqInt regRHS5; + usqInt regRHS6; + usqInt regRHS7; + usqInt regRHS8; + usqInt regRHS9; + usqInt regToShift; + usqInt regToShift1; + usqInt save0; + usqInt save01; + usqInt save1; + usqInt save11; + usqInt save12; + usqInt save13; + usqInt shiftCountReg; + usqInt shiftCountReg1; sqInt skip; sqInt skip1; sqInt skip10; @@ -18188,49 +18185,49 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt skip7; sqInt skip8; sqInt skip9; - 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 srcReg16; - usqIntptr_t srcReg17; - usqIntptr_t srcReg18; - usqIntptr_t srcReg19; - usqIntptr_t srcReg2; - usqIntptr_t srcReg20; - usqIntptr_t srcReg21; - usqIntptr_t srcReg22; - usqIntptr_t srcReg23; - usqIntptr_t srcReg24; - usqIntptr_t srcReg25; - usqIntptr_t srcReg26; - usqIntptr_t srcReg27; - usqIntptr_t srcReg28; - usqIntptr_t srcReg29; - usqIntptr_t srcReg3; - usqIntptr_t srcReg30; - usqIntptr_t srcReg31; - usqIntptr_t srcReg32; - 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 value11; - usqIntptr_t value2; - usqIntptr_t value3; - usqIntptr_t value4; - usqIntptr_t value5; - usqIntptr_t value6; + usqInt src; + usqInt src1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg20; + usqInt srcReg21; + usqInt srcReg22; + usqInt srcReg23; + usqInt srcReg24; + usqInt srcReg25; + usqInt srcReg26; + usqInt srcReg27; + usqInt srcReg28; + usqInt srcReg29; + usqInt srcReg3; + usqInt srcReg30; + usqInt srcReg31; + usqInt srcReg32; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; + usqInt value; + usqInt value1; + usqInt value11; + usqInt value2; + usqInt value3; + usqInt value4; + usqInt value5; + usqInt value6; usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { @@ -21319,9 +21316,9 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - usqIntptr_t reg1; - usqIntptr_t reg2; - usqIntptr_t regDivisor; + usqInt reg1; + usqInt reg2; + usqInt regDivisor; switch ((self_in_dispatchConcretizeProcessorSpecific->opcode)) { @@ -22438,15 +22435,15 @@ rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, s /* prevent type inference for avoiding warning on abs */ /* CogX64Compiler>>#rewriteCPICJumpAt:target: */ -static sqInt NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +static AbstractInstruction * NoDbgRegParms +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { sqInt callDistance; - callDistance = jumpTargetAddress - addressFollowingJump; + callDistance = jumpTargetAddr - addressFollowingJump; assert((SQABS(callDistance)) < 128); byteAtput(addressFollowingJump - 1, callDistance & 0xFF); - return 2; + return self_in_rewriteCPICJumpAttarget; } @@ -24526,7 +24523,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -24795,7 +24792,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -24824,7 +24821,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 3) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 3) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 3) | 1)); introspectionDataIndex += 2; } return 0; @@ -25415,7 +25412,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -25742,7 +25739,11 @@ compileCogFullBlockMethod(sqInt numCopied) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -25818,7 +25819,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -26073,6 +26078,18 @@ compileFullBlockMethodFrameBuild(sqInt numCopied) } } + +/* Return the default number of bytes to allocate for native code at startup. + The actual value can be set via vmParameterAt: and/or a preference in the + ini file. */ + + /* SistaCogit>>#defaultCogCodeSize */ +sqInt +defaultCogCodeSize(void) +{ + return 2 * (1024 * 1400); +} + /* SistaCogit>>#fillInCounters:atStartAddress: */ static void NoDbgRegParms fillInCountersatStartAddress(sqInt nCounters, sqInt startAddress) @@ -26807,7 +26824,8 @@ genCounterTripOnlyJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; extA = 0; - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); popToReg(ssTop(), TempReg); ssPop(1); @@ -26888,7 +26906,8 @@ genExtJumpIfNotInstanceOfBehaviorsBytecode(void) reg = allocateRegForStackEntryAtnotConflictingWith(0, 0); popToReg(ssTop(), reg); ssPop(1); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); literal = getLiteral((extA * 256) + byte1); if ((inverse = extB < 0)) { extB += 128; @@ -27220,7 +27239,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor1->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg1, !unforwardRcvr1, argReg1, rcvrReg1, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -27399,7 +27419,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); if (unforwardArg) { genEnsureOopInRegNotForwardedscratchReg(argReg, TempReg); } @@ -27631,7 +27652,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) /* In optimized code we don't generate counters to improve performance */ if (isOptimizedMethod(methodObj)) { eventualTarget1 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc1 = ssTop(); ssPop(1); if ((((desc1->type)) == SSConstant) @@ -27704,7 +27726,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) nextDescriptor = generatorAt((fetchByteofObject(nextPC, methodObj)) + bytecodeSetOffset); if (((nextDescriptor->generator)) == genPushConstantTrueBytecode) { eventualTarget2 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc2 = ssTop(); ssPop(1); if ((((desc2->type)) == SSConstant) @@ -27771,7 +27794,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) nextDescriptor = generatorAt((fetchByteofObject(targetBytecodePC, methodObj)) + bytecodeSetOffset); if (((nextDescriptor->generator)) == genPushConstantFalseBytecode) { eventualTarget3 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc3 = ssTop(); ssPop(1); if ((((desc3->type)) == SSConstant) @@ -27845,7 +27869,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) && ((((desc->constant)) == (trueObject())) || (((desc->constant)) == (falseObject())))) { eventualTarget4 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc4 = ssTop(); ssPop(1); if ((((desc4->type)) == SSConstant) @@ -27910,7 +27935,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) return 0; } eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); popToReg(desc, TempReg); ssPop(1); ssAllocateRequiredReg(SendNumArgsReg); @@ -28072,7 +28098,8 @@ genSpecialSelectorComparison(void) if (isOptimizedMethod(methodObj)) { return genSpecialSelectorComparisonWithoutCounters(); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((((argInt = ((ssTop())->constant)))) & 7) == 1)); @@ -28252,7 +28279,8 @@ genSpecialSelectorComparisonWithoutCounters(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((((argInt = ((ssTop())->constant)))) & 7) == 1)); @@ -28571,7 +28599,8 @@ genUnconditionalTrapBytecode(void) AbstractInstruction *abstractInstruction; AbstractInstruction *abstractInstruction1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin CallRT: */ abstractInstruction = genoperand(Call, ceTrapTrampoline); (abstractInstruction->annotation = IsRelativeCall); @@ -28685,7 +28714,7 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) CogBlockMethod *cogBlockMethod; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -29022,7 +29051,7 @@ picDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -29252,6 +29281,41 @@ populatewithPICInfoForfirstCacheTag(sqInt tuple, CogMethod *cPIC, sqInt firstCac } } + /* SistaMethodZone>>#getCogCodeZoneThreshold */ +double +getCogCodeZoneThreshold(void) +{ + return thresholdRatio; +} + + /* SistaMethodZone>>#manageFrom:to: */ +static void NoDbgRegParms +manageFromto(sqInt theStartAddress, sqInt theLimitAddress) +{ + mzFreeStart = (baseAddress = theStartAddress); + youngReferrers = (limitAddress = theLimitAddress); + openPICList = null; + methodBytesFreedSinceLastCompaction = 0; + methodCount = 0; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; +} + + /* SistaMethodZone>>#setCogCodeZoneThreshold: */ +sqInt +setCogCodeZoneThreshold(double ratio) +{ + /* send of break elided */; + if (!((ratio >= 0.1) + && (ratio <= 1.0))) { + return PrimErrBadArgument; + } + thresholdRatio = ratio; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; + return 0; +} + /* Add a blockStart for an embedded block. For a binary tree walk block dispatch blocks must be compiled in pc/depth-first order but are scanned @@ -29556,7 +29620,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -29574,8 +29638,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -30916,7 +30980,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -30947,7 +31012,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -31511,7 +31577,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -31797,7 +31864,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -32034,7 +32102,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -32105,7 +32174,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -32178,7 +32248,8 @@ genStorePopMaybeContextRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCh ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -32215,7 +32286,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -32240,7 +32312,8 @@ genStorePopRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCheck(sqInt po if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -32379,19 +32452,18 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; - return fixup; -} + } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ static void NoDbgRegParms @@ -32565,7 +32637,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -32575,7 +32648,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -32583,7 +32657,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -32622,7 +32697,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -32687,7 +32762,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -32820,8 +32896,7 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); if ((isBranch(descriptor)) @@ -33173,13 +33248,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1ULL << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -33221,7 +33289,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -33245,7 +33314,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -33540,6 +33610,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/spursista64src/vm/cointerp.c b/spursista64src/vm/cointerp.c index 5af0d99c0..503886b58 100644 --- a/spursista64src/vm/cointerp.c +++ b/spursista64src/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -729,6 +729,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -897,6 +898,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -922,9 +924,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); -static usqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForward(sqInt survivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1185,8 +1187,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1254,6 +1256,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1348,14 +1351,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1479,6 +1483,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1655,8 +1660,8 @@ _iss usqInt freeStart; _iss usqInt newMethod; _iss sqInt messageSelector; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt trueObj; @@ -1724,6 +1729,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1732,7 +1738,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1759,6 +1764,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1773,11 +1780,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1812,6 +1817,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1834,7 +1840,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1865,6 +1870,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1880,6 +1886,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2492,7 +2501,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5099,7 +5108,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l844; + goto l843; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5147,10 +5156,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l871; + goto l870; } ourContext = marryFrameSP(localFP, localSP); - l871: /* end ensureFrameIsMarried:SP: */; + l870: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5159,7 +5168,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l844; + goto l843; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5168,10 +5177,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l864; + goto l863; } ourContext1 = marryFrameSP(localFP, localSP); - l864: /* end ensureFrameIsMarried:SP: */; + l863: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5182,7 +5191,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l844; + goto l843; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5234,10 +5243,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l857; + goto l856; } ourContext2 = marryFrameSP(localFP, localSP); - l857: /* end ensureFrameIsMarried:SP: */; + l856: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5246,7 +5255,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l844; + goto l843; } } assert(pageListIsWellFormed()); @@ -5351,11 +5360,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l854; + goto l853; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l854: /* end maybeReturnToMachineCodeFrame */; + l853: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5370,7 +5379,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l844: /* end case */; + l843: /* end case */; break; case 121: case 345: /*89*/ @@ -5489,27 +5498,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l882; + goto l881; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l882; + goto l881; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l882: /* end findFrameAbove:inPage: */; + l881: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l877; + goto l876; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l877: /* end newStackPage */; + l876: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5532,7 +5541,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l873; + goto l872; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5568,7 +5577,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l873; + goto l872; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5586,7 +5595,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l873; + goto l872; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5611,7 +5620,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l873; + goto l872; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5629,7 +5638,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l873: /* end case */; + l872: /* end case */; break; case 126: case 127: @@ -5663,10 +5672,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l883; + goto l882; } ourContext = marryFrameSP(theFP, theSP); - l883: /* end ensureFrameIsMarried:SP: */; + l882: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6108,12 +6117,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l901; + goto l900; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l901: /* end classAtIndex: */; + l900: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6134,7 +6143,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l885; + goto l884; } /* second probe */ @@ -6144,7 +6153,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l885; + goto l884; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6152,10 +6161,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l885; + goto l884; } ok = 0; - l885: /* end inlineLookupInMethodCacheSel:classTag: */; + l884: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6227,7 +6236,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l902; + goto l901; } } /* begin classAtIndex: */ @@ -6240,12 +6249,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l898; + goto l897; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l898: /* end classAtIndex: */; + l897: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6257,7 +6266,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l902: /* end internalFindNewMethodOrdinary */; + l901: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6270,28 +6279,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l906; + goto l905; } if (localPrimIndex == 256) { - goto l906; + goto l905; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l906; + goto l905; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l906; + goto l905; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l906; + goto l905; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l906; + goto l905; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6353,7 +6362,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l906; + goto l905; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6433,11 +6442,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l900; + goto l899; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l900: /* end getErrorObjectFromPrimFailCode */; + l899: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6461,7 +6470,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l906: /* end internalExecuteNewMethod */; + l905: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6906,18 +6915,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7033,7 +7046,7 @@ interpret(void) case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7258,7 +7271,7 @@ interpret(void) goto l123; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l123; } if (fmt >= (firstShortFormat())) { @@ -7273,7 +7286,7 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -7778,7 +7791,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -8630,7 +8643,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l920; + goto l918; } if (bytecode == 172) { @@ -8639,7 +8652,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l920; + goto l918; } if (bytecode > 167) { @@ -8649,7 +8662,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l920; + goto l918; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8657,7 +8670,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l920: /* end case */; + l918: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -8815,7 +8828,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l923; + goto l921; } if (bytecode == 172) { @@ -8825,14 +8838,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l923; + goto l921; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l923: /* end case */; + l921: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -11192,7 +11205,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l924; + goto l922; } if (bytecode == 239) { @@ -11201,7 +11214,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l924; + goto l922; } if (bytecode == 238) { @@ -11211,7 +11224,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l924; + goto l922; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -11219,7 +11232,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l924: /* end case */; + l922: /* end case */; break; case 355: /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -11377,7 +11390,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l927; + goto l925; } if (bytecode == 239) { @@ -11387,14 +11400,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l927; + goto l925; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l927: /* end case */; + l925: /* end case */; break; case 356: /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -13082,10 +13095,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l929; + goto l927; } ourContext = marryFrameSP(theFP, theSP); - l929: /* end ensureFrameIsMarried:SP: */; + l927: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -13317,7 +13330,7 @@ interpret(void) case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -13464,6 +13477,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l674; } @@ -14342,7 +14356,7 @@ interpret(void) goto l734; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l734; } if (fmt >= (firstShortFormat())) { @@ -14357,7 +14371,7 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -14766,7 +14780,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14805,7 +14819,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -14817,10 +14830,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l795; + goto l785; } context = marryFrameSP(theFP, theSP); - l795: /* end ensureFrameIsMarried:SP: */; + l785: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14848,13 +14861,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l789; + goto l794; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l789: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l794: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14912,7 +14925,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14937,10 +14950,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l805; + goto l804; } context = marryFrameSP(theFP, theSP); - l805: /* end ensureFrameIsMarried:SP: */; + l804: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14968,13 +14981,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l801; + goto l800; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l801: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l800: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -15094,11 +15107,11 @@ interpret(void) value = result; } object2 = value; - goto l811; + goto l810; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l811; + goto l810; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -15121,7 +15134,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l811; + goto l810; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -15129,24 +15142,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l811; + goto l810; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l811; + goto l810; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); - goto l811; + goto l810; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l811; + goto l810; } error("bad index"); object2 = 0; - l811: /* end instVar:ofContext: */; + l810: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -15250,7 +15263,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l823; + goto l822; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -15271,7 +15284,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l823; + goto l822; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -15304,7 +15317,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l823: /* end instVar:ofContext:put: */; + l822: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -15322,7 +15335,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l826; + goto l825; } # endif /* IMMUTABILITY */ @@ -15342,7 +15355,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l826: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l825: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -15441,7 +15454,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l833; + goto l832; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -15462,7 +15475,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l833; + goto l832; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -15495,7 +15508,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l833: /* end instVar:ofContext:put: */; + l832: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -15513,7 +15526,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l836; + goto l835; } # endif /* IMMUTABILITY */ @@ -15533,7 +15546,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l836: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l835: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -15581,7 +15594,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l837; + goto l836; } } if (!inverse) { @@ -15590,7 +15603,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l837; + goto l836; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -15599,7 +15612,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l837: /* end case */; + l836: /* end case */; break; } } @@ -16275,7 +16288,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -16297,10 +16309,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -16841,8 +16853,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -16863,8 +16876,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -17171,13 +17185,13 @@ ceCounterTripped(sqInt condition) resetCountersIn(mframeHomeMethod(GIV(framePointer))); return condition; } - addNewMethodToCache(classObj); } if ((primitiveFunctionPointer != 0) || ((argumentCountOfMethodHeader(methodHeaderOf(GIV(newMethod)))) != 1)) { resetCountersIn(mframeHomeMethod(GIV(framePointer))); return condition; } + setCogCodeZoneThreshold(1.0); /* begin splObj:put: */ assert(!(isForwarded(GIV(specialObjectsOop)))); if ((assert(isNonImmediate(GIV(specialObjectsOop))), @@ -17386,6 +17400,8 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) sqInt ceNewHashOf(sqInt anObject) { + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); return (((usqInt)(newHashBitsOf(anObject)) << 3) | 1); } @@ -17659,8 +17675,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -17817,7 +17834,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17932,7 +17948,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17965,7 +17980,7 @@ ceSendMustBeBooleanTointerpretingAtDelta(sqInt aNonBooleanObject, sqInt jumpSize sqInt oop; char *p; char *sp; - sqInt startBcpc; + unsigned short startBcpc; sqInt top; assert(addressCouldBeOop(aNonBooleanObject)); @@ -18175,7 +18190,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18303,18 +18317,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -18399,7 +18417,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18765,7 +18782,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -19631,7 +19648,6 @@ flushExternalPrimitiveOf(sqInt methodObj) header = ((((CogMethod *) header1))->methodHeader); } if (header & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (methodObj + ((LiteralStart + (((header >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primIdx1 = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -19748,7 +19764,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -20828,7 +20844,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -21430,18 +21446,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -21468,7 +21485,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -21898,7 +21915,7 @@ positive32BitValueOf(sqInt oop) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -21959,7 +21976,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -22409,7 +22426,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -22899,7 +22916,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -23053,6 +23070,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -23253,6 +23273,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -23501,15 +23522,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -23566,6 +23599,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -23578,8 +23612,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -23755,6 +23791,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -24114,7 +24151,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -24192,7 +24229,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -24581,8 +24618,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -24755,6 +24793,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -25075,8 +25114,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -25084,14 +25122,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -25120,8 +25158,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -25129,14 +25166,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -25167,8 +25204,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -25176,14 +25212,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -26963,8 +26999,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -26972,14 +27007,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -27003,8 +27038,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -27012,14 +27046,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -27045,8 +27079,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -27054,14 +27087,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l18; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -27084,6 +27117,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -27535,16 +27569,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -27571,7 +27605,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -27647,7 +27681,7 @@ magnitude64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -28021,7 +28055,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -28772,8 +28805,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28952,8 +28985,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29269,8 +29302,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29669,7 +29702,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -29899,7 +29932,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30166,7 +30199,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30430,7 +30463,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -30866,7 +30899,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -30876,7 +30909,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -30887,7 +30920,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -30904,7 +30937,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -30916,8 +30949,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -30935,7 +30967,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -31053,7 +31085,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -32871,8 +32903,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -32880,14 +32911,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -32912,8 +32943,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -32921,14 +32951,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -32955,8 +32985,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -32964,14 +32993,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -33003,7 +33032,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -33161,13 +33190,13 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -33372,7 +33401,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))); @@ -33427,13 +33456,13 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -33638,7 +33667,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))); @@ -33689,14 +33718,14 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -33936,7 +33965,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))); @@ -34020,6 +34049,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -34252,7 +34328,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -35612,7 +35688,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -35850,7 +35926,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -36161,7 +36237,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -36255,7 +36331,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -36315,7 +36391,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -36459,8 +36535,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -36468,18 +36543,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -36502,8 +36577,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -36511,18 +36585,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -36534,8 +36608,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -36543,22 +36616,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -36783,7 +36856,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -36799,28 +36872,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = numSlots2; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ assert(!(isFreeObject(stack))); longAtput(stack, (longAt(stack)) | (1ULL << (markedBitFullShift()))); @@ -36837,28 +36910,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = numSlots3; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -36868,7 +36941,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -36878,7 +36950,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -36917,7 +36988,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & (smallIntegerTag())) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -36939,7 +37010,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -36977,28 +37048,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = numSlots; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -37013,13 +37084,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 3); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -37998,7 +38069,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -41352,8 +41423,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41361,14 +41431,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41393,8 +41463,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -41402,14 +41471,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -41436,8 +41505,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -41445,14 +41513,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -41711,7 +41779,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -41969,8 +42037,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41978,14 +42045,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42006,8 +42073,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42015,14 +42081,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -42045,8 +42111,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -42054,14 +42119,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -42204,18 +42269,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3))) != 7)) { return 0; @@ -42297,8 +42366,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42705,7 +42773,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; sqInt newFormat; sqInt normalizedInstFormat; @@ -42956,6 +43024,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -42987,7 +43066,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -43108,7 +43187,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -43120,7 +43199,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -43131,7 +43210,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -43599,8 +43678,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43608,14 +43686,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43638,8 +43716,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -43647,14 +43724,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -43700,8 +43777,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43709,14 +43785,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -43840,16 +43916,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43879,12 +43954,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -43913,16 +43987,15 @@ copyAndForwardMourner(sqInt mourner) then corpse is threaded onto the weakList for later treatment. */ /* SpurGenerationScavenger>>#copyAndForward: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForward(sqInt survivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43968,12 +44041,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -44007,12 +44079,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -44212,7 +44284,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -44740,8 +44812,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -45185,8 +45256,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45194,14 +45264,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -45227,8 +45297,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -45236,14 +45305,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -45258,8 +45327,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -45267,14 +45335,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -45648,7 +45716,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -45656,7 +45724,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -45667,8 +45735,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45709,8 +45776,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45718,14 +45784,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45764,8 +45830,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45812,8 +45877,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45821,14 +45885,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -45876,8 +45940,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -45885,14 +45948,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45937,8 +46000,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -45991,8 +46053,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -46000,14 +46061,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -46051,7 +46112,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -46070,7 +46131,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -46086,7 +46147,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -46186,8 +46247,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46223,8 +46283,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46232,14 +46291,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -46276,8 +46335,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -46285,14 +46343,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46322,8 +46380,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46331,14 +46388,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -46449,8 +46506,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46458,14 +46514,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46489,8 +46545,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46498,14 +46553,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46531,8 +46586,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46540,14 +46594,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -46589,8 +46643,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46598,14 +46651,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -47691,8 +47744,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47700,14 +47752,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47752,8 +47804,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47761,14 +47812,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47848,8 +47899,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47857,14 +47907,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -48020,12 +48070,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -48068,8 +48118,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48077,14 +48126,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48135,12 +48184,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -48183,8 +48232,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48192,14 +48240,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -48293,12 +48341,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -48358,8 +48406,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -48367,14 +48414,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -48424,7 +48471,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -48465,7 +48512,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -49059,8 +49106,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49068,14 +49114,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -49504,8 +49550,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49513,14 +49558,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49552,8 +49597,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49561,14 +49605,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49602,8 +49646,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49611,14 +49654,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -49904,7 +49947,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -50159,8 +50201,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50168,14 +50209,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50198,8 +50239,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50207,14 +50247,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -50450,8 +50490,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50459,14 +50498,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50499,8 +50538,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50508,14 +50546,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50550,8 +50588,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50559,14 +50596,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -50646,8 +50683,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50655,14 +50691,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50692,8 +50728,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50701,14 +50736,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50740,8 +50775,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50749,14 +50783,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -51326,7 +51360,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51651,8 +51685,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51660,14 +51693,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51690,8 +51723,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -51699,14 +51731,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -51731,8 +51763,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -51740,14 +51771,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -51805,7 +51836,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -51813,7 +51844,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -51852,10 +51883,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i2 = 2; i2 < GIV(numClassTablePages); i2 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i2; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -51906,8 +51937,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51915,14 +51945,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } @@ -53427,8 +53457,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -53450,8 +53479,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53495,7 +53523,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -53503,7 +53531,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -53511,7 +53539,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -53519,11 +53547,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -53533,7 +53561,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -53541,11 +53569,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -53558,8 +53586,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -53567,17 +53594,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -53586,7 +53613,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -53605,7 +53632,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -53621,7 +53648,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -53642,8 +53669,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -53651,17 +53677,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -53669,8 +53695,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53678,17 +53703,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -53708,7 +53733,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -53766,8 +53790,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -53775,14 +53798,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -53908,8 +53931,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53917,14 +53939,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -53954,8 +53976,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53963,14 +53984,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -53993,8 +54014,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -54002,14 +54022,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -54115,8 +54135,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -54124,14 +54143,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54185,8 +54204,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -54194,14 +54212,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -54257,8 +54275,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -54266,14 +54283,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -54305,7 +54322,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -54413,7 +54430,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -54441,7 +54458,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -54465,7 +54482,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -54493,7 +54510,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -54516,8 +54533,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54525,14 +54541,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -55026,7 +55042,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -55280,7 +55296,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -55655,8 +55671,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55692,7 +55707,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -55707,7 +55722,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -55971,8 +55986,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55994,8 +56008,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56018,8 +56031,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -56040,8 +56052,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -56119,8 +56130,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56128,14 +56138,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56157,8 +56167,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56166,14 +56175,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -56198,8 +56207,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56207,14 +56215,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -56326,8 +56334,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56423,8 +56430,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56432,14 +56438,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56478,8 +56484,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -56487,14 +56492,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56526,8 +56531,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56535,14 +56539,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -56683,8 +56687,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57170,8 +57173,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57179,14 +57181,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57217,8 +57219,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57226,14 +57227,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57266,8 +57267,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57275,14 +57275,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57386,8 +57386,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57395,14 +57394,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57440,8 +57439,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57449,14 +57447,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57496,8 +57494,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57505,14 +57502,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57638,8 +57635,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57647,14 +57643,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57684,8 +57680,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57693,14 +57688,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57723,8 +57718,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57732,14 +57726,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57815,8 +57809,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57824,14 +57817,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57859,8 +57852,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57868,14 +57860,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -57898,8 +57890,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57907,14 +57898,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -58262,8 +58253,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58271,14 +58261,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58308,8 +58298,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58317,14 +58306,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58347,8 +58336,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58356,14 +58344,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58489,8 +58477,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58498,14 +58485,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58534,8 +58521,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58543,14 +58529,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58581,8 +58567,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58590,14 +58575,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58680,8 +58665,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58689,14 +58673,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58732,8 +58716,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58741,14 +58724,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58786,8 +58769,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58795,14 +58777,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58886,8 +58868,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58895,14 +58876,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58932,8 +58913,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58941,14 +58921,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58971,8 +58951,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58980,14 +58959,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -59197,8 +59176,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -59206,14 +59184,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -59241,8 +59219,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -59250,14 +59227,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -59278,8 +59255,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -59287,14 +59263,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -59369,13 +59345,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -59383,15 +59359,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -59408,7 +59384,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -59432,8 +59408,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -59441,14 +59416,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -59469,13 +59444,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -59483,15 +59458,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -59508,7 +59483,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -59532,8 +59507,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -59541,14 +59515,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -59570,13 +59544,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -59584,15 +59558,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -59609,7 +59583,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -59634,8 +59608,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -59643,14 +59616,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -60063,7 +60036,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -60073,8 +60045,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -60125,7 +60096,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -60318,6 +60289,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -60418,7 +60399,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -60437,7 +60418,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -60453,7 +60434,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -60462,7 +60443,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -60481,7 +60462,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -60497,7 +60478,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -60561,8 +60542,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60728,7 +60708,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -61410,11 +61390,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -61429,7 +61409,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -61445,8 +61425,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -61454,16 +61433,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -61489,8 +61468,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61498,14 +61476,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -61525,16 +61503,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -61543,11 +61521,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -61555,7 +61533,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -61625,8 +61603,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -61634,14 +61611,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -61740,8 +61717,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -61761,8 +61737,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -61770,14 +61745,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -61839,8 +61814,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61919,7 +61893,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -61941,7 +61915,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -61990,7 +61964,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -62006,8 +61980,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62015,16 +61988,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -62095,8 +62068,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -62104,14 +62076,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -62130,9 +62102,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -62148,9 +62117,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -62182,9 +62150,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -62195,8 +62162,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -62206,9 +62172,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -62266,7 +62231,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -62341,8 +62306,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -62398,8 +62362,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -62407,14 +62370,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -62479,8 +62442,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62488,14 +62450,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -62612,8 +62574,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62621,14 +62582,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -62668,7 +62629,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -62834,13 +62795,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l56; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l56: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l57; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -62848,15 +62809,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l57; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l57; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l57; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -62873,7 +62834,7 @@ updatePointers(void) numLiterals1 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l57: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -62900,8 +62861,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -62909,14 +62869,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -62928,7 +62888,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -62941,13 +62901,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l63; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l63: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l64; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -62955,15 +62915,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l64; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l64; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l64; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -62980,7 +62940,7 @@ updatePointers(void) numLiterals2 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l64: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -63008,8 +62968,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -63017,16 +62976,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -63067,13 +63026,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -63081,15 +63040,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -63106,7 +63065,7 @@ updatePointers(void) numLiterals3 = ((header4 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -63143,8 +63102,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -63179,7 +63137,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -63192,8 +63150,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -63201,18 +63158,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -63235,13 +63192,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l63; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -63249,15 +63206,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l62; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l62; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -63274,7 +63231,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -63303,8 +63260,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63312,14 +63268,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -63521,8 +63477,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63530,14 +63485,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -63622,7 +63577,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -63722,8 +63677,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -63890,7 +63845,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -64006,8 +63961,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64015,24 +63969,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -64095,8 +64049,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -64325,8 +64279,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); @@ -64632,7 +64586,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -64726,8 +64679,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64735,14 +64687,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64763,8 +64715,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -64772,14 +64723,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64802,8 +64753,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -64811,14 +64761,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -65533,7 +65483,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -65543,7 +65493,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -65631,9 +65581,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -65739,6 +65689,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -66362,8 +66341,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -66371,14 +66349,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -66430,8 +66408,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -66439,14 +66416,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66500,8 +66477,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -66509,20 +66485,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -66555,8 +66531,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -66564,14 +66539,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66596,8 +66571,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -66605,14 +66579,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66639,8 +66613,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -66648,16 +66621,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -66782,8 +66755,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -66857,8 +66831,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66948,8 +66923,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -68268,8 +68244,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -69344,7 +69321,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69519,7 +69496,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69687,7 +69664,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69853,7 +69830,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -70018,7 +69995,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -70365,8 +70342,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -70419,11 +70397,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -70449,11 +70425,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -70652,18 +70626,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -70936,6 +70911,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -71389,8 +71397,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71398,14 +71405,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -71436,8 +71443,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -71445,14 +71451,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71476,8 +71482,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71485,14 +71490,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -72223,7 +72228,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72234,7 +72239,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72245,23 +72250,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72277,39 +72282,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72322,7 +72327,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72330,7 +72335,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -72341,7 +72346,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72355,7 +72360,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72368,12 +72373,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72384,7 +72389,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72392,9 +72397,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72408,8 +72413,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72417,14 +72421,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72471,7 +72475,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72482,7 +72486,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72493,23 +72497,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72525,39 +72529,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72570,7 +72574,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72578,7 +72582,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -72589,7 +72593,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72603,7 +72607,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72616,12 +72620,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72632,7 +72636,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72640,9 +72644,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72656,8 +72660,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -72665,14 +72668,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -72720,7 +72723,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72731,7 +72734,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72742,23 +72745,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72774,39 +72777,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72819,7 +72822,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72827,7 +72830,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -72838,7 +72841,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72852,7 +72855,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72865,12 +72868,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72881,7 +72884,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72889,9 +72892,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72906,8 +72909,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -72915,14 +72917,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -74240,11 +74242,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -74336,7 +74340,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -74498,14 +74502,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -74522,6 +74535,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -74534,21 +74548,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -74564,12 +74582,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -74585,6 +74606,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -74598,11 +74620,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -74628,6 +74653,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -76017,7 +76046,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -79544,7 +79573,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -79581,7 +79610,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -79882,7 +79911,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -80188,7 +80217,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -80500,8 +80529,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -80551,8 +80581,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -80688,6 +80720,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -80697,165 +80730,134 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer = floatObjectOf(getCogCodeZoneThreshold()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (16U << (shiftForWord())), valuePointer); + /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -80863,9 +80865,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -80873,22 +80875,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -80896,192 +80898,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -81110,7 +81017,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -81143,14 +81050,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { result = ConstZero; } + if (arg == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -81226,7 +81136,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -81339,48 +81249,42 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l84; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l84: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -81435,7 +81339,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -81457,12 +81362,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l65; + goto l77; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l65: /* end setCogVMFlags: */; + l77: /* end setCogVMFlags: */; } } if (index == 49) { @@ -81695,8 +81600,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -81704,14 +81608,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -81750,8 +81654,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -81759,14 +81662,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -81798,8 +81701,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -81807,14 +81709,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -81840,6 +81742,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -81889,6 +81792,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spursista64src/vm/cointerp.h b/spursista64src/vm/cointerp.h index b98a9a930..656ad93d8 100644 --- a/spursista64src/vm/cointerp.h +++ b/spursista64src/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ @@ -142,6 +142,7 @@ extern usqInt scavengeThresholdAddress(void); extern usqInt specialObjectsArrayAddress(void); extern sqInt withoutForwardingOnandwithsendToCogit(sqInt obj1, sqInt obj2, sqInt aBool, sqInt (*selector)(sqInt,sqInt,sqInt)); extern sqInt byteSwapped(sqInt w); +extern sqInt fetchClassTagOf(sqInt oop); extern sqInt floatObjectOf(double aFloat); extern sqInt headerIndicatesAlternateBytecodeSet(sqInt methodHeader); extern sqInt instantiateClassindexableSize(sqInt classObj, usqInt nElements); @@ -230,7 +231,7 @@ extern void NeverInline NeverInline markAndTrace(sqInt objOop); extern sqInt maybeSplObj(sqInt index); extern sqInt nilObject(void); extern sqInt nonIndexablePointerFormat(void); -extern usqInt numBytesOf(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); extern sqInt numStrongSlotsOfWeakling(sqInt objOop); @@ -285,8 +286,9 @@ extern sqInt argumentCountOf(sqInt methodPointer); extern sqInt canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader); extern sqInt checkAllAccessibleObjectsOkay(void); extern sqInt checkOkayInterpreterObjects(sqInt writeBack); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt disownVM(sqInt flags); extern sqInt doSignalSemaphoreWithIndex(sqInt index); extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ; extern usqLong getNextWakeupUsecs(void); @@ -311,6 +313,7 @@ extern sqInt methodClassOf(sqInt methodPointer); extern sqInt methodPrimitiveIndex(void); extern sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); extern sqInt objCouldBeClassObj(sqInt objOop); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); @@ -352,6 +355,9 @@ VM_EXPORT sqInt breakSelectorLength ; VM_EXPORT sqInt checkAllocFiller; VM_EXPORT sqInt checkedPluginName; VM_EXPORT sqInt checkForLeaks; +VM_EXPORT sqInt debugCallbackInvokes; +VM_EXPORT sqInt debugCallbackPath; +VM_EXPORT sqInt debugCallbackReturns; VM_EXPORT sqInt deferDisplayUpdates; VM_EXPORT sqInt desiredCogCodeSize; VM_EXPORT sqInt desiredEdenBytes; diff --git a/spursista64src/vm/gcc3x-cointerp.c b/spursista64src/vm/gcc3x-cointerp.c index 73c1ec45b..7beeb4356 100644 --- a/spursista64src/vm/gcc3x-cointerp.c +++ b/spursista64src/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -732,6 +732,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -900,6 +901,7 @@ static usqInt NoDbgRegParms bytesInObject(sqInt objOop); static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); static double NoDbgRegParms dbgFloatValueOf(sqInt oop); static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop); extern sqInt floatObjectOf(double aFloat); extern double floatValueOf(sqInt oop); @@ -925,9 +927,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); -static usqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForward(sqInt survivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1188,8 +1190,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1257,6 +1259,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1351,14 +1354,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1482,6 +1486,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1658,8 +1663,8 @@ _iss usqInt freeStart; _iss usqInt newMethod; _iss sqInt messageSelector; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt trueObj; @@ -1727,6 +1732,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1735,7 +1741,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1762,6 +1767,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1776,11 +1783,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1815,6 +1820,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1837,7 +1843,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1868,6 +1873,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1883,6 +1889,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2495,7 +2504,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5108,7 +5117,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l844; + goto l843; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5156,10 +5165,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l871; + goto l870; } ourContext = marryFrameSP(localFP, localSP); - l871: /* end ensureFrameIsMarried:SP: */; + l870: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5168,7 +5177,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l844; + goto l843; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5177,10 +5186,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l864; + goto l863; } ourContext1 = marryFrameSP(localFP, localSP); - l864: /* end ensureFrameIsMarried:SP: */; + l863: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5191,7 +5200,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l844; + goto l843; } contextToReturnTo = null; if (((((longAt((home + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) { @@ -5243,10 +5252,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l857; + goto l856; } ourContext2 = marryFrameSP(localFP, localSP); - l857: /* end ensureFrameIsMarried:SP: */; + l856: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5255,7 +5264,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l844; + goto l843; } } assert(pageListIsWellFormed()); @@ -5360,11 +5369,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l854; + goto l853; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l854: /* end maybeReturnToMachineCodeFrame */; + l853: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5379,7 +5388,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l844: /* end case */; + l843: /* end case */; BREAK; CASE(121) CASE(345) /*89*/ @@ -5498,27 +5507,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l882; + goto l881; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l882; + goto l881; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l882: /* end findFrameAbove:inPage: */; + l881: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l877; + goto l876; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l877: /* end newStackPage */; + l876: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5541,7 +5550,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l873; + goto l872; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5577,7 +5586,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l873; + goto l872; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5595,7 +5604,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l873; + goto l872; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5620,7 +5629,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l873; + goto l872; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5638,7 +5647,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l873: /* end case */; + l872: /* end case */; BREAK; CASE(126) CASE(127) @@ -5672,10 +5681,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l883; + goto l882; } ourContext = marryFrameSP(theFP, theSP); - l883: /* end ensureFrameIsMarried:SP: */; + l882: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6117,12 +6126,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l901; + goto l900; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l901: /* end classAtIndex: */; + l900: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6143,7 +6152,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l885; + goto l884; } /* second probe */ @@ -6153,7 +6162,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l885; + goto l884; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6161,10 +6170,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l885; + goto l884; } ok = 0; - l885: /* end inlineLookupInMethodCacheSel:classTag: */; + l884: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6236,7 +6245,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l902; + goto l901; } } /* begin classAtIndex: */ @@ -6249,12 +6258,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l898; + goto l897; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l898: /* end classAtIndex: */; + l897: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6266,7 +6275,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l902: /* end internalFindNewMethodOrdinary */; + l901: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6279,28 +6288,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l906; + goto l905; } if (localPrimIndex == 256) { - goto l906; + goto l905; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l906; + goto l905; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l906; + goto l905; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l906; + goto l905; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 3) | 1)); - goto l906; + goto l905; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6362,7 +6371,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l906; + goto l905; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6442,11 +6451,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l900; + goto l899; } } errorCode = (((usqInt)GIV(primFailCode) << 3) | 1); - l900: /* end getErrorObjectFromPrimFailCode */; + l899: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6470,7 +6479,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l906: /* end internalExecuteNewMethod */; + l905: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6915,18 +6924,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, GIV(method), objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7042,7 +7055,7 @@ interpret(void) CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7267,7 +7280,7 @@ interpret(void) goto l123; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l123; } if (fmt >= (firstShortFormat())) { @@ -7282,7 +7295,7 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -7787,7 +7800,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -8639,7 +8652,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l920; + goto l918; } if (bytecode == 172) { @@ -8648,7 +8661,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l920; + goto l918; } if (bytecode > 167) { @@ -8658,7 +8671,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l920; + goto l918; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8666,7 +8679,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l920: /* end case */; + l918: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -8824,7 +8837,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l923; + goto l921; } if (bytecode == 172) { @@ -8834,14 +8847,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l923; + goto l921; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l923: /* end case */; + l921: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -11201,7 +11214,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l924; + goto l922; } if (bytecode == 239) { @@ -11210,7 +11223,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l924; + goto l922; } if (bytecode == 238) { @@ -11220,7 +11233,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l924; + goto l922; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -11228,7 +11241,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l924: /* end case */; + l922: /* end case */; BREAK; CASE(355) /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -11386,7 +11399,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l927; + goto l925; } if (bytecode == 239) { @@ -11396,14 +11409,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l927; + goto l925; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l927: /* end case */; + l925: /* end case */; BREAK; CASE(356) /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -13091,10 +13104,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l929; + goto l927; } ourContext = marryFrameSP(theFP, theSP); - l929: /* end ensureFrameIsMarried:SP: */; + l927: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -13326,7 +13339,7 @@ interpret(void) CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -13473,6 +13486,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l674; } @@ -14351,7 +14365,7 @@ interpret(void) goto l734; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l734; } if (fmt >= (firstShortFormat())) { @@ -14366,7 +14380,7 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 3) | 1)); break; @@ -14775,7 +14789,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14814,7 +14828,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -14826,10 +14839,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l795; + goto l785; } context = marryFrameSP(theFP, theSP); - l795: /* end ensureFrameIsMarried:SP: */; + l785: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14857,13 +14870,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l789; + goto l794; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l789: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l794: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14921,7 +14934,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14946,10 +14959,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l805; + goto l804; } context = marryFrameSP(theFP, theSP); - l805: /* end ensureFrameIsMarried:SP: */; + l804: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14977,13 +14990,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l801; + goto l800; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l801: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l800: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -15103,11 +15116,11 @@ interpret(void) value = result; } object2 = value; - goto l811; + goto l810; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l811; + goto l810; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -15130,7 +15143,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l811; + goto l810; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -15138,24 +15151,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l811; + goto l810; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l811; + goto l810; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 3) | 1); - goto l811; + goto l810; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l811; + goto l810; } error("bad index"); object2 = 0; - l811: /* end instVar:ofContext: */; + l810: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -15259,7 +15272,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l823; + goto l822; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -15280,7 +15293,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l823; + goto l822; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -15313,7 +15326,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l823: /* end instVar:ofContext:put: */; + l822: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -15331,7 +15344,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l826; + goto l825; } # endif /* IMMUTABILITY */ @@ -15351,7 +15364,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l826: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l825: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -15450,7 +15463,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l833; + goto l832; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -15471,7 +15484,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l833; + goto l832; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -15504,7 +15517,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l833: /* end instVar:ofContext:put: */; + l832: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -15522,7 +15535,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l836; + goto l835; } # endif /* IMMUTABILITY */ @@ -15542,7 +15555,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l836: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l835: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -15590,7 +15603,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l837; + goto l836; } } if (!inverse) { @@ -15599,7 +15612,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l837; + goto l836; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -15608,7 +15621,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l837: /* end case */; + l836: /* end case */; BREAK; } } @@ -16284,7 +16297,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -16306,10 +16318,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -16850,8 +16862,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -16872,8 +16885,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -17180,13 +17194,13 @@ ceCounterTripped(sqInt condition) resetCountersIn(mframeHomeMethod(GIV(framePointer))); return condition; } - addNewMethodToCache(classObj); } if ((primitiveFunctionPointer != 0) || ((argumentCountOfMethodHeader(methodHeaderOf(GIV(newMethod)))) != 1)) { resetCountersIn(mframeHomeMethod(GIV(framePointer))); return condition; } + setCogCodeZoneThreshold(1.0); /* begin splObj:put: */ assert(!(isForwarded(GIV(specialObjectsOop)))); if ((assert(isNonImmediate(GIV(specialObjectsOop))), @@ -17395,6 +17409,8 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) sqInt ceNewHashOf(sqInt anObject) { + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); return (((usqInt)(newHashBitsOf(anObject)) << 3) | 1); } @@ -17668,8 +17684,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -17826,7 +17843,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17941,7 +17957,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17974,7 +17989,7 @@ ceSendMustBeBooleanTointerpretingAtDelta(sqInt aNonBooleanObject, sqInt jumpSize sqInt oop; char *p; char *sp; - sqInt startBcpc; + unsigned short startBcpc; sqInt top; assert(addressCouldBeOop(aNonBooleanObject)); @@ -18184,7 +18199,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18312,18 +18326,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((sqInt)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -18408,7 +18426,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -18774,7 +18791,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - sqInt oop; + usqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -19640,7 +19657,6 @@ flushExternalPrimitiveOf(sqInt methodObj) header = ((((CogMethod *) header1))->methodHeader); } if (header & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (methodObj + ((LiteralStart + (((header >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primIdx1 = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -19757,7 +19773,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -20837,7 +20853,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -21439,18 +21455,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -21477,7 +21494,7 @@ mnuMethodOrNilFor(sqInt rcvr) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -21907,7 +21924,7 @@ positive32BitValueOf(sqInt oop) sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -21968,7 +21985,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -22418,7 +22435,7 @@ printFrameWithSP(char *theFP, char *theSP) usqInt index; sqInt methodField; usqInt numArgs; - usqInt numTemps; + sqInt numTemps; char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; @@ -22908,7 +22925,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -23062,6 +23079,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -23262,6 +23282,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -23510,15 +23531,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -23575,6 +23608,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -23587,8 +23621,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -23764,6 +23800,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -24123,7 +24160,7 @@ signed64BitIntegerFor(sqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -24201,7 +24238,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((((oop) & 7) == 1)) { @@ -24590,8 +24627,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -24764,6 +24802,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -25084,8 +25123,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -25093,14 +25131,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -25129,8 +25167,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -25138,14 +25175,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -25176,8 +25213,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -25185,14 +25221,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -26972,8 +27008,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -26981,14 +27016,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -27012,8 +27047,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -27021,14 +27055,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -27054,8 +27088,7 @@ primitiveVoidVMStateForMethod(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -27063,14 +27096,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l18; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -27093,6 +27126,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -27544,16 +27578,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 3) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } sz = 8; @@ -27580,7 +27614,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((((oop) & 7) == 1)) { @@ -27656,7 +27690,7 @@ magnitude64BitValueOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -28030,7 +28064,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -28781,8 +28814,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28961,8 +28994,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29278,8 +29311,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29678,7 +29711,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -29908,7 +29941,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30175,7 +30208,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30439,7 +30472,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -30875,7 +30908,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -30885,7 +30918,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -30896,7 +30929,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -30913,7 +30946,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -30925,8 +30958,7 @@ primitiveConstantFill(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(rcvr - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -30944,7 +30976,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -31062,7 +31094,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -32880,8 +32912,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -32889,14 +32920,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -32921,8 +32952,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -32930,14 +32960,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -32964,8 +32994,7 @@ primitiveFlushExternalPrimitives(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -32973,14 +33002,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -33012,7 +33041,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -33170,13 +33199,13 @@ primitiveFullClosureValue(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -33381,7 +33410,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))); @@ -33436,13 +33465,13 @@ primitiveFullClosureValueNoContextSwitch(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -33647,7 +33676,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))); @@ -33698,14 +33727,14 @@ primitiveFullClosureValueWithArgs(void) CogMethod *cogMethod; CogMethod *cogMethod1; sqInt header; - usqInt i; + sqInt i; sqInt index; int inInterpreter; sqInt methodHeader; sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -33945,7 +33974,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))); @@ -34029,6 +34058,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -34261,7 +34337,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -35621,7 +35697,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; sqInt tagBits; @@ -35859,7 +35935,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -36170,7 +36246,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -36264,7 +36340,7 @@ primitiveNewMethod(void) longAtput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + longAtput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -36324,7 +36400,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -36468,8 +36544,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -36477,18 +36552,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress); actualObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -36511,8 +36586,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -36520,18 +36594,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); actualObj = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -36543,8 +36617,7 @@ primitiveNextInstance(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(actualObj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -36552,22 +36625,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); actualObj = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -36792,7 +36865,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -36808,28 +36881,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = numSlots2; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ assert(!(isFreeObject(stack))); longAtput(stack, (longAt(stack)) | (1ULL << (markedBitFullShift()))); @@ -36846,28 +36919,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = numSlots3; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -36877,7 +36950,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -36887,7 +36959,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -36926,7 +36997,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & (smallIntegerTag())) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -36948,7 +37019,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -36986,28 +37057,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = numSlots; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -37022,13 +37093,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 3); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -38007,7 +38078,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -41361,8 +41432,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41370,14 +41440,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41402,8 +41472,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -41411,14 +41480,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -41445,8 +41514,7 @@ primitiveUnloadModule(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -41454,14 +41522,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -41720,7 +41788,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -41978,8 +42046,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -41987,14 +42054,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -42015,8 +42082,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -42024,14 +42090,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -42054,8 +42120,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -42063,14 +42128,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -42213,18 +42278,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3))) != 7)) { return 0; @@ -42306,8 +42375,7 @@ addressAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -42714,7 +42782,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; sqInt newFormat; sqInt normalizedInstFormat; @@ -42965,6 +43033,17 @@ defaultEdenBytes(void) return (7 * 1024) * 1024; } + /* Spur64BitMemoryManager>>#fetchClassTagOf: */ +sqInt +fetchClassTagOf(sqInt oop) +{ + sqInt tagBits; + + return (((tagBits = oop & (tagMask()))) != 0 + ? tagBits + : (longAt(oop)) & (classIndexMask())); +} + /* index by word size, and return a pointer as long as the word size */ @@ -42996,7 +43075,7 @@ fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -43117,7 +43196,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -43129,7 +43208,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) } numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); - longAtput(address, numSlots << (numSlotsFullShift())); + longAtput(address, ((sqLong)((usqLong)(numSlots) << (numSlotsFullShift())))); return address; } @@ -43140,7 +43219,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -43608,8 +43687,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43617,14 +43695,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -43647,8 +43725,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -43656,14 +43733,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -43709,8 +43786,7 @@ allWeakSurvivorsOnWeakList(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -43718,14 +43794,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -43849,16 +43925,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43888,12 +43963,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -43922,16 +43996,15 @@ copyAndForwardMourner(sqInt mourner) then corpse is threaded onto the weakList for later treatment. */ /* SpurGenerationScavenger>>#copyAndForward: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForward(sqInt survivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; sqInt header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -43977,12 +44050,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & (~(usqIntptr_t)(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -44016,12 +44088,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; sqInt header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -44221,7 +44293,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -44749,8 +44821,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -45194,8 +45265,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45203,14 +45273,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objAfter = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -45236,8 +45306,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -45245,14 +45314,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objAfter = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -45267,8 +45336,7 @@ accessibleObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objAfter - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -45276,14 +45344,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objAfter = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -45657,7 +45725,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l7; + goto l6; } longAtput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -45665,7 +45733,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l7: /* end allocateSlots:format:classIndex: */; + l6: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -45676,8 +45744,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -45718,8 +45785,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -45727,14 +45793,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45773,8 +45839,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -45821,8 +45886,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -45830,14 +45894,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l21; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -45885,8 +45949,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -45894,14 +45957,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l37; + goto l30; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop11 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l37: /* end objectAfter:limit: */; + l30: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -45946,8 +46009,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -46000,8 +46062,7 @@ allInstancesOf(sqInt aClass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -46009,14 +46070,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l33; + goto l24; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop2 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l33: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -46060,7 +46121,7 @@ allInstancesOf(sqInt aClass) if (count >= (numSlotsMask())) { if ((((usqInt) count) >> 56) > 0) { smallObj = null; - goto l9; + goto l8; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (count * BytesPerOop); @@ -46079,7 +46140,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l9; + goto l8; } if (count >= (numSlotsMask())) { @@ -46095,7 +46156,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l9: /* end allocateSlots:format:classIndex: */; + l8: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -46195,8 +46256,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46232,8 +46292,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46241,14 +46300,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -46285,8 +46344,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -46294,14 +46352,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l15; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46331,8 +46389,7 @@ allObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46340,14 +46397,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -46458,8 +46515,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46467,14 +46523,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46498,8 +46554,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -46507,14 +46562,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -46540,8 +46595,7 @@ allObjectsUnmarked(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -46549,14 +46603,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -46598,8 +46652,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -46607,14 +46660,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -47700,8 +47753,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -47709,14 +47761,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47761,8 +47813,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -47770,14 +47821,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -47857,8 +47908,7 @@ checkHeapFreeSpaceIntegrity(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -47866,14 +47916,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -48029,12 +48079,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -48077,8 +48127,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -48086,14 +48135,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48144,12 +48193,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -48192,8 +48241,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -48201,14 +48249,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -48302,12 +48350,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -48367,8 +48415,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -48376,14 +48423,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -48433,7 +48480,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -48474,7 +48521,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -49068,8 +49115,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49077,14 +49123,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -49513,8 +49559,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -49522,14 +49567,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49561,8 +49606,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -49570,14 +49614,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49611,8 +49655,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -49620,14 +49663,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -49913,7 +49956,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((sqInt)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -50168,8 +50210,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50177,14 +50218,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50207,8 +50248,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50216,14 +50256,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -50459,8 +50499,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50468,14 +50507,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50508,8 +50547,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50517,14 +50555,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50559,8 +50597,7 @@ findStringBeginningWith(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50568,14 +50605,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -50655,8 +50692,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -50664,14 +50700,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50701,8 +50737,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -50710,14 +50745,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50749,8 +50784,7 @@ findString(char *aCString) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -50758,14 +50792,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -51335,7 +51369,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -51660,8 +51694,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51669,14 +51702,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -51699,8 +51732,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -51708,14 +51740,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -51740,8 +51772,7 @@ initialInstanceOf(sqInt classObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -51749,14 +51780,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -51814,7 +51845,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -51822,7 +51853,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -51861,10 +51892,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i2 = 2; i2 < GIV(numClassTablePages); i2 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i2; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -51915,8 +51946,7 @@ initializeObjectMemory(sqInt bytesToShift) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -51924,14 +51954,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l13; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); obj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l13: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } } @@ -53436,8 +53466,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -53459,8 +53488,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53504,7 +53532,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop2))) >> (markedBitFullShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -53512,7 +53540,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex3 & TopHashBit) { if ((classIndex3 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex3 - TopHashBit)) << (shiftForWord()))))); @@ -53520,7 +53548,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } else { @@ -53528,11 +53556,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex3 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop2)) - 1); i <= iLimiT; i += 1) { @@ -53542,7 +53570,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -53550,11 +53578,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l38; + goto l31; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l38; + goto l31; } } assert(!(isOopForwarded(objOop2))); @@ -53567,8 +53595,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = numSlots8 << (shiftForWord()); @@ -53576,17 +53603,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l29; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop2 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l29: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l38: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -53595,7 +53622,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (numLoadedObjects >= (numSlotsMask())) { if ((((usqInt) numLoadedObjects) >> 56) > 0) { loadedObjectsArray = null; - goto l14; + goto l12; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numLoadedObjects * BytesPerOop); @@ -53614,7 +53641,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -53630,7 +53657,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -53651,8 +53678,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots3 << (shiftForWord()); @@ -53660,17 +53686,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -53678,8 +53704,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -53687,17 +53712,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -53717,7 +53742,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop1)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -53775,8 +53799,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = numSlots7 << (shiftForWord()); @@ -53784,14 +53807,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l23; + goto l19; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -53917,8 +53940,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -53926,14 +53948,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -53963,8 +53985,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -53972,14 +53993,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54002,8 +54023,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -54011,14 +54031,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -54124,8 +54144,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -54133,14 +54152,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54194,8 +54213,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -54203,14 +54221,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -54266,8 +54284,7 @@ longPrintReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -54275,14 +54292,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -54314,7 +54331,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -54422,7 +54439,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -54450,7 +54467,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -54474,7 +54491,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -54502,7 +54519,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe assert(!(isFreeObject(oop))); longAtput(oop, (longAt(oop)) | (1ULL << (markedBitFullShift()))); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -54525,8 +54542,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -54534,14 +54550,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -55035,7 +55051,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -55289,7 +55305,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -55664,8 +55680,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -55701,7 +55716,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -55716,7 +55731,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -55980,8 +55995,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56003,8 +56017,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56027,8 +56040,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -56049,8 +56061,7 @@ objectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots4 << (shiftForWord()); @@ -56128,8 +56139,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56137,14 +56147,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56166,8 +56176,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56175,14 +56184,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -56207,8 +56216,7 @@ objectBefore(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56216,14 +56224,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop2 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -56335,8 +56343,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(freeChunk - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -56432,8 +56439,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -56441,14 +56447,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56487,8 +56493,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -56496,14 +56501,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56535,8 +56540,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -56544,14 +56548,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -56692,8 +56696,7 @@ oldSpaceObjectAfter(sqInt objOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57179,8 +57182,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57188,14 +57190,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57226,8 +57228,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57235,14 +57236,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57275,8 +57276,7 @@ printActivationsOf(sqInt aMethodObj) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57284,14 +57284,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57395,8 +57395,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57404,14 +57403,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57449,8 +57448,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57458,14 +57456,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57505,8 +57503,7 @@ printContextReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57514,14 +57511,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57647,8 +57644,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57656,14 +57652,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57693,8 +57689,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57702,14 +57697,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop2 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57732,8 +57727,7 @@ printForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57741,14 +57735,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57824,8 +57818,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -57833,14 +57826,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57868,8 +57861,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -57877,14 +57869,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -57907,8 +57899,7 @@ printFreeChunks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -57916,14 +57907,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -58271,8 +58262,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58280,14 +58270,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58317,8 +58307,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58326,14 +58315,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58356,8 +58345,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58365,14 +58353,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -58498,8 +58486,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58507,14 +58494,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58543,8 +58530,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58552,14 +58538,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58590,8 +58576,7 @@ printMethodImplementorsOf(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58599,14 +58584,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58689,8 +58674,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58698,14 +58682,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58741,8 +58725,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58750,14 +58733,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -58795,8 +58778,7 @@ printMethodReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58804,14 +58786,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58895,8 +58877,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -58904,14 +58885,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -58941,8 +58922,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -58950,14 +58930,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -58980,8 +58960,7 @@ printObjectsWithHash(sqInt hash) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -58989,14 +58968,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -59206,8 +59185,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -59215,14 +59193,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -59250,8 +59228,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -59259,14 +59236,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -59287,8 +59264,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -59296,14 +59272,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -59378,13 +59354,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l19; + goto l16; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l19: /* end fetchStackPointerOf: */; + l16: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -59392,15 +59368,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -59417,7 +59393,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -59441,8 +59417,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -59450,14 +59425,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -59478,13 +59453,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -59492,15 +59467,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -59517,7 +59492,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -59541,8 +59516,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -59550,14 +59524,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -59579,13 +59553,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); contextSize = (sp >> 3); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -59593,15 +59567,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -59618,7 +59592,7 @@ printReferencesTo(sqInt anOop) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -59643,8 +59617,7 @@ printReferencesTo(sqInt anOop) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -59652,14 +59625,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -60072,7 +60045,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -60082,8 +60054,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -60134,7 +60105,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -60327,6 +60298,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -60427,7 +60408,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots3 >= (numSlotsMask())) { if ((((usqInt) numSlots3) >> 56) > 0) { savedInHashes = null; - goto l9; + goto l8; } newObj = GIV(freeStart) + BaseHeaderSize; numBytes = (BaseHeaderSize + BaseHeaderSize) + (numSlots3 * BytesPerOop); @@ -60446,7 +60427,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -60462,7 +60443,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -60471,7 +60452,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr if (numSlots4 >= (numSlotsMask())) { if ((((usqInt) numSlots4) >> 56) > 0) { savedOutHashes = null; - goto l11; + goto l10; } newObj1 = GIV(freeStart) + BaseHeaderSize; numBytes1 = (BaseHeaderSize + BaseHeaderSize) + (numSlots4 * BytesPerOop); @@ -60490,7 +60471,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -60506,7 +60487,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -60570,8 +60551,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(segmentWordArray - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -60737,7 +60717,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -61419,11 +61399,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -61438,7 +61418,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop11))); @@ -61454,8 +61434,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -61463,16 +61442,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -61498,8 +61477,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -61507,14 +61485,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -61534,16 +61512,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l14; + goto l12; } } highestSuitableFreeBlock1 = null; - l14: /* end findHighestSuitableFreeBlock: */; + l12: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l11; + goto l9; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -61552,11 +61530,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l11; + goto l9; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l11; + goto l9; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -61564,7 +61542,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l11: /* end selectSavedFirstFieldsSpace */; +l9: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop4 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop4 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -61634,8 +61612,7 @@ compact(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop13 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots4 << (shiftForWord()); @@ -61643,14 +61620,14 @@ compact(void) followingWordAddress2 = (objOop13 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop13 = GIV(pastSpaceStart); - goto l22; + goto l16; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop13 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -61749,8 +61726,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(finalObject - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots3 << (shiftForWord()); @@ -61770,8 +61746,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots21 << (shiftForWord()); @@ -61779,14 +61754,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); nextObj = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -61848,8 +61823,7 @@ copyAndUnmarkMobileObjects(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -61928,7 +61902,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -61950,7 +61924,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -61999,7 +61973,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } /* begin setIsMarkedOf:to: */ assert(!(isFreeObject(objOop1))); @@ -62015,8 +61989,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62024,16 +61997,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -62104,8 +62077,7 @@ copyAndUnmark(sqInt firstPass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop2 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -62113,14 +62085,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop2 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -62139,9 +62111,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -62157,9 +62126,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -62191,9 +62159,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -62204,8 +62171,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(obj - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -62215,9 +62181,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -62275,7 +62240,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -62350,8 +62315,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots2 << (shiftForWord()); @@ -62407,8 +62371,7 @@ planCompactSavingForwarders(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots3 << (shiftForWord()); @@ -62416,14 +62379,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -62488,8 +62451,7 @@ reinitializeScanFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62497,14 +62459,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -62621,8 +62583,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -62630,14 +62591,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -62677,7 +62638,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -62843,13 +62804,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp1) & 7) == 1))) { contextSize1 = 0; - goto l62; + goto l56; } assert((ReceiverIndex + ((sp1 >> 3))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 3); - l62: /* end fetchStackPointerOf: */; + l56: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l61; + goto l57; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -62857,15 +62818,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots3); - goto l61; + goto l57; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l61; + goto l57; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l61; + goto l57; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -62882,7 +62843,7 @@ updatePointers(void) numLiterals1 = ((header2 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l61: /* end numPointerSlotsOf: */; + l57: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -62909,8 +62870,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots4 << (shiftForWord()); @@ -62918,14 +62878,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l19; + goto l22; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop11 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l19: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -62937,7 +62897,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l41; + goto l38; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -62950,13 +62910,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp2) & 7) == 1))) { contextSize2 = 0; - goto l63; + goto l59; } assert((ReceiverIndex + ((sp2 >> 3))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 3); - l63: /* end fetchStackPointerOf: */; + l59: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l64; + goto l58; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -62964,15 +62924,15 @@ updatePointers(void) numPointerSlots2 = (numSlots22 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots22); - goto l64; + goto l58; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l64; + goto l58; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l64; + goto l58; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -62989,7 +62949,7 @@ updatePointers(void) numLiterals2 = ((header3 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l64: /* end numPointerSlotsOf: */; + l58: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -63017,8 +62977,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -63026,16 +62985,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l31; + goto l33; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop12 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l31: /* end objectAfter:limit: */; + l33: /* end objectAfter:limit: */; } -l41: /* end updatePointersInInitialImmobileObjects */; +l38: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -63076,13 +63035,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp3) & 7) == 1))) { contextSize3 = 0; - goto l65; + goto l60; } assert((ReceiverIndex + ((sp3 >> 3))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 3); - l65: /* end fetchStackPointerOf: */; + l60: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l66; + goto l61; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -63090,15 +63049,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots41); - goto l66; + goto l61; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l66; + goto l61; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l66; + goto l61; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -63115,7 +63074,7 @@ updatePointers(void) numLiterals3 = ((header4 >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l66: /* end numPointerSlotsOf: */; + l61: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -63152,8 +63111,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(previousPin - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots23 << (shiftForWord()); @@ -63188,7 +63146,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l60; + goto l55; } } } @@ -63201,8 +63159,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots31 << (shiftForWord()); @@ -63210,18 +63167,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l55; + goto l39; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop4 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l55: /* end objectAfter:limit: */; + l39: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l60: /* end updatePointersInMobileObjects */; +l55: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -63244,13 +63201,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((((sp) & 7) == 1))) { contextSize = 0; - goto l67; + goto l63; } assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); contextSize = (sp >> 3); - l67: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l68; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -63258,15 +63215,15 @@ updatePointers(void) numPointerSlots = (numSlots2 == (numSlotsMask()) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots2); - goto l68; + goto l62; } if (fmt == 7) { numPointerSlots = 1; - goto l68; + goto l62; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l68; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -63283,7 +63240,7 @@ updatePointers(void) numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l68: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i1 = 0; i1 < numPointerSlots; i1 += 1) { /* begin fetchPointer:ofObject: */ oop1 = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord()))))); @@ -63312,8 +63269,7 @@ updatePointers(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63321,14 +63277,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l12; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l12: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } } } @@ -63530,8 +63486,7 @@ validRelocationPlanInPass(sqInt onePass) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -63539,14 +63494,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -63631,7 +63586,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -63731,8 +63686,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -63899,7 +63854,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -64015,8 +63970,7 @@ prepareForSnapshot(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(node - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64024,24 +63978,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress); next = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -64104,8 +64058,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqLong bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -64334,8 +64288,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); @@ -64641,7 +64595,6 @@ canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader) sqInt primitiveIndex; if (methodHeader & AlternateHeaderHasPrimFlag) { - /* begin firstBytecodeOfAlternateHeader:method: */ firstBytecode = (theMethod + ((LiteralStart + (((methodHeader >> 3)) & AlternateHeaderNumLiteralsMask)) * BytesPerOop)) + BaseHeaderSize; primitiveIndex = (byteAt(firstBytecode + 1)) + (((sqInt)((usqInt)((byteAt(firstBytecode + 2))) << 8))); } @@ -64735,8 +64688,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -64744,14 +64696,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64772,8 +64724,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -64781,14 +64732,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64811,8 +64762,7 @@ checkAllAccessibleObjectsOkay(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -64820,14 +64770,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -65542,7 +65492,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -65552,7 +65502,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -65640,9 +65590,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -65748,6 +65698,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((((flags) & 7) == 1)) + && (((((flags >> 3)) >= 0) && (((flags >> 3)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 3); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -66371,8 +66350,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = numSlots6 << (shiftForWord()); @@ -66380,14 +66358,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3); objOop12 = ((((usqInt) followingWord3) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -66439,8 +66417,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = numSlots21 << (shiftForWord()); @@ -66448,14 +66425,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11); objOop12 = ((((usqInt) followingWord11) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66509,8 +66486,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop111 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = numSlots51 << (shiftForWord()); @@ -66518,20 +66494,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21); objOop111 = ((((usqInt) followingWord21) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -66564,8 +66540,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -66573,14 +66548,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop1 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -66605,8 +66580,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -66614,14 +66588,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop1 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -66648,8 +66622,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -66657,16 +66630,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -66791,8 +66764,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -66866,8 +66840,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66957,8 +66932,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -68277,8 +68253,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -69353,7 +69330,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69528,7 +69505,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69696,7 +69673,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -69862,7 +69839,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -70027,7 +70004,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((sqInt)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -70374,8 +70351,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -70428,11 +70406,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -70458,11 +70434,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -70661,18 +70635,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -70945,6 +70920,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 3) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -71398,8 +71406,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -71407,14 +71414,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -71445,8 +71452,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots6 << (shiftForWord()); @@ -71454,14 +71460,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop4 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -71485,8 +71491,7 @@ printAllStacks(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop4 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -71494,14 +71499,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop4 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -72232,7 +72237,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72243,7 +72248,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72254,23 +72259,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72286,39 +72291,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72331,7 +72336,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72339,7 +72344,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -72350,7 +72355,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72364,7 +72369,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72377,12 +72382,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72393,7 +72398,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72401,9 +72406,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72417,8 +72422,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -72426,14 +72430,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop12 = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -72480,7 +72484,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72491,7 +72495,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72502,23 +72506,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72534,39 +72538,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72579,7 +72583,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72587,7 +72591,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -72598,7 +72602,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72612,7 +72616,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72625,12 +72629,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72641,7 +72645,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72649,9 +72653,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72665,8 +72669,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop12 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -72674,14 +72677,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop12 = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -72729,7 +72732,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((((oop) & 7) == 1)) { printNum((oop >> 3)); @@ -72740,7 +72743,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if (oop & (smallFloatTag())) { printFloat(dbgFloatValueOf(oop)); @@ -72751,23 +72754,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -72783,39 +72786,39 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if ((((tagBits = oop & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) : ((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -72828,7 +72831,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -72836,7 +72839,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -72847,7 +72850,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 3); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -72861,7 +72864,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((sqInt)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 3)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -72874,12 +72877,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -72890,7 +72893,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -72898,9 +72901,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((sqInt)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -72915,8 +72918,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop11 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -72924,14 +72926,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop11 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -74249,11 +74251,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -74345,7 +74349,7 @@ removeFirstLinkOfList(sqInt aList) static sqInt retryPrimitiveOnFailure(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt accessorDepth; + signed char accessorDepth; sqInt canRetry; sqInt firstBytecode; sqInt followDone; @@ -74507,14 +74511,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((((returnTypeOop) & 7) == 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((((returnTypeOop) & 7) == 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -74531,6 +74544,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -74543,21 +74557,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop) & 7) == 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -74573,12 +74591,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -74594,6 +74615,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((((longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))))) & 7) == 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((sqInt)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((((senderOop1) & 7) == 1)); @@ -74607,11 +74629,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -74637,6 +74662,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 3)); return 1; } @@ -76026,7 +76055,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -79553,7 +79582,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -79590,7 +79619,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 3) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 3) | 1)); @@ -79891,7 +79920,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -80197,7 +80226,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -80509,8 +80538,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -80560,8 +80590,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -80697,6 +80729,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -80706,165 +80739,134 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 3) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 3) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); + valuePointer = floatObjectOf(getCogCodeZoneThreshold()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (16U << (shiftForWord())), valuePointer); + /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 3) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 3) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 3) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 3) | 1); + valuePointer23 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 3) | 1); + valuePointer24 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 3) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 3) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 3) | 1); + valuePointer31 = (((usqInt)0 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 3) | 1)); @@ -80872,9 +80874,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)68021 << 3) | 1); + valuePointer33 = (((usqInt)68021 << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 3) | 1)); @@ -80882,22 +80884,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 3) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -80905,192 +80907,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 3) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 3) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 3) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 3) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 3) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 3) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 3) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -81119,7 +81026,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 3) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -81152,14 +81059,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 3) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { result = ConstZero; } + if (arg == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 3) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 3) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -81235,7 +81145,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); result = (((usqInt)desiredNumStackPages << 3) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 3) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 3) | 1); @@ -81348,48 +81258,42 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((((arg) & 7) == 1)) { - arg = (arg >> 3); - } - else { - if (!((index == 55) - && ((((tagBits = arg & (tagMask()))) != 0 + if ((index == 17) + || (index == 55)) { + if (!((((tagBits = arg & (tagMask()))) != 0 ? tagBits == (smallFloatTag()) - : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + : ((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((((arg) & 7) == 1)) { + arg = (arg >> 3); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 3) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l84; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l84: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 3) | 1); @@ -81444,7 +81348,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 3) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -81466,12 +81371,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 3) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l65; + goto l77; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l65: /* end setCogVMFlags: */; + l77: /* end setCogVMFlags: */; } } if (index == 49) { @@ -81704,8 +81609,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop1 - BaseHeaderSize))) << 8)))))) >> 8 : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = numSlots5 << (shiftForWord()); @@ -81713,14 +81617,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2); objOop1 = ((((usqInt) followingWord2) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -81759,8 +81663,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = numSlots << (shiftForWord()); @@ -81768,14 +81671,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress); objOop = ((((usqInt) followingWord) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -81807,8 +81710,7 @@ unmarkAfterPathTo(void) ? ((usqInt) (((usqInt)(((sqInt)((usqInt)((longAt(objOop - BaseHeaderSize))) << 8)))))) >> 8 : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = numSlots2 << (shiftForWord()); @@ -81816,14 +81718,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1); objOop = ((((usqInt) followingWord1) >> (numSlotsFullShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -81849,6 +81751,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -81898,6 +81801,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spursista64src/vm/interp.h b/spursista64src/vm/interp.h index b9dfdeea4..a720cf6a7 100644 --- a/spursista64src/vm/interp.h +++ b/spursista64src/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 8 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1152921504606846976 #define MaxSmallInteger 1152921504606846975 diff --git a/spursista64src/vm/vmCallback.h b/spursista64src/vm/vmCallback.h index 48d07f100..3bf23acc7 100644 --- a/spursista64src/vm/vmCallback.h +++ b/spursista64src/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1992 uuid: 6feb3008-c996-4d53-b572-55c31a5b58dc + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/spursistasrc/vm/cogit.h b/spursistasrc/vm/cogit.h index f4de8af4a..f359d988f 100644 --- a/spursistasrc/vm/cogit.h +++ b/spursistasrc/vm/cogit.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ @@ -41,7 +41,6 @@ extern sqInt cogMethodDoesntLookKosher(CogMethod *cogMethod); extern CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs); extern CogMethod * cogselector(sqInt aMethodObj, sqInt aSelectorOop); extern void compactCogCompiledCode(void); -extern sqInt defaultCogCodeSize(void); extern void enterCogCodePopReceiver(void); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); extern void followForwardedLiteralsIn(CogMethod *cogMethod); @@ -94,9 +93,12 @@ extern sqInt mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj); extern void recordCallOffsetIn(CogMethod *cogMethod); extern void rewritePrimInvocationInto(CogMethod *cogMethod, void (*primFunctionPointer)(void)); extern void voidCogCompiledCode(void); +extern sqInt defaultCogCodeSize(void); extern usqInt getJumpTargetPCAt(sqInt pc); extern void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); +extern double getCogCodeZoneThreshold(void); +extern sqInt setCogCodeZoneThreshold(double ratio); extern void callCogCodePopReceiverArg0Regs(void); extern void callCogCodePopReceiverArg1Arg0Regs(void); @@ -149,6 +151,7 @@ VM_EXPORT sqInt traceStores; #define getCFramePointer() CFramePointer #define getCStackPointer() CStackPointer #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define noCheckEntryOffset() cmNoCheckEntryOffset #define noContextSwitchBlockEntryOffset() blockNoContextSwitchOffset #define printOnTrace() (traceFlags & 1) diff --git a/spursistasrc/vm/cogitARMv5.c b/spursistasrc/vm/cogitARMv5.c index ad6940098..52537c270 100644 --- a/spursistasrc/vm/cogitARMv5.c +++ b/spursistasrc/vm/cogitARMv5.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - SistaCogit VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + SistaCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -253,7 +253,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 70 : 65) +#define NumTrampolines (IMMUTABILITY ? 71 : 66) #define OrCqR 108 #define OrCwR 116 #define OrOpcode 12 @@ -269,6 +269,7 @@ char *__cogitBuildInfo = __buildInfo; #define PrimCallMayCallBack 4 #define PrimCallNeedsNewMethod 1 #define PrimCallNeedsPrimitiveFunction 2 +#define PrimErrBadArgument 3 #define PrimErrNoMemory 9 #define PrimErrWritePastObject 17 #define PushCq 83 @@ -328,10 +329,10 @@ typedef struct _AbstractInstruction { unsigned char maxSize; unsigned char annotation; unsigned char conditionOrNil; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; - usqIntptr_t machineCode [5]; + unsigned int machineCode [5]; } AbstractInstruction; #define CogOutOfLineLiteralsARMCompiler AbstractInstruction @@ -399,10 +400,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -517,7 +520,7 @@ static sqInt NoDbgRegParms ldrhrnrm(AbstractInstruction * self_in_ldrhrnrm, sqIn static sqInt NoDbgRegParms ldrrnplusImm(AbstractInstruction * self_in_ldrrnplusImm, sqInt destReg, sqInt baseReg, sqInt immediate12bitValue); static sqInt NoDbgRegParms ldrrnplusimm(AbstractInstruction * self_in_ldrrnplusimm, sqInt destReg, sqInt baseReg, sqInt u, sqInt immediate12bitValue); static sqInt NoDbgRegParms ldrrnrm(AbstractInstruction * self_in_ldrrnrm, sqInt destReg, sqInt baseReg, sqInt offsetReg); -static sqInt NoDbgRegParms loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg); +static usqInt NoDbgRegParms loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg); static sqInt NoDbgRegParms loadPICLiteralByteSize(AbstractInstruction * self_in_loadPICLiteralByteSize); static sqInt NoDbgRegParms machineCodeBytes(AbstractInstruction * self_in_machineCodeBytes); static sqInt NoDbgRegParms machineCodeWords(AbstractInstruction * self_in_machineCodeWords); @@ -635,7 +638,6 @@ static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC); static usqInt cPICPrototypeCaseOffset(void); static sqInt NoDbgRegParms cPICHasTarget(CogMethod *cPIC, CogMethod *targetMethod); static AbstractInstruction * NoDbgRegParms gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder); -extern sqInt defaultCogCodeSize(void); static sqInt NoDbgRegParms deltaToSkipPrimAndErrorStoreInheader(sqInt aMethodObj, sqInt aMethodHeader); static sqInt NoDbgRegParms endPCOf(sqInt aMethod); extern void enterCogCodePopReceiver(void); @@ -646,7 +648,7 @@ static sqInt extBBytecode(void); static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static usqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -666,7 +668,7 @@ static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointe static void generateClosedPICPrototype(void); static CogMethod * generateCogFullBlock(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateOpenPICPrototype(void); static void generateRunTimeTrampolines(void); static void generateStackPointerCapture(void); @@ -795,7 +797,7 @@ static void zeroOpcodeIndexForNewOpcodes(void); extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void NoDbgRegParms clearSavedPICUsageCount(CogMethod *cogMethod); static void compactCompiledCode(void); @@ -804,7 +806,6 @@ static void followForwardedLiteralsInOpenPICList(void); extern void freeMethod(CogMethod *cogMethod); static void freeOlderMethodsForCompaction(void); static sqInt kosherYoungReferrers(void); -static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); extern CogMethod * methodFor(void *address); extern sqInt methodsCompiledToMachineCodeInto(sqInt arrayObj); extern sqInt numMethods(void); @@ -870,6 +871,7 @@ static sqInt genPrimitiveSubtract(void); static sqInt NoDbgRegParms genSmallIntegerComparison(sqInt jumpOpcode); static sqInt NoDbgRegParms genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction * NoDbgRegParms (*jumpFPOpcodeGenerator)(void *), sqInt invertComparison); static sqInt NoDbgRegParms isUnannotatableConstant(CogSimStackEntry *simStackEntry); +static sqInt NoDbgRegParms classForInlineCacheTag(sqInt inlineCacheTag); static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister); static sqInt NoDbgRegParms genClearAndSetSmallIntegerTagsIn(sqInt scratchReg); static void NoDbgRegParms genConvertCharacterToSmallIntegerInReg(sqInt reg); @@ -902,7 +904,7 @@ static sqInt NoDbgRegParms getLiteralCountOfplusOneinBytesintoscratch(sqInt meth static sqInt NoDbgRegParms inlineCacheTagForInstance(sqInt oop); static AbstractInstruction * NoDbgRegParms jumpNotSmallIntegerUnsignedValueInRegister(sqInt reg); static sqInt NoDbgRegParms markAndTraceCacheTagLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqInt address); -static sqInt NoDbgRegParms numCountersFor(usqInt theCounters); +static usqInt NoDbgRegParms numCountersFor(usqInt theCounters); static sqInt numSmallIntegerBits(void); static sqInt NoDbgRegParms validInlineCacheTag(usqInt classIndexOrTagPattern); static sqInt NoDbgRegParms branchIfinstanceOfBehaviorstarget(sqInt reg, sqInt arrayObj, AbstractInstruction *targetFixUp); @@ -910,7 +912,6 @@ static sqInt NoDbgRegParms branchIfnotInstanceOfBehaviorstarget(sqInt reg, sqInt static sqInt NoDbgRegParms cacheTagIsMarked(sqInt cacheTag); static sqInt NoDbgRegParms checkValidDerivedObjectReference(sqInt bodyAddress); static sqInt NoDbgRegParms checkValidOopReference(sqInt anOop); -static sqInt NoDbgRegParms classForInlineCacheTag(sqInt classIndex); static sqInt NoDbgRegParms couldBeDerivedObject(sqInt bodyAddress); static sqInt NoDbgRegParms couldBeObject(sqInt literal); static sqInt NoDbgRegParms genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, char *aString); @@ -1029,8 +1030,6 @@ static sqInt endSizeOffset(void); static sqInt NoDbgRegParms literalInstructionInRange(AbstractInstruction *litInst); static AbstractInstruction * NoDbgRegParms locateLiteral(sqInt aLiteral); static sqInt NoDbgRegParms mustDumpLiterals(sqInt currentOpcodeIndex); -static sqInt resetForBlockCompile(void); -static sqInt saveForBlockCompile(void); static sqInt compileBlockDispatch(void); static void compileGetErrorCode(void); static sqInt NoDbgRegParms compileInterpreterPrimitive(void (*primitiveRoutine)(void)); @@ -1131,6 +1130,7 @@ static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied); static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector); static void compileFrameBuild(void); static void NoDbgRegParms compileFullBlockMethodFrameBuild(sqInt numCopied); +extern sqInt defaultCogCodeSize(void); static void NoDbgRegParms fillInCountersatStartAddress(sqInt nCounters, sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms genBinaryConstOpVarInlinePrimitive(sqInt prim); @@ -1158,6 +1158,9 @@ static sqInt NoDbgRegParms picDataForSendTomethodClassIfSuperatbcpc(CogMethod *c static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); static void NoDbgRegParms populatewithPICInfoForfirstCacheTag(sqInt tuple, CogMethod *cPIC, sqInt firstCacheTag); +extern double getCogCodeZoneThreshold(void); +static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); +extern sqInt setCogCodeZoneThreshold(double ratio); static BlockStart * NoDbgRegParms addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span); static void NoDbgRegParms adjustArgumentsForPerform(sqInt numArgs); static sqInt NoDbgRegParms allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask); @@ -1241,7 +1244,7 @@ static sqInt NoDbgRegParms genStorePopRemoteInstVarofObjectAtneedsStoreCheckneed static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1270,7 +1273,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1293,6 +1295,7 @@ static void voidReceiverResultRegContainsSelf(void); /*** Variables ***/ static AbstractInstruction * abstractOpcodes; +static usqInt allocationThreshold; static AbstractInstruction aMethodLabel; static AbstractInstruction * const backEnd = &aMethodLabel; static usqInt baseAddress; @@ -1300,7 +1303,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt branchReachedOnlyForCounterTrip; static sqInt breakBlock; @@ -1339,6 +1341,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1386,6 +1389,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt counterIndex; static usqInt counters; @@ -1990,9 +1994,6 @@ void (*realCEEnterCogCodePopReceiverReg)(void); static sqInt receiverTags; static sqInt regArgsHaveBeenPushed; static sqInt runtimeObjectRefIndex; -static sqInt savedFirstOpcodeIndex; -static sqInt savedLastDumpedLiteralIndex; -static sqInt savedNextLiteralIndex; static AbstractInstruction * sendMiss; static sqInt simNativeSpillBase; static sqInt simNativeStack; @@ -2006,6 +2007,7 @@ static AbstractInstruction * stackCheckLabel; static AbstractInstruction * stackOverflowCall; static sqInt superSendTrampolines[NumSendTrampolines]; static sqInt tempOop; +static float thresholdRatio = 0.5f; int traceFlags = 8 /* prim trace log on by default */; sqInt traceStores; static char *trampolineAddresses[NumTrampolines*2]; @@ -2045,6 +2047,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -2879,8 +2882,8 @@ static usqInt NoDbgRegParms concretizeCMPSMULL(AbstractInstruction * self_in_concretizeCMPSMULL) { sqInt aWord; - usqIntptr_t hiReg; - usqIntptr_t loReg; + usqInt hiReg; + usqInt loReg; hiReg = ((self_in_concretizeCMPSMULL->operands))[0]; loReg = ((self_in_concretizeCMPSMULL->operands))[1]; @@ -2899,7 +2902,7 @@ concretizeConditionalInstruction(AbstractInstruction * self_in_concretizeConditi { sqInt aWord; sqInt i; - usqInt instr; + sqInt instr; unsigned char savedCond; assert(((self_in_concretizeConditionalInstruction->conditionOrNil)) != null); @@ -2946,7 +2949,7 @@ static usqInt NoDbgRegParms concretizeMSR(AbstractInstruction * self_in_concretizeMSR) { sqInt aWord; - usqIntptr_t flags; + usqInt flags; flags = ((self_in_concretizeMSR->operands))[0]; /* begin machineCodeAt:put: */ @@ -2976,8 +2979,8 @@ concretizeSMULL(AbstractInstruction * self_in_concretizeSMULL) sqInt aWord; sqInt hiResultReg; sqInt loResultReg; - usqIntptr_t srcA; - usqIntptr_t srcB; + usqInt srcA; + usqInt 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 */ @@ -3030,7 +3033,7 @@ dataOpTyperdrnrmlsr(AbstractInstruction * self_in_dataOpTyperdrnrmlsr, sqInt arm static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - usqIntptr_t addressOperand; + usqInt addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord10; @@ -3159,54 +3162,54 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt aWord7; sqInt aWord8; sqInt aWord9; - usqIntptr_t base; - usqIntptr_t base1; - usqIntptr_t base2; - usqIntptr_t base3; - usqIntptr_t baseReg; - usqIntptr_t baseReg1; - usqIntptr_t baseReg2; - usqIntptr_t constant; - usqIntptr_t constant1; - usqIntptr_t constant10; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; + usqInt baseReg; + usqInt baseReg1; + usqInt baseReg2; + usqInt constant; + usqInt constant1; + usqInt constant10; sqInt 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; + usqInt constant12; + usqInt constant13; + usqInt constant14; + usqInt constant2; + usqInt constant3; + usqInt constant4; + usqInt constant5; + usqInt constant6; + usqInt constant7; + usqInt constant8; + usqInt constant9; AbstractInstruction *dependentChain; - 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; + usqInt dest; + usqInt dest1; + usqInt destAddr; + usqInt destAddr1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg2; + usqInt destReg3; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; sqInt distance; sqInt distance1; sqInt distance2; - usqIntptr_t distReg; - usqIntptr_t distReg1; - usqIntptr_t distReg2; - usqIntptr_t dstReg; - usqIntptr_t dstReg1; + usqInt distReg; + usqInt distReg1; + usqInt distReg2; + usqInt dstReg; + usqInt dstReg1; sqInt flagsOrOpcode; sqInt flagsOrOpcode1; sqInt flagsOrOpcode11; @@ -3215,7 +3218,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt flagsOrOpcode3; sqInt flagsOrOpcode4; sqInt flagsOrOpcode5; - usqIntptr_t fpReg; + usqInt fpReg; sqInt hb; sqInt hb1; sqInt hb11; @@ -3261,10 +3264,10 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt immediate7; sqInt immediate8; sqInt immediate9; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; usqInt instrOffset; usqInt instrOffset1; usqInt instrOffset10; @@ -3282,7 +3285,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) usqInt instrOffset21; usqInt instrOffset22; sqInt instrOffset23; - sqInt instrOffset24; + usqInt instrOffset24; usqInt instrOffset25; usqInt instrOffset26; usqInt instrOffset27; @@ -3353,8 +3356,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget9; sqInt negate; sqInt negate1; - sqIntptr_t offset; - sqIntptr_t offset1; + sqInt offset; + sqInt offset1; sqInt offset10; sqInt offset11; sqInt offset12; @@ -3373,7 +3376,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset24; sqInt offset25; sqInt offset26; - usqIntptr_t offset27; + usqInt offset27; sqInt offset28; sqInt offset29; sqInt offset3; @@ -3388,77 +3391,77 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset8; sqInt offset9; sqInt p; - usqIntptr_t rd; - usqIntptr_t rd1; - usqIntptr_t rd10; - usqIntptr_t rd11; - usqIntptr_t rd110; - usqIntptr_t rd111; - 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 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 rn110; - usqIntptr_t rn111; - 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 rn3; - usqIntptr_t rn4; - usqIntptr_t rn5; - usqIntptr_t rn6; - usqIntptr_t rn7; - usqIntptr_t rn8; - usqIntptr_t rn9; + usqInt rd; + usqInt rd1; + usqInt rd10; + usqInt rd11; + usqInt rd110; + usqInt rd111; + usqInt rd12; + usqInt rd13; + usqInt rd14; + usqInt rd15; + usqInt rd16; + usqInt rd17; + usqInt rd18; + usqInt rd19; + usqInt rd2; + usqInt rd20; + usqInt rd21; + usqInt rd22; + usqInt rd3; + usqInt rd4; + usqInt rd5; + usqInt rd6; + usqInt rd7; + usqInt rd8; + usqInt rd9; + usqInt reg; + usqInt reg1; + usqInt reg2; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt regA; + usqInt regB; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS2; + usqInt regRHS3; + usqInt rn; + usqInt rn1; + usqInt rn10; + usqInt rn11; + usqInt rn110; + usqInt rn111; + usqInt rn12; + usqInt rn13; + usqInt rn14; + usqInt rn15; + usqInt rn16; + usqInt rn17; + usqInt rn18; + usqInt rn19; + usqInt rn2; + usqInt rn20; + usqInt rn21; + usqInt rn22; + usqInt rn23; + usqInt rn24; + usqInt rn3; + usqInt rn4; + usqInt rn5; + usqInt rn6; + usqInt rn7; + usqInt rn8; + usqInt rn9; sqInt rot; sqInt rot1; sqInt rot10; @@ -3473,30 +3476,30 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt rot7; sqInt rot8; sqInt rot9; - 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; + usqInt src; + usqInt src1; + usqInt srcAddr; + usqInt srcAddr1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg3; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; int u; int u1; sqInt u2; @@ -3505,14 +3508,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt u5; sqInt u6; sqInt u7; - sqIntptr_t val; - sqIntptr_t val1; - sqIntptr_t val11; - sqIntptr_t val12; - sqIntptr_t val2; - usqIntptr_t val3; - sqIntptr_t val4; - sqIntptr_t val5; + sqInt val; + sqInt val1; + sqInt val11; + sqInt val12; + sqInt val2; + usqInt val3; + sqInt val4; + sqInt val5; sqInt value; sqInt value1; unsigned int value2; @@ -3522,8 +3525,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) unsigned int value6; sqInt word; sqInt word1; - usqIntptr_t word2; - usqIntptr_t word3; + usqInt word2; + usqInt word3; if (!(((self_in_dispatchConcretize->conditionOrNil)) == null)) { concretizeConditionalInstruction(self_in_dispatchConcretize); @@ -4159,7 +4162,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord111 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(AddOpcode) << 21))) | (1U << 20)))) | ((rn1 << 16) | (rd1 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset2 / 4] = aWord111; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset2 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset2 + 4; goto l143; l136: /* end rotateable8bitSignedImmediate:ifTrue:ifFalse: */; @@ -4247,7 +4250,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i13 = 2; i13 <= 30; i13 += 2) { if ((val11 & (((0xFFU << i13) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i13)))) == val11) { rot11 = 32 - i13; - immediate14 = (((usqInt) val11) >> i13) | ((((sqIntptr_t)((usqInt)(val11) << (32 - i13)))) & 0xFFFFFFFFU); + immediate14 = (((usqInt) val11) >> i13) | ((((sqInt)((usqInt)(val11) << (32 - i13)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord410 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn21 << 16) | (rd18 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot11) >> 1)) << 8))) | immediate14) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord410; @@ -4290,7 +4293,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1110 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn19 << 16) | (rd19 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset26 / 4] = aWord1110; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset26 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset26 + 4; goto l331; l365: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -4373,7 +4376,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1111 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(AndOpcode) << 21))) | (1U << 20)))) | ((rn20 << 16) | (rd20 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset27 / 4] = aWord1111; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset27 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset27 + 4; goto l339; } @@ -4461,7 +4464,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord112 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(CmpOpcode) << 21))) | (1U << 20)))) | ((rn11 << 16) | (rd11 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset3 / 4] = aWord112; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset3 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset3 + 4; goto l151; l144: /* end rotateable8bitSignedImmediate:ifTrue:ifFalse: */; @@ -4490,7 +4493,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i10 = 2; i10 <= 30; i10 += 2) { if ((val4 & (((0xFFU << i10) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i10)))) == val4) { rot10 = 32 - i10; - immediate17 = (((usqInt) val4) >> i10) | ((((sqIntptr_t)((usqInt)(val4) << (32 - i10)))) & 0xFFFFFFFFU); + immediate17 = (((usqInt) val4) >> i10) | ((((sqInt)((usqInt)(val4) << (32 - i10)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord67 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn22 << 16) | (rd21 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot10) >> 1)) << 8))) | immediate17) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord67; @@ -4533,7 +4536,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1112 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(OrOpcode) << 21))) | (1U << 20)))) | ((rn110 << 16) | (rd110 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset28 / 4] = aWord1112; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset28 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset28 + 4; goto l349; l347: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -4612,7 +4615,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord113 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(SubOpcode) << 21))) | (1U << 20)))) | ((rn3 << 16) | (rd3 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset4 / 4] = aWord113; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset4 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset4 + 4; goto l159; l366: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -4664,7 +4667,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord15 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(TstOpcode) << 21))) | (1U << 20)))) | ((rn4 << 16) | (rd4 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset5 / 4] = aWord15; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset5 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset5 + 4; goto l165; l160: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -4752,7 +4755,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) for (i14 = 2; i14 <= 30; i14 += 2) { if ((val12 & (((0xFFU << i14) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i14)))) == val12) { rot13 = 32 - i14; - immediate18 = (((usqInt) val12) >> i14) | ((((sqIntptr_t)((usqInt)(val12) << (32 - i14)))) & 0xFFFFFFFFU); + immediate18 = (((usqInt) val12) >> i14) | ((((sqInt)((usqInt)(val12) << (32 - i14)))) & 0xFFFFFFFFU); /* begin machineCodeAt:put: */ aWord411 = (((((int)((usqInt)(AL) << 28))) | ((1U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn24 << 16) | (rd22 << 12))) | (((((sqInt)((usqInt)((((usqInt) rot13) >> 1)) << 8))) | immediate18) & 0xFFF); ((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord411; @@ -4795,7 +4798,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) /* begin machineCodeAt:put: */ aWord1113 = (((((int)((usqInt)(AL) << 28))) | ((0U << 25) | ((((int)((usqInt)(XorOpcode) << 21))) | (1U << 20)))) | ((rn111 << 16) | (rd111 << 12))) | (ConcreteIPReg & 0xFFF); ((self_in_dispatchConcretize->machineCode))[instrOffset29 / 4] = aWord1113; - ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = instrOffset29 + 4))); + (self_in_dispatchConcretize->machineCodeSize) = instrOffset29 + 4; goto l363; l367: /* end rotateable8bitImmediate:ifTrue:ifFalse: */; @@ -6654,16 +6657,16 @@ ldrrnrm(AbstractInstruction * self_in_ldrrnrm, sqInt destReg, sqInt baseReg, sqI the size of the instructions generated to do so. */ /* CogARMCompiler>>#loadCwInto: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) { sqInt aWord; sqInt aWord1; - usqIntptr_t distance; + sqInt distance; sqInt i; sqInt immediate; sqInt negate; - usqIntptr_t operand; + usqInt operand; sqInt rot; sqInt value; @@ -6720,7 +6723,7 @@ loadCwInto(AbstractInstruction * self_in_loadCwInto, sqInt destReg) ? 1 : 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))); + return ((self_in_loadCwInto->machineCodeSize) = 4); } @@ -7668,7 +7671,7 @@ bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -8861,7 +8864,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -8920,7 +8923,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -8988,7 +8991,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -9982,18 +9985,6 @@ gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder) } -/* Return the default number of bytes to allocate for native code at startup. - The actual value can be set via vmParameterAt: and/or a preference in the - ini file. */ - - /* Cogit>>#defaultCogCodeSize */ -sqInt -defaultCogCodeSize(void) -{ - return 1024 * 1280; -} - - /* Answer the number of bytecodes to skip to get to the first bytecode past the primitive call and any store of the error code. */ @@ -10015,7 +10006,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -10101,11 +10092,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { sqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -10251,8 +10242,8 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) } /* Cogit>>#findMapLocationForMcpc:inMethod: */ -static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +static usqInt NoDbgRegParms +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -10801,7 +10792,7 @@ generateClosedPICPrototype(void) assert(usesOutOfLineLiteral(anInstruction1)); (anInstruction1->dependent = allocateLiteral(wordConstant1)); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -10819,7 +10810,7 @@ generateClosedPICPrototype(void) operandOne = 3133021973U + h; checkLiteralforInstruction(operandOne, genoperandoperand(opcode, operandOne, TempReg)); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -10866,7 +10857,7 @@ generateCogFullBlock(void) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -10915,7 +10906,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -10961,17 +10952,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; - usqIntptr_t delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqIntptr_t location; - usqIntptr_t mapEntry; + usqInt location; + sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -12937,7 +12928,7 @@ mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *co sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -13905,7 +13896,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -14716,14 +14707,14 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; sqInt roundedBytes; roundedBytes = (numBytes + 7) & -8; - if ((mzFreeStart + roundedBytes) >= (limitAddress - (methodCount * BytesPerWord))) { + if ((mzFreeStart + roundedBytes) >= ((((limitAddress - (methodCount * BytesPerWord)) < allocationThreshold) ? (limitAddress - (methodCount * BytesPerWord)) : allocationThreshold))) { return 0; } allocation = mzFreeStart; @@ -14913,15 +14904,15 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; - zoneSize = limitAddress - baseAddress; - initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; + zoneSize = ((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - baseAddress; + initialFreeSpace = (((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - mzFreeStart) + methodBytesFreedSinceLastCompaction; freedSoFar = initialFreeSpace; /* 4 needs to be e.g. a start-up parameter */ @@ -14972,17 +14963,6 @@ kosherYoungReferrers(void) return 1; } - /* CogMethodZone>>#manageFrom:to: */ -static void NoDbgRegParms -manageFromto(sqInt theStartAddress, sqInt theLimitAddress) -{ - mzFreeStart = (baseAddress = theStartAddress); - youngReferrers = (limitAddress = theLimitAddress); - openPICList = null; - methodBytesFreedSinceLastCompaction = 0; - methodCount = 0; -} - /* CogMethodZone>>#methodFor: */ CogMethod * methodFor(void *address) @@ -16582,6 +16562,18 @@ isUnannotatableConstant(CogSimStackEntry *simStackEntry) || (!(shouldAnnotateObjectReference((simStackEntry->constant))))); } + +/* Character gets mapped to zero. See inlineCacheTagForInstance:. */ + + /* CogObjectRepresentationFor32BitSpur>>#classForInlineCacheTag: */ +static sqInt NoDbgRegParms +classForInlineCacheTag(sqInt inlineCacheTag) +{ + return classOrNilAtIndex((inlineCacheTag == 0 + ? characterTag() + : inlineCacheTag)); +} + /* CogObjectRepresentationFor32BitSpur>>#genAddSmallIntegerTagsTo: */ static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister) @@ -17601,6 +17593,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *jumpImm; AbstractInstruction *jumpNotSet; @@ -17629,7 +17622,17 @@ genPrimitiveIdentityHash(void) /* begin Jump: */ genoperand(Jump, ((sqInt)ret)); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } @@ -18881,10 +18884,10 @@ markAndTraceCacheTagLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqI } /* CogObjectRepresentationFor32BitSpur>>#numCountersFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms numCountersFor(usqInt theCounters) { - usqInt objOop; + sqInt objOop; if (theCounters == 0) { return 0; @@ -19029,13 +19032,6 @@ checkValidOopReference(sqInt anOop) || ((heapMapAtWord(pointerForOop(anOop))) != 0); } - /* CogObjectRepresentationForSpur>>#classForInlineCacheTag: */ -static sqInt NoDbgRegParms -classForInlineCacheTag(sqInt classIndex) -{ - return classOrNilAtIndex(classIndex); -} - /* CogObjectRepresentationForSpur>>#couldBeDerivedObject: */ static sqInt NoDbgRegParms couldBeDerivedObject(sqInt bodyAddress) @@ -19591,7 +19587,9 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ - ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(1, "newHashTrampoline", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 1); + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); + ceInlineNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceInlineNewHash", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { @@ -20358,7 +20356,7 @@ genGetIdentityHashresultReg(sqInt rcvrReg, sqInt resultReg) /* begin MoveR:R: */ genoperandoperand(MoveRR, rcvrReg, resultReg); /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceNewHashTrampoline); + abstractInstruction = genoperand(Call, ceInlineNewHashTrampoline); (abstractInstruction->annotation = IsRelativeCall); /* begin annotateBytecode: */ abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -20375,7 +20373,7 @@ genGetIdentityHashresultReg(sqInt rcvrReg, sqInt resultReg) /* begin JumpNonZero: */ jumpSet = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CallRT: */ - abstractInstruction2 = genoperand(Call, ceNewHashTrampoline); + abstractInstruction2 = genoperand(Call, ceInlineNewHashTrampoline); (abstractInstruction2->annotation = IsRelativeCall); /* begin annotateBytecode: */ abstractInstruction3 = genoperandoperand(MoveRR, ReceiverResultReg, resultReg); @@ -22046,7 +22044,7 @@ cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize) static AbstractInstruction * NoDbgRegParms concretizeLiteral(AbstractInstruction * self_in_concretizeLiteral) { - usqIntptr_t literal; + usqInt literal; AbstractInstruction * literalAsInstruction; literalAsInstruction = ((AbstractInstruction *) (((self_in_concretizeLiteral->operands))[0])); @@ -22293,7 +22291,7 @@ rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, s static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - usqIntptr_t alignment; + usqInt alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -23022,26 +23020,6 @@ mustDumpLiterals(sqInt currentOpcodeIndex) && ((currentOpcodeIndex - firstOpcodeIndex) >= (outOfLineLiteralOpcodeLimit(backEnd()))); } - /* OutOfLineLiteralsManager>>#resetForBlockCompile */ -static sqInt -resetForBlockCompile(void) -{ - firstOpcodeIndex = savedFirstOpcodeIndex; - nextLiteralIndex = savedNextLiteralIndex; - lastDumpedLiteralIndex = savedLastDumpedLiteralIndex; - return 0; -} - - /* OutOfLineLiteralsManager>>#saveForBlockCompile */ -static sqInt -saveForBlockCompile(void) -{ - savedFirstOpcodeIndex = firstOpcodeIndex; - savedNextLiteralIndex = nextLiteralIndex; - savedLastDumpedLiteralIndex = lastDumpedLiteralIndex; - return 0; -} - /* Compile the jump instruction(s) at the end of the method that dispatch to each block body. @@ -24894,7 +24872,7 @@ mapPCDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -25165,7 +25143,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -25194,7 +25172,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1)); introspectionDataIndex += 2; } return 0; @@ -25452,7 +25430,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -25785,7 +25763,11 @@ compileCogFullBlockMethod(sqInt numCopied) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -25861,7 +25843,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -26127,6 +26113,18 @@ compileFullBlockMethodFrameBuild(sqInt numCopied) } } + +/* Return the default number of bytes to allocate for native code at startup. + The actual value can be set via vmParameterAt: and/or a preference in the + ini file. */ + + /* SistaCogit>>#defaultCogCodeSize */ +sqInt +defaultCogCodeSize(void) +{ + return 2 * (1024 * 1280); +} + /* SistaCogit>>#fillInCounters:atStartAddress: */ static void NoDbgRegParms fillInCountersatStartAddress(sqInt nCounters, sqInt startAddress) @@ -26953,7 +26951,8 @@ genCounterTripOnlyJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; extA = 0; - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); popToReg(ssTop(), TempReg); ssPop(1); @@ -27046,7 +27045,8 @@ genExtJumpIfNotInstanceOfBehaviorsBytecode(void) reg = allocateRegForStackEntryAtnotConflictingWith(0, 0); popToReg(ssTop(), reg); ssPop(1); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); literal = getLiteral((extA * 256) + byte1); if ((inverse = extB < 0)) { extB += 128; @@ -27391,7 +27391,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor1->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg1, !unforwardRcvr1, argReg1, rcvrReg1, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -27578,7 +27579,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); if (unforwardArg) { genEnsureOopInRegNotForwardedscratchReg(argReg, TempReg); } @@ -27825,7 +27827,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) /* In optimized code we don't generate counters to improve performance */ if (isOptimizedMethod(methodObj)) { eventualTarget1 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc1 = ssTop(); ssPop(1); if ((((desc1->type)) == SSConstant) @@ -27904,7 +27907,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) nextDescriptor = generatorAt((fetchByteofObject(nextPC, methodObj)) + bytecodeSetOffset); if (((nextDescriptor->generator)) == genPushConstantTrueBytecode) { eventualTarget2 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc2 = ssTop(); ssPop(1); if ((((desc2->type)) == SSConstant) @@ -27977,7 +27981,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) nextDescriptor = generatorAt((fetchByteofObject(targetBytecodePC, methodObj)) + bytecodeSetOffset); if (((nextDescriptor->generator)) == genPushConstantFalseBytecode) { eventualTarget3 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc3 = ssTop(); ssPop(1); if ((((desc3->type)) == SSConstant) @@ -28057,7 +28062,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) && ((((desc->constant)) == (trueObject())) || (((desc->constant)) == (falseObject())))) { eventualTarget4 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc4 = ssTop(); ssPop(1); if ((((desc4->type)) == SSConstant) @@ -28128,7 +28134,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) return 0; } eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); popToReg(desc, TempReg); ssPop(1); ssAllocateRequiredReg(SendNumArgsReg); @@ -28308,7 +28315,8 @@ genSpecialSelectorComparison(void) if (isOptimizedMethod(methodObj)) { return genSpecialSelectorComparisonWithoutCounters(); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -28497,7 +28505,8 @@ genSpecialSelectorComparisonWithoutCounters(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -28828,7 +28837,8 @@ genUnconditionalTrapBytecode(void) AbstractInstruction *abstractInstruction; AbstractInstruction *abstractInstruction1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin CallRT: */ abstractInstruction = genoperand(Call, ceTrapTrampoline); (abstractInstruction->annotation = IsRelativeCall); @@ -28942,7 +28952,7 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) CogBlockMethod *cogBlockMethod; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; CogMethod *homeMethod; sqInt isBackwardBranch; sqInt isInBlock; @@ -29113,9 +29123,9 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) static sqInt NoDbgRegParms picDataForCounterat(unsigned int counter, sqInt bcpc) { - unsigned int executedCount; + int executedCount; sqInt tuple; - unsigned int untakenCount; + int untakenCount; tuple = eeInstantiateClassIndexformatnumSlots(ClassArrayCompactIndex, arrayFormat(), 3); if (tuple == 0) { @@ -29125,8 +29135,8 @@ picDataForCounterat(unsigned int counter, sqInt bcpc) executedCount = initialCounterValue - (((usqInt) counter) >> 16); untakenCount = initialCounterValue - (counter & 0xFFFF); storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)bcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(1, tuple, ((executedCount << 1) | 1)); - storePointerUncheckedofObjectwithValue(2, tuple, ((untakenCount << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, tuple, (((usqInt)executedCount << 1) | 1)); + storePointerUncheckedofObjectwithValue(2, tuple, (((usqInt)untakenCount << 1) | 1)); return tuple; } @@ -29277,7 +29287,7 @@ picDataForinto(CogMethod *cogMethod, sqInt arrayObj) CogBlockMethod *cogMethod1; BytecodeDescriptor *descriptor; sqInt distance; - usqInt endbcpc; + sqInt endbcpc; sqInt errCode; CogMethod *homeMethod; sqInt isBackwardBranch; @@ -29505,6 +29515,41 @@ populatewithPICInfoForfirstCacheTag(sqInt tuple, CogMethod *cPIC, sqInt firstCac } } + /* SistaMethodZone>>#getCogCodeZoneThreshold */ +double +getCogCodeZoneThreshold(void) +{ + return thresholdRatio; +} + + /* SistaMethodZone>>#manageFrom:to: */ +static void NoDbgRegParms +manageFromto(sqInt theStartAddress, sqInt theLimitAddress) +{ + mzFreeStart = (baseAddress = theStartAddress); + youngReferrers = (limitAddress = theLimitAddress); + openPICList = null; + methodBytesFreedSinceLastCompaction = 0; + methodCount = 0; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; +} + + /* SistaMethodZone>>#setCogCodeZoneThreshold: */ +sqInt +setCogCodeZoneThreshold(double ratio) +{ + /* send of break elided */; + if (!((ratio >= 0.1) + && (ratio <= 1.0))) { + return PrimErrBadArgument; + } + thresholdRatio = ratio; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; + return 0; +} + /* Add a blockStart for an embedded block. For a binary tree walk block dispatch blocks must be compiled in pc/depth-first order but are scanned @@ -29797,7 +29842,10 @@ compileBlockBodies(void) sqInt initialOpcodeIndex; sqInt initialStackPtr; sqInt result; + sqInt savedFirstOpcodeIndex; + sqInt savedLastDumpedLiteralIndex; sqInt savedNeedsFrame; + sqInt savedNextLiteralIndex; sqInt savedNumArgs; sqInt savedNumTemps; @@ -29808,7 +29856,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -29816,7 +29864,10 @@ compileBlockBodies(void) initialOpcodeIndex = opcodeIndex; /* begin maybeCounterIndex */ initialCounterIndex = counterIndex; - saveForBlockCompile(); + /* begin saveForRecompile */ + savedFirstOpcodeIndex = firstOpcodeIndex; + savedNextLiteralIndex = nextLiteralIndex; + savedLastDumpedLiteralIndex = lastDumpedLiteralIndex; while (1) { compileBlockEntry(blockStart); initialStackPtr = simStackPtr; @@ -29827,8 +29878,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -29837,7 +29888,10 @@ compileBlockBodies(void) opcodeIndex = initialOpcodeIndex; /* begin maybeSetCounterIndex: */ counterIndex = initialCounterIndex; - resetForBlockCompile(); + /* begin resetForRecompile */ + firstOpcodeIndex = savedFirstOpcodeIndex; + nextLiteralIndex = savedNextLiteralIndex; + lastDumpedLiteralIndex = savedLastDumpedLiteralIndex; } compiledBlocksCount += 1; } @@ -31209,7 +31263,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -31240,7 +31295,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -31861,7 +31917,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -32146,7 +32203,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -32406,7 +32464,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -32480,7 +32539,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); if (usesOutOfLineLiteral(anInstruction1)) { @@ -32559,7 +32619,8 @@ genStorePopMaybeContextRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCh ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); if (usesOutOfLineLiteral(anInstruction1)) { @@ -32599,7 +32660,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -32624,7 +32686,8 @@ genStorePopRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCheck(sqInt po if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -32772,19 +32835,18 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; - return fixup; -} + } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ static void NoDbgRegParms @@ -32958,7 +33020,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -32968,7 +33031,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -32976,7 +33040,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -33015,7 +33080,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -33080,7 +33145,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -33213,8 +33279,7 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); if ((isBranch(descriptor)) @@ -33566,13 +33631,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1U << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -33614,7 +33672,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -33638,7 +33697,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -33933,6 +33993,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/spursistasrc/vm/cogitIA32.c b/spursistasrc/vm/cogitIA32.c index 2fc0e7fd6..ae8ea5a84 100644 --- a/spursistasrc/vm/cogitIA32.c +++ b/spursistasrc/vm/cogitIA32.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - SistaCogit VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + SistaCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -270,7 +270,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 70 : 65) +#define NumTrampolines (IMMUTABILITY ? 71 : 66) #define OrCqR 108 #define OrCwR 116 #define OrRR 102 @@ -282,6 +282,7 @@ char *__cogitBuildInfo = __buildInfo; #define PrimCallMayCallBack 4 #define PrimCallNeedsNewMethod 1 #define PrimCallNeedsPrimitiveFunction 2 +#define PrimErrBadArgument 3 #define PrimErrNoMemory 9 #define PrimErrWritePastObject 17 #define PushCq 83 @@ -345,8 +346,8 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; unsigned char machineCode [10]; } AbstractInstruction; @@ -415,10 +416,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -535,7 +538,7 @@ static AbstractInstruction * NoDbgRegParms padIfPossibleWithStopsFromto(Abstract static AbstractInstruction * NoDbgRegParms relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeReturnPCby, sqInt retpc, sqInt delta); static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta); static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); -static sqInt NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress); +static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr); static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress); static sqInt NoDbgRegParms rewriteJumpLongAttarget(AbstractInstruction * self_in_rewriteJumpLongAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress); @@ -623,7 +626,6 @@ static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC); static usqInt cPICPrototypeCaseOffset(void); static sqInt NoDbgRegParms cPICHasTarget(CogMethod *cPIC, CogMethod *targetMethod); static AbstractInstruction * NoDbgRegParms gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder); -extern sqInt defaultCogCodeSize(void); static sqInt NoDbgRegParms deltaToSkipPrimAndErrorStoreInheader(sqInt aMethodObj, sqInt aMethodHeader); static sqInt NoDbgRegParms endPCOf(sqInt aMethod); extern void enterCogCodePopReceiver(void); @@ -634,7 +636,7 @@ static sqInt extBBytecode(void); static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -654,7 +656,7 @@ static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointe static void generateClosedPICPrototype(void); static CogMethod * generateCogFullBlock(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateOpenPICPrototype(void); static void generateRunTimeTrampolines(void); static void generateStackPointerCapture(void); @@ -702,7 +704,7 @@ static BytecodeDescriptor * loadBytesAndGetDescriptor(void); static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc); static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); -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); @@ -782,7 +784,7 @@ static void zeroOpcodeIndexForNewOpcodes(void); extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void NoDbgRegParms clearSavedPICUsageCount(CogMethod *cogMethod); static void compactCompiledCode(void); @@ -791,7 +793,6 @@ static void followForwardedLiteralsInOpenPICList(void); extern void freeMethod(CogMethod *cogMethod); static void freeOlderMethodsForCompaction(void); static sqInt kosherYoungReferrers(void); -static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); extern CogMethod * methodFor(void *address); extern sqInt methodsCompiledToMachineCodeInto(sqInt arrayObj); extern sqInt numMethods(void); @@ -857,6 +858,7 @@ static sqInt genPrimitiveSubtract(void); static sqInt NoDbgRegParms genSmallIntegerComparison(sqInt jumpOpcode); static sqInt NoDbgRegParms genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction * NoDbgRegParms (*jumpFPOpcodeGenerator)(void *), sqInt invertComparison); static sqInt NoDbgRegParms isUnannotatableConstant(CogSimStackEntry *simStackEntry); +static sqInt NoDbgRegParms classForInlineCacheTag(sqInt inlineCacheTag); static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister); static sqInt NoDbgRegParms genClearAndSetSmallIntegerTagsIn(sqInt scratchReg); static void NoDbgRegParms genConvertCharacterToSmallIntegerInReg(sqInt reg); @@ -889,7 +891,7 @@ static sqInt NoDbgRegParms getLiteralCountOfplusOneinBytesintoscratch(sqInt meth static sqInt NoDbgRegParms inlineCacheTagForInstance(sqInt oop); static AbstractInstruction * NoDbgRegParms jumpNotSmallIntegerUnsignedValueInRegister(sqInt reg); static sqInt NoDbgRegParms markAndTraceCacheTagLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqInt address); -static sqInt NoDbgRegParms numCountersFor(usqInt theCounters); +static usqInt NoDbgRegParms numCountersFor(usqInt theCounters); static sqInt numSmallIntegerBits(void); static sqInt NoDbgRegParms validInlineCacheTag(usqInt classIndexOrTagPattern); static sqInt NoDbgRegParms branchIfinstanceOfBehaviorstarget(sqInt reg, sqInt arrayObj, AbstractInstruction *targetFixUp); @@ -897,7 +899,6 @@ static sqInt NoDbgRegParms branchIfnotInstanceOfBehaviorstarget(sqInt reg, sqInt static sqInt NoDbgRegParms cacheTagIsMarked(sqInt cacheTag); static sqInt NoDbgRegParms checkValidDerivedObjectReference(sqInt bodyAddress); static sqInt NoDbgRegParms checkValidOopReference(sqInt anOop); -static sqInt NoDbgRegParms classForInlineCacheTag(sqInt classIndex); static sqInt NoDbgRegParms couldBeDerivedObject(sqInt bodyAddress); static sqInt NoDbgRegParms couldBeObject(sqInt literal); static sqInt NoDbgRegParms genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, char *aString); @@ -1092,6 +1093,7 @@ static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied); static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector); static void compileFrameBuild(void); static void NoDbgRegParms compileFullBlockMethodFrameBuild(sqInt numCopied); +extern sqInt defaultCogCodeSize(void); static void NoDbgRegParms fillInCountersatStartAddress(sqInt nCounters, sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms genBinaryConstOpVarInlinePrimitive(sqInt prim); @@ -1119,6 +1121,9 @@ static sqInt NoDbgRegParms picDataForSendTomethodClassIfSuperatbcpc(CogMethod *c static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); static void NoDbgRegParms populatewithPICInfoForfirstCacheTag(sqInt tuple, CogMethod *cPIC, sqInt firstCacheTag); +extern double getCogCodeZoneThreshold(void); +static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); +extern sqInt setCogCodeZoneThreshold(double ratio); static BlockStart * NoDbgRegParms addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span); static void NoDbgRegParms adjustArgumentsForPerform(sqInt numArgs); static sqInt NoDbgRegParms allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask); @@ -1202,7 +1207,7 @@ static sqInt NoDbgRegParms genStorePopRemoteInstVarofObjectAtneedsStoreCheckneed static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1231,7 +1236,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1254,6 +1258,7 @@ static void voidReceiverResultRegContainsSelf(void); /*** Variables ***/ static AbstractInstruction * abstractOpcodes; +static usqInt allocationThreshold; static AbstractInstruction aMethodLabel; static AbstractInstruction * const backEnd = &aMethodLabel; static usqInt baseAddress; @@ -1261,7 +1266,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt branchReachedOnlyForCounterTrip; static sqInt breakBlock; @@ -1300,6 +1304,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1347,6 +1352,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt counterIndex; static usqInt counters; @@ -1959,6 +1965,7 @@ static AbstractInstruction * stackCheckLabel; static AbstractInstruction * stackOverflowCall; static sqInt superSendTrampolines[NumSendTrampolines]; static sqInt tempOop; +static float thresholdRatio = 0.5f; int traceFlags = 8 /* prim trace log on by default */; sqInt traceStores; static char *trampolineAddresses[NumTrampolines*2]; @@ -2000,6 +2007,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -2745,7 +2753,7 @@ computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) { - usqIntptr_t shiftCountReg; + usqInt shiftCountReg; shiftCountReg = ((self_in_computeShiftRRSize->operands))[0]; return (shiftCountReg == ECX @@ -2773,8 +2781,8 @@ concretizeFill32(AbstractInstruction * self_in_concretizeFill32) static usqInt NoDbgRegParms concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regLHS = ((self_in_concretizeOpRR->operands))[0]; regRHS = ((self_in_concretizeOpRR->operands))[1]; @@ -2787,8 +2795,8 @@ concretizeOpRR(AbstractInstruction * self_in_concretizeOpRR, sqInt x86opcode) static usqInt NoDbgRegParms concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt x86opcode) { - usqIntptr_t regLHS; - usqIntptr_t regRHS; + usqInt regLHS; + usqInt regRHS; regRHS = ((self_in_concretizeReverseOpRR->operands))[0]; regLHS = ((self_in_concretizeReverseOpRR->operands))[1]; @@ -2805,8 +2813,8 @@ concretizeReverseOpRR(AbstractInstruction * self_in_concretizeReverseOpRR, sqInt static usqInt NoDbgRegParms concretizeZeroExtend16RR(AbstractInstruction * self_in_concretizeZeroExtend16RR) { - usqIntptr_t destReg; - usqIntptr_t srcReg; + usqInt destReg; + usqInt srcReg; srcReg = ((self_in_concretizeZeroExtend16RR->operands))[0]; destReg = ((self_in_concretizeZeroExtend16RR->operands))[1]; @@ -2850,50 +2858,50 @@ cResultRegisterLow(AbstractInstruction * self_in_cResultRegisterLow) static void NoDbgRegParms dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt addressOperand2; + usqInt addressOperand3; + usqInt addressOperand4; + usqInt base; + usqInt base1; + usqInt base2; + usqInt base3; AbstractInstruction *dependentChain; - 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 destReg16; - usqIntptr_t destReg17; - usqIntptr_t destReg18; - usqIntptr_t destReg19; - usqIntptr_t destReg2; - usqIntptr_t destReg20; - usqIntptr_t destReg21; - usqIntptr_t destReg22; - usqIntptr_t destReg23; - usqIntptr_t destReg24; - usqIntptr_t destReg3; - usqIntptr_t destReg4; - usqIntptr_t destReg5; - usqIntptr_t destReg6; - usqIntptr_t destReg7; - usqIntptr_t destReg8; - usqIntptr_t destReg9; + usqInt dest; + usqInt dest1; + usqInt destReg; + usqInt destReg1; + usqInt destReg10; + usqInt destReg11; + usqInt destReg12; + usqInt destReg13; + usqInt destReg14; + usqInt destReg15; + usqInt destReg16; + usqInt destReg17; + usqInt destReg18; + usqInt destReg19; + usqInt destReg2; + usqInt destReg20; + usqInt destReg21; + usqInt destReg22; + usqInt destReg23; + usqInt destReg24; + usqInt destReg3; + usqInt destReg4; + usqInt destReg5; + usqInt destReg6; + usqInt destReg7; + usqInt destReg8; + usqInt destReg9; sqInt distance; sqInt distance1; sqInt i; - usqIntptr_t index; - usqIntptr_t index1; - usqIntptr_t index2; - usqIntptr_t index3; + usqInt index; + usqInt index1; + usqInt index2; + usqInt index3; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; AbstractInstruction *jumpTarget10; @@ -2960,14 +2968,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) AbstractInstruction *jumpTarget7; AbstractInstruction *jumpTarget8; AbstractInstruction *jumpTarget9; - usqIntptr_t mask; - usqIntptr_t mask1; - usqIntptr_t mask2; + usqInt mask; + usqInt mask1; + usqInt mask2; sqInt mcIdx; sqInt offset; sqInt offset1; - usqIntptr_t offset10; - usqIntptr_t offset11; + usqInt offset10; + usqInt offset11; sqInt offset110; sqInt offset111; sqInt offset112; @@ -2978,14 +2986,14 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset117; sqInt offset118; sqInt offset119; - usqIntptr_t offset12; + usqInt offset12; sqInt offset120; sqInt offset121; sqInt offset122; sqInt offset123; - usqIntptr_t offset13; - usqIntptr_t offset14; - usqIntptr_t offset15; + usqInt offset13; + usqInt offset14; + usqInt offset15; sqInt offset16; sqInt offset17; sqInt offset18; @@ -3001,117 +3009,117 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) sqInt offset27; sqInt offset28; sqInt offset29; - usqIntptr_t offset3; + usqInt offset3; sqInt offset30; sqInt offset31; sqInt offset32; sqInt offset33; - 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; + usqInt offset4; + usqInt offset5; + usqInt offset6; + usqInt offset7; + usqInt offset8; + usqInt offset9; + usqInt reg; + usqInt reg1; + usqInt reg10; + usqInt reg11; + usqInt reg12; + usqInt reg13; + usqInt reg14; + usqInt reg15; + usqInt reg16; + usqInt reg17; + usqInt reg18; + usqInt reg19; + usqInt reg2; + usqInt reg20; + usqInt reg21; + usqInt reg22; + usqInt reg23; + usqInt reg24; + usqInt reg25; + usqInt reg26; + usqInt reg3; + usqInt reg4; + usqInt reg5; + usqInt reg6; + usqInt reg7; + usqInt reg8; + usqInt reg9; + usqInt regLHS; + usqInt regLHS1; + usqInt regLHS10; + usqInt regLHS11; + usqInt regLHS12; + usqInt regLHS13; + usqInt regLHS2; + usqInt regLHS3; + usqInt regLHS4; + usqInt regLHS5; + usqInt regLHS6; + usqInt regLHS7; + usqInt regLHS8; + usqInt regLHS9; + usqInt regRHS; + usqInt regRHS1; + usqInt regRHS10; + usqInt regRHS11; + usqInt regRHS12; + usqInt regRHS13; + usqInt regRHS2; + usqInt regRHS3; + usqInt regRHS4; + usqInt regRHS5; + usqInt regRHS6; + usqInt regRHS7; + usqInt regRHS8; + usqInt regRHS9; + usqInt regToShift; + usqInt regToShift1; sqInt shiftCount; - 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 srcReg14; - usqIntptr_t srcReg15; - usqIntptr_t srcReg16; - usqIntptr_t srcReg17; - usqIntptr_t srcReg18; - usqIntptr_t srcReg19; - usqIntptr_t srcReg2; - usqIntptr_t srcReg20; - usqIntptr_t srcReg21; - usqIntptr_t srcReg22; - usqIntptr_t srcReg3; - usqIntptr_t srcReg4; - usqIntptr_t srcReg5; - usqIntptr_t srcReg6; - usqIntptr_t srcReg7; - usqIntptr_t srcReg8; - usqIntptr_t srcReg9; + usqInt shiftCountReg; + usqInt shiftCountReg1; + usqInt src; + usqInt src1; + usqInt srcReg; + usqInt srcReg1; + usqInt srcReg10; + usqInt srcReg11; + usqInt srcReg12; + usqInt srcReg13; + usqInt srcReg14; + usqInt srcReg15; + usqInt srcReg16; + usqInt srcReg17; + usqInt srcReg18; + usqInt srcReg19; + usqInt srcReg2; + usqInt srcReg20; + usqInt srcReg21; + usqInt srcReg22; + usqInt srcReg3; + usqInt srcReg4; + usqInt srcReg5; + usqInt srcReg6; + usqInt srcReg7; + usqInt srcReg8; + usqInt srcReg9; sqInt swapreg; - 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; + usqInt value; + usqInt value1; + usqInt value10; + usqInt value11; + usqInt value12; + usqInt value13; + usqInt value2; + usqInt value3; + usqInt value4; + usqInt value5; + usqInt value6; + usqInt value7; + usqInt value8; + usqInt value9; usqIntptr_t word; if (((self_in_dispatchConcretize->opcode)) >= CDQ) { @@ -5552,25 +5560,25 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) static void NoDbgRegParms dispatchConcretizeProcessorSpecific(AbstractInstruction * self_in_dispatchConcretizeProcessorSpecific) { - 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; + usqInt addressOperand; + usqInt addressOperand1; + usqInt destReg; + usqInt destReg1; + usqInt destReg2; + usqInt destReg3; + usqInt offset; + usqInt offset1; + usqInt offset2; + usqInt offset3; + usqInt reg; + usqInt reg1; + usqInt reg11; + usqInt reg2; + usqInt reg21; + usqInt reg3; + usqInt regDivisor; + usqInt srcReg; + usqInt srcReg1; sqInt srcReg2; sqInt srcReg3; @@ -6990,15 +6998,15 @@ rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt ca /* prevent type inference for avoiding warning on abs */ /* CogIA32Compiler>>#rewriteCPICJumpAt:target: */ -static sqInt NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +static AbstractInstruction * NoDbgRegParms +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { sqInt callDistance; - callDistance = jumpTargetAddress - addressFollowingJump; + callDistance = jumpTargetAddr - addressFollowingJump; assert((SQABS(callDistance)) < 128); byteAtput(addressFollowingJump - 1, callDistance & 0xFF); - return 2; + return self_in_rewriteCPICJumpAttarget; } @@ -7177,9 +7185,9 @@ static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { AbstractInstruction *abstractInstruction; - usqIntptr_t alignment; - usqIntptr_t maximumSpan; - usqIntptr_t target; + usqInt alignment; + sqInt maximumSpan; + usqInt target; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -7568,7 +7576,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; @@ -8782,7 +8790,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -8841,7 +8849,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -8909,7 +8917,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -9846,19 +9854,6 @@ gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder) } -/* Return the default number of bytes to allocate for native code at startup. - The actual value can be set via vmParameterAt: and/or a preference in the - ini file. */ - - /* Cogit>>#defaultCogCodeSize */ -sqInt -defaultCogCodeSize(void) -{ - /* begin getDefaultCogCodeSize */ - return 1024 * 1024; -} - - /* Answer the number of bytecodes to skip to get to the first bytecode past the primitive call and any store of the error code. */ @@ -9880,7 +9875,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -9966,11 +9961,11 @@ static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { sqInt classTag; - usqInt classTagPC; + sqInt classTagPC; sqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; + sqInt methodObjPC; sqInt object; usqInt pc; @@ -10117,7 +10112,7 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) /* Cogit>>#findMapLocationForMcpc:inMethod: */ static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -10635,7 +10630,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -10652,7 +10647,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, operandOne, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -10698,7 +10693,7 @@ generateCogFullBlock(void) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -10747,7 +10742,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -10793,17 +10788,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - sqInt location; + usqInt location; sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -11783,7 +11778,7 @@ gMoveCwR(sqInt wordConstant, sqInt reg) /* 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; @@ -13707,7 +13702,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -14504,14 +14499,14 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; sqInt roundedBytes; roundedBytes = (numBytes + 7) & -8; - if ((mzFreeStart + roundedBytes) >= (limitAddress - (methodCount * BytesPerWord))) { + if ((mzFreeStart + roundedBytes) >= ((((limitAddress - (methodCount * BytesPerWord)) < allocationThreshold) ? (limitAddress - (methodCount * BytesPerWord)) : allocationThreshold))) { return 0; } allocation = mzFreeStart; @@ -14701,15 +14696,15 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; - zoneSize = limitAddress - baseAddress; - initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; + zoneSize = ((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - baseAddress; + initialFreeSpace = (((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - mzFreeStart) + methodBytesFreedSinceLastCompaction; freedSoFar = initialFreeSpace; /* 4 needs to be e.g. a start-up parameter */ @@ -14760,17 +14755,6 @@ kosherYoungReferrers(void) return 1; } - /* CogMethodZone>>#manageFrom:to: */ -static void NoDbgRegParms -manageFromto(sqInt theStartAddress, sqInt theLimitAddress) -{ - mzFreeStart = (baseAddress = theStartAddress); - youngReferrers = (limitAddress = theLimitAddress); - openPICList = null; - methodBytesFreedSinceLastCompaction = 0; - methodCount = 0; -} - /* CogMethodZone>>#methodFor: */ CogMethod * methodFor(void *address) @@ -16307,6 +16291,18 @@ isUnannotatableConstant(CogSimStackEntry *simStackEntry) || (!(shouldAnnotateObjectReference((simStackEntry->constant))))); } + +/* Character gets mapped to zero. See inlineCacheTagForInstance:. */ + + /* CogObjectRepresentationFor32BitSpur>>#classForInlineCacheTag: */ +static sqInt NoDbgRegParms +classForInlineCacheTag(sqInt inlineCacheTag) +{ + return classOrNilAtIndex((inlineCacheTag == 0 + ? characterTag() + : inlineCacheTag)); +} + /* CogObjectRepresentationFor32BitSpur>>#genAddSmallIntegerTagsTo: */ static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister) @@ -17172,6 +17168,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *jumpImm; AbstractInstruction *jumpNotSet; @@ -17197,7 +17194,17 @@ genPrimitiveIdentityHash(void) /* begin Jump: */ genoperand(Jump, ((sqInt)ret)); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } @@ -18242,10 +18249,10 @@ markAndTraceCacheTagLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqI } /* CogObjectRepresentationFor32BitSpur>>#numCountersFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms numCountersFor(usqInt theCounters) { - usqInt objOop; + sqInt objOop; if (theCounters == 0) { return 0; @@ -18390,13 +18397,6 @@ checkValidOopReference(sqInt anOop) || ((heapMapAtWord(pointerForOop(anOop))) != 0); } - /* CogObjectRepresentationForSpur>>#classForInlineCacheTag: */ -static sqInt NoDbgRegParms -classForInlineCacheTag(sqInt classIndex) -{ - return classOrNilAtIndex(classIndex); -} - /* CogObjectRepresentationForSpur>>#couldBeDerivedObject: */ static sqInt NoDbgRegParms couldBeDerivedObject(sqInt bodyAddress) @@ -18880,7 +18880,9 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ - ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(1, "newHashTrampoline", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 1); + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); + ceInlineNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceInlineNewHash", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { @@ -19507,7 +19509,7 @@ genGetIdentityHashresultReg(sqInt rcvrReg, sqInt resultReg) /* begin MoveR:R: */ genoperandoperand(MoveRR, rcvrReg, resultReg); /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceNewHashTrampoline); + abstractInstruction = genoperand(Call, ceInlineNewHashTrampoline); (abstractInstruction->annotation = IsRelativeCall); /* begin annotateBytecode: */ abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -19521,7 +19523,7 @@ genGetIdentityHashresultReg(sqInt rcvrReg, sqInt resultReg) /* begin JumpNonZero: */ jumpSet = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CallRT: */ - abstractInstruction2 = genoperand(Call, ceNewHashTrampoline); + abstractInstruction2 = genoperand(Call, ceInlineNewHashTrampoline); (abstractInstruction2->annotation = IsRelativeCall); /* begin annotateBytecode: */ abstractInstruction3 = genoperandoperand(MoveRR, ReceiverResultReg, resultReg); @@ -23326,7 +23328,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -23355,7 +23357,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1)); introspectionDataIndex += 2; } return 0; @@ -23613,7 +23615,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -23940,7 +23942,11 @@ compileCogFullBlockMethod(sqInt numCopied) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -24016,7 +24022,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -24271,6 +24281,18 @@ compileFullBlockMethodFrameBuild(sqInt numCopied) } } + +/* Return the default number of bytes to allocate for native code at startup. + The actual value can be set via vmParameterAt: and/or a preference in the + ini file. */ + + /* SistaCogit>>#defaultCogCodeSize */ +sqInt +defaultCogCodeSize(void) +{ + return 2 * (1024 * 1024); +} + /* SistaCogit>>#fillInCounters:atStartAddress: */ static void NoDbgRegParms fillInCountersatStartAddress(sqInt nCounters, sqInt startAddress) @@ -25005,7 +25027,8 @@ genCounterTripOnlyJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; extA = 0; - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); popToReg(ssTop(), TempReg); ssPop(1); @@ -25086,7 +25109,8 @@ genExtJumpIfNotInstanceOfBehaviorsBytecode(void) reg = allocateRegForStackEntryAtnotConflictingWith(0, 0); popToReg(ssTop(), reg); ssPop(1); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); literal = getLiteral((extA * 256) + byte1); if ((inverse = extB < 0)) { extB += 128; @@ -25416,7 +25440,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor1->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg1, !unforwardRcvr1, argReg1, rcvrReg1, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -25595,7 +25620,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); if (unforwardArg) { genEnsureOopInRegNotForwardedscratchReg(argReg, TempReg); } @@ -25827,7 +25853,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) /* In optimized code we don't generate counters to improve performance */ if (isOptimizedMethod(methodObj)) { eventualTarget1 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc1 = ssTop(); ssPop(1); if ((((desc1->type)) == SSConstant) @@ -25900,7 +25927,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) nextDescriptor = generatorAt((fetchByteofObject(nextPC, methodObj)) + bytecodeSetOffset); if (((nextDescriptor->generator)) == genPushConstantTrueBytecode) { eventualTarget2 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc2 = ssTop(); ssPop(1); if ((((desc2->type)) == SSConstant) @@ -25967,7 +25995,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) nextDescriptor = generatorAt((fetchByteofObject(targetBytecodePC, methodObj)) + bytecodeSetOffset); if (((nextDescriptor->generator)) == genPushConstantFalseBytecode) { eventualTarget3 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc3 = ssTop(); ssPop(1); if ((((desc3->type)) == SSConstant) @@ -26041,7 +26070,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) && ((((desc->constant)) == (trueObject())) || (((desc->constant)) == (falseObject())))) { eventualTarget4 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc4 = ssTop(); ssPop(1); if ((((desc4->type)) == SSConstant) @@ -26106,7 +26136,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) return 0; } eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); popToReg(desc, TempReg); ssPop(1); ssAllocateRequiredReg(SendNumArgsReg); @@ -26268,7 +26299,8 @@ genSpecialSelectorComparison(void) if (isOptimizedMethod(methodObj)) { return genSpecialSelectorComparisonWithoutCounters(); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -26448,7 +26480,8 @@ genSpecialSelectorComparisonWithoutCounters(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -26767,7 +26800,8 @@ genUnconditionalTrapBytecode(void) AbstractInstruction *abstractInstruction; AbstractInstruction *abstractInstruction1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin CallRT: */ abstractInstruction = genoperand(Call, ceTrapTrampoline); (abstractInstruction->annotation = IsRelativeCall); @@ -27072,9 +27106,9 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) static sqInt NoDbgRegParms picDataForCounterat(unsigned int counter, sqInt bcpc) { - unsigned int executedCount; + int executedCount; sqInt tuple; - unsigned int untakenCount; + int untakenCount; tuple = eeInstantiateClassIndexformatnumSlots(ClassArrayCompactIndex, arrayFormat(), 3); if (tuple == 0) { @@ -27084,8 +27118,8 @@ picDataForCounterat(unsigned int counter, sqInt bcpc) executedCount = initialCounterValue - (((usqInt) counter) >> 16); untakenCount = initialCounterValue - (counter & 0xFFFF); storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)bcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(1, tuple, ((executedCount << 1) | 1)); - storePointerUncheckedofObjectwithValue(2, tuple, ((untakenCount << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, tuple, (((usqInt)executedCount << 1) | 1)); + storePointerUncheckedofObjectwithValue(2, tuple, (((usqInt)untakenCount << 1) | 1)); return tuple; } @@ -27464,6 +27498,41 @@ populatewithPICInfoForfirstCacheTag(sqInt tuple, CogMethod *cPIC, sqInt firstCac } } + /* SistaMethodZone>>#getCogCodeZoneThreshold */ +double +getCogCodeZoneThreshold(void) +{ + return thresholdRatio; +} + + /* SistaMethodZone>>#manageFrom:to: */ +static void NoDbgRegParms +manageFromto(sqInt theStartAddress, sqInt theLimitAddress) +{ + mzFreeStart = (baseAddress = theStartAddress); + youngReferrers = (limitAddress = theLimitAddress); + openPICList = null; + methodBytesFreedSinceLastCompaction = 0; + methodCount = 0; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; +} + + /* SistaMethodZone>>#setCogCodeZoneThreshold: */ +sqInt +setCogCodeZoneThreshold(double ratio) +{ + /* send of break elided */; + if (!((ratio >= 0.1) + && (ratio <= 1.0))) { + return PrimErrBadArgument; + } + thresholdRatio = ratio; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; + return 0; +} + /* Add a blockStart for an embedded block. For a binary tree walk block dispatch blocks must be compiled in pc/depth-first order but are scanned @@ -27768,7 +27837,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -27786,8 +27855,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -29121,7 +29190,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -29152,7 +29222,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -29714,7 +29785,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -30000,7 +30072,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -30237,7 +30310,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -30308,7 +30382,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -30381,7 +30456,8 @@ genStorePopMaybeContextRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCh ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -30418,7 +30494,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -30443,7 +30520,8 @@ genStorePopRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCheck(sqInt po if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -30582,19 +30660,18 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; - return fixup; -} + } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ static void NoDbgRegParms @@ -30768,7 +30845,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -30778,7 +30856,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -30786,7 +30865,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -30825,7 +30905,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -30890,7 +30970,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -31023,8 +31104,7 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); if ((isBranch(descriptor)) @@ -31376,13 +31456,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1U << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -31424,7 +31497,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -31448,7 +31522,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -31743,6 +31818,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/spursistasrc/vm/cogitMIPSEL.c b/spursistasrc/vm/cogitMIPSEL.c index c8913feb0..492e6948f 100644 --- a/spursistasrc/vm/cogitMIPSEL.c +++ b/spursistasrc/vm/cogitMIPSEL.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGenerator VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + CCodeGenerator VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 from - SistaCogit VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd + SistaCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 */ -static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.2143 uuid: fe064b6b-e530-4766-837d-799ffe1e8dcd " __DATE__ ; +static char __buildInfo[] = "SistaCogit VMMaker.oscog-eem.2166 uuid: 7471b7ee-fa31-444f-bc3d-dee21ee090f2 " __DATE__ ; char *__cogitBuildInfo = __buildInfo; @@ -279,7 +279,7 @@ char *__cogitBuildInfo = __buildInfo; #define NumSendTrampolines 4 #define NumSpecialSelectors 32 #define NumStoreTrampolines 5 -#define NumTrampolines (IMMUTABILITY ? 70 : 65) +#define NumTrampolines (IMMUTABILITY ? 71 : 66) #define OneInstruction 4 #define OR 37 #define ORI 13 @@ -298,6 +298,7 @@ char *__cogitBuildInfo = __buildInfo; #define PrimCallMayCallBack 4 #define PrimCallNeedsNewMethod 1 #define PrimCallNeedsPrimitiveFunction 2 +#define PrimErrBadArgument 3 #define PrimErrNoMemory 9 #define PrimErrWritePastObject 17 #define PushCq 83 @@ -373,10 +374,10 @@ typedef struct _AbstractInstruction { unsigned char machineCodeSize; unsigned char maxSize; unsigned char annotation; - usqIntptr_t operands [3]; - usqIntptr_t address; + usqInt operands [3]; + usqInt address; struct _AbstractInstruction *dependent; - usqIntptr_t machineCode [7]; + unsigned int machineCode [7]; } AbstractInstruction; #define CogMIPSELCompiler AbstractInstruction @@ -443,10 +444,12 @@ typedef struct { typedef struct { AbstractInstruction *targetInstruction; - sqInt instructionIndex; - sqInt simStackPtr; - sqInt simNativeStackPtr; - sqInt simNativeStackSize; + char simStackPtr; + unsigned short instructionIndex; +#if LowcodeVM + unsigned short simNativeStackPtr; + unsigned short simNativeStackSize; +#endif } BytecodeFixup; #define CogSSBytecodeFixup BytecodeFixup @@ -565,7 +568,6 @@ static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC); static usqInt cPICPrototypeCaseOffset(void); static sqInt NoDbgRegParms cPICHasTarget(CogMethod *cPIC, CogMethod *targetMethod); static AbstractInstruction * NoDbgRegParms gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder); -extern sqInt defaultCogCodeSize(void); static sqInt NoDbgRegParms deltaToSkipPrimAndErrorStoreInheader(sqInt aMethodObj, sqInt aMethodHeader); static sqInt NoDbgRegParms endPCOf(sqInt aMethod); extern void enterCogCodePopReceiver(void); @@ -576,7 +578,7 @@ static sqInt extBBytecode(void); static sqInt NoDbgRegParms fillInBlockHeadersAt(sqInt startAddress); static sqInt NoDbgRegParms findBackwardBranchIsBackwardBranchMcpcBcpcMatchingBcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetBcpc); static usqInt NoDbgRegParms findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc); -static sqInt NoDbgRegParms findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod); +static usqInt NoDbgRegParms findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod); extern CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod); static sqInt NoDbgRegParms findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *targetMcpc); static usqInt NoDbgRegParms firstMappedPCFor(CogMethod *cogMethod); @@ -596,7 +598,7 @@ static void NoDbgRegParms generateCaptureCStackPointers(sqInt captureFramePointe static void generateClosedPICPrototype(void); static CogMethod * generateCogFullBlock(void); static CogMethod * NoDbgRegParms generateCogMethod(sqInt selector); -static sqInt NoDbgRegParms generateMapAtstart(sqInt addressOrNull, sqInt startAddress); +static sqInt NoDbgRegParms generateMapAtstart(usqInt addressOrNull, usqInt startAddress); static void generateOpenPICPrototype(void); static void generateRunTimeTrampolines(void); static void generateStackPointerCapture(void); @@ -644,7 +646,7 @@ static BytecodeDescriptor * loadBytesAndGetDescriptor(void); static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc); static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg); static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg); -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); @@ -723,7 +725,7 @@ static void zeroOpcodeIndexForNewOpcodes(void); extern void addAllToYoungReferrers(void); static void NoDbgRegParms addToOpenPICList(CogMethod *anOpenPIC); static void NoDbgRegParms addToYoungReferrers(CogMethod *cogMethod); -static sqInt NoDbgRegParms allocate(sqInt numBytes); +static usqInt NoDbgRegParms allocate(sqInt numBytes); static void clearCogCompiledCode(void); static void NoDbgRegParms clearSavedPICUsageCount(CogMethod *cogMethod); static void compactCompiledCode(void); @@ -732,7 +734,6 @@ static void followForwardedLiteralsInOpenPICList(void); extern void freeMethod(CogMethod *cogMethod); static void freeOlderMethodsForCompaction(void); static sqInt kosherYoungReferrers(void); -static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); extern CogMethod * methodFor(void *address); extern sqInt methodsCompiledToMachineCodeInto(sqInt arrayObj); extern sqInt numMethods(void); @@ -912,7 +913,7 @@ static sqInt NoDbgRegParms lhRbaseoffset(AbstractInstruction * self_in_lhRbaseof static sqInt NoDbgRegParms lhuRbaseoffset(AbstractInstruction * self_in_lhuRbaseoffset, sqInt destReg, sqInt baseReg, sqInt offset); static usqInt NoDbgRegParms literalAtAddress(AbstractInstruction * self_in_literalAtAddress, sqInt mcpc); static sqInt NoDbgRegParms literalAtAddressput(AbstractInstruction * self_in_literalAtAddressput, sqInt mcpc, sqInt newLiteral); -static sqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); +static usqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress); static sqInt NoDbgRegParms loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize); static sqInt NoDbgRegParms loadPICLiteralByteSize(AbstractInstruction * self_in_loadPICLiteralByteSize); static usqInt NoDbgRegParms low16BitsOf(AbstractInstruction * self_in_low16BitsOf, usqInt word); @@ -940,7 +941,7 @@ static AbstractInstruction * NoDbgRegParms relocateJumpLongConditionalBeforeFoll static AbstractInstruction * NoDbgRegParms relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta); static sqInt NoDbgRegParms rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteConditionalJumpLongAttarget(AbstractInstruction * self_in_rewriteConditionalJumpLongAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress); -static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress); +static AbstractInstruction * NoDbgRegParms rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr); static sqInt NoDbgRegParms rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress); static AbstractInstruction * NoDbgRegParms rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, usqInt callSiteReturnAddress); static AbstractInstruction * NoDbgRegParms rewriteITypeBranchAtAddresstarget(AbstractInstruction * self_in_rewriteITypeBranchAtAddresstarget, sqInt mcpc, sqInt newTarget); @@ -1002,6 +1003,7 @@ static sqInt genPrimitiveSubtract(void); static sqInt NoDbgRegParms genSmallIntegerComparison(sqInt jumpOpcode); static sqInt NoDbgRegParms genSmallIntegerComparisonorDoubleComparisoninvert(sqInt jumpOpcode, AbstractInstruction * NoDbgRegParms (*jumpFPOpcodeGenerator)(void *), sqInt invertComparison); static sqInt NoDbgRegParms isUnannotatableConstant(CogSimStackEntry *simStackEntry); +static sqInt NoDbgRegParms classForInlineCacheTag(sqInt inlineCacheTag); static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister); static sqInt NoDbgRegParms genClearAndSetSmallIntegerTagsIn(sqInt scratchReg); static void NoDbgRegParms genConvertCharacterToSmallIntegerInReg(sqInt reg); @@ -1034,7 +1036,7 @@ static sqInt NoDbgRegParms getLiteralCountOfplusOneinBytesintoscratch(sqInt meth static sqInt NoDbgRegParms inlineCacheTagForInstance(sqInt oop); static AbstractInstruction * NoDbgRegParms jumpNotSmallIntegerUnsignedValueInRegister(sqInt reg); static sqInt NoDbgRegParms markAndTraceCacheTagLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqInt address); -static sqInt NoDbgRegParms numCountersFor(usqInt theCounters); +static usqInt NoDbgRegParms numCountersFor(usqInt theCounters); static sqInt numSmallIntegerBits(void); static sqInt NoDbgRegParms validInlineCacheTag(usqInt classIndexOrTagPattern); static sqInt NoDbgRegParms branchIfinstanceOfBehaviorstarget(sqInt reg, sqInt arrayObj, AbstractInstruction *targetFixUp); @@ -1042,7 +1044,6 @@ static sqInt NoDbgRegParms branchIfnotInstanceOfBehaviorstarget(sqInt reg, sqInt static sqInt NoDbgRegParms cacheTagIsMarked(sqInt cacheTag); static sqInt NoDbgRegParms checkValidDerivedObjectReference(sqInt bodyAddress); static sqInt NoDbgRegParms checkValidOopReference(sqInt anOop); -static sqInt NoDbgRegParms classForInlineCacheTag(sqInt classIndex); static sqInt NoDbgRegParms couldBeDerivedObject(sqInt bodyAddress); static sqInt NoDbgRegParms couldBeObject(sqInt literal); static sqInt NoDbgRegParms genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, char *aString); @@ -1235,6 +1236,7 @@ static CogMethod * NoDbgRegParms compileCogFullBlockMethod(sqInt numCopied); static CogMethod * NoDbgRegParms compileCogMethod(sqInt selector); static void compileFrameBuild(void); static void NoDbgRegParms compileFullBlockMethodFrameBuild(sqInt numCopied); +extern sqInt defaultCogCodeSize(void); static void NoDbgRegParms fillInCountersatStartAddress(sqInt nCounters, sqInt startAddress); static CogMethod * NoDbgRegParms fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector); static sqInt NoDbgRegParms genBinaryConstOpVarInlinePrimitive(sqInt prim); @@ -1262,6 +1264,9 @@ static sqInt NoDbgRegParms picDataForSendTomethodClassIfSuperatbcpc(CogMethod *c static sqInt NoDbgRegParms picDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg); extern sqInt picDataForinto(CogMethod *cogMethod, sqInt arrayObj); static void NoDbgRegParms populatewithPICInfoForfirstCacheTag(sqInt tuple, CogMethod *cPIC, sqInt firstCacheTag); +extern double getCogCodeZoneThreshold(void); +static void NoDbgRegParms manageFromto(sqInt theStartAddress, sqInt theLimitAddress); +extern sqInt setCogCodeZoneThreshold(double ratio); static BlockStart * NoDbgRegParms addBlockStartAtnumArgsnumCopiedspan(sqInt bytecodepc, sqInt numArgs, sqInt numCopied, sqInt span); static void NoDbgRegParms adjustArgumentsForPerform(sqInt numArgs); static sqInt NoDbgRegParms allocateRegForStackEntryAtnotConflictingWith(sqInt index, sqInt regMask); @@ -1345,7 +1350,7 @@ static sqInt NoDbgRegParms genStorePopRemoteInstVarofObjectAtneedsStoreCheckneed static sqInt NoDbgRegParms genStorePopRemoteTempAtneedsStoreCheck(sqInt popBoolean, sqInt slotIndex, sqInt remoteTempIndex, sqInt needsStoreCheck); static sqInt NoDbgRegParms genStorePopTemporaryVariable(sqInt popBoolean, sqInt tempIndex); static sqInt genUpArrowReturn(void); -static BytecodeFixup * NoDbgRegParms initializeFixupAt(sqInt targetPC); +static void NoDbgRegParms initializeFixupAt(sqInt targetPC); static void NoDbgRegParms initSimStackForFramefulMethod(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc); static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc); @@ -1374,7 +1379,6 @@ static void NoDbgRegParms ssAllocateRequiredRegMaskupThroughupThroughNative(sqIn static void NoDbgRegParms ssAllocateRequiredReg(sqInt requiredReg); static void NoDbgRegParms ssAllocateRequiredRegand(sqInt requiredReg1, sqInt requiredReg2); static void NoDbgRegParms ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr); -static void NoDbgRegParms ssFlushTo(sqInt index); static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex); static void NoDbgRegParms ssFlushUpThroughReceiverVariable(sqInt slotIndex); static void NoDbgRegParms ssFlushUpThroughTemporaryVariable(sqInt tempIndex); @@ -1397,6 +1401,7 @@ static void voidReceiverResultRegContainsSelf(void); /*** Variables ***/ static AbstractInstruction * abstractOpcodes; +static usqInt allocationThreshold; static AbstractInstruction aMethodLabel; static AbstractInstruction * const backEnd = &aMethodLabel; static usqInt baseAddress; @@ -1404,7 +1409,6 @@ static sqInt blockCount; static AbstractInstruction * blockEntryLabel; static AbstractInstruction * blockEntryNoContextSwitch; sqInt blockNoContextSwitchOffset; -static sqInt blockPass; static BlockStart * blockStarts; static sqInt branchReachedOnlyForCounterTrip; static sqInt breakBlock; @@ -1443,6 +1447,7 @@ static void (*ceFlushICache)(usqIntptr_t from, usqIntptr_t to); static sqInt ceFreeTrampoline; usqIntptr_t (*ceGetFP)(void); usqIntptr_t (*ceGetSP)(void); +static sqInt ceInlineNewHashTrampoline; static sqInt ceInstantiateClassIndexableSizeTrampoline; static sqInt ceInstantiateClassTrampoline; static sqInt ceLargeActiveContextInBlockTrampoline; @@ -1490,6 +1495,7 @@ sqInt cmNoCheckEntryOffset; static sqInt codeBase; static sqInt codeModified; static sqInt compactionInProgress; +static sqInt compilationPass; static sqInt compilationTrace; static sqInt counterIndex; static usqInt counters; @@ -2102,6 +2108,7 @@ static AbstractInstruction * stackCheckLabel; static AbstractInstruction * stackOverflowCall; static sqInt superSendTrampolines[NumSendTrampolines]; static sqInt tempOop; +static float thresholdRatio = 0.5f; int traceFlags = 8 /* prim trace log on by default */; sqInt traceStores; static char *trampolineAddresses[NumTrampolines*2]; @@ -2139,6 +2146,7 @@ static usqInt youngReferrers; #define halt() warning("halt") #define haltmsg(msg) warning("halt: " msg) #define interpretOffset() missOffset +#define maxCogCodeSize() (16*1024*1024) #define maybeBreakGeneratingAt(address) 0 #define maybeHaltIfDebugPC() 0 #define methodLabel() methodLabel @@ -2716,7 +2724,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; @@ -3253,7 +3261,7 @@ checkIfValidOopRefAndTargetpccogMethod(sqInt annotation, char *mcpc, sqInt cogMe sqInt entryPoint; usqInt entryPoint1; sqInt entryPt; - sqInt literal; + usqInt literal; sqInt sendTable; sqInt *sendTable1; sqInt tagCouldBeObj; @@ -3355,7 +3363,7 @@ static sqInt NoDbgRegParms checkIfValidOopRefpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod) { usqInt entryPoint; - sqInt literal; + usqInt literal; sqInt off; usqInt offset; sqInt offset1; @@ -3583,7 +3591,7 @@ static sqInt NoDbgRegParms closedPICRefersToUnmarkedObject(CogMethod *cPIC) { sqInt i; - sqInt object; + usqInt object; sqInt pc; if (!((isImmediate((cPIC->selector))) @@ -3930,7 +3938,7 @@ CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if ((isYoung(selector)) || ((inlineCacheTagForInstance(rcvr)) == 0)) { @@ -3989,7 +3997,7 @@ cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) sqInt mapSize; usqIntptr_t opcodeSize; CogMethod *pic; - sqInt startAddress; + usqInt startAddress; compilationBreakpointisMNUCase(selector, numBytesOf(selector), 0); startAddress = allocate(openPICSize); @@ -4057,7 +4065,7 @@ static CogMethod * NoDbgRegParms cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) { CogMethod *pic; - sqInt startAddress; + usqInt startAddress; if (isYoung(selector)) { return ((CogMethod *) YoungSelectorInPIC); @@ -4823,7 +4831,7 @@ configureMNUCPICmethodOperandnumArgsdelta(CogMethod *cPIC, sqInt methodOperand, static sqInt NoDbgRegParms cPICCompactAndIsNowEmpty(CogMethod *cPIC) { - sqInt entryPoint; + usqInt entryPoint; sqInt followingAddress; sqInt i; sqInt methods[MaxCPICCases]; @@ -4899,7 +4907,7 @@ cPICCompactAndIsNowEmpty(CogMethod *cPIC) static sqInt NoDbgRegParms cPICHasForwardedClass(CogMethod *cPIC) { - sqInt classIndex; + usqInt classIndex; sqInt i; sqInt pc; @@ -4924,7 +4932,7 @@ cPICHasForwardedClass(CogMethod *cPIC) static sqInt NoDbgRegParms cPICHasFreedTargets(CogMethod *cPIC) { - sqInt entryPoint; + usqInt entryPoint; sqInt i; sqInt pc; CogMethod *targetMethod; @@ -5003,18 +5011,6 @@ gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder) } -/* Return the default number of bytes to allocate for native code at startup. - The actual value can be set via vmParameterAt: and/or a preference in the - ini file. */ - - /* Cogit>>#defaultCogCodeSize */ -sqInt -defaultCogCodeSize(void) -{ - return 1024 * 1536; -} - - /* Answer the number of bytecodes to skip to get to the first bytecode past the primitive call and any store of the error code. */ @@ -5036,7 +5032,7 @@ endPCOf(sqInt aMethod) sqInt byte; BytecodeDescriptor *descriptor; sqInt distance; - usqInt end; + sqInt end; sqInt latestContinuation; sqInt nExts; sqInt pc; @@ -5121,13 +5117,13 @@ entryPointTagIsSelector(sqInt entryPoint) static sqInt NoDbgRegParms expectedClosedPICPrototype(CogMethod *cPIC) { - sqInt classTag; - usqInt classTagPC; + usqInt classTag; + sqInt classTagPC; usqInt entryPoint; sqInt errors; sqInt i; - usqInt methodObjPC; - sqInt object; + sqInt methodObjPC; + usqInt object; usqInt pc; errors = 0; @@ -5270,8 +5266,8 @@ findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) } /* Cogit>>#findMapLocationForMcpc:inMethod: */ -static sqInt NoDbgRegParms -findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) +static usqInt NoDbgRegParms +findMapLocationForMcpcinMethod(usqInt targetMcpc, CogMethod *cogMethod) { sqInt annotation; usqInt map; @@ -5465,7 +5461,7 @@ followForwardedMethods(void) static sqInt NoDbgRegParms followMaybeObjRefInClosedPICAt(sqInt mcpc) { - sqInt object; + usqInt object; sqInt subject; object = literalBeforeFollowingAddress(backEnd, mcpc); @@ -5808,7 +5804,7 @@ generateClosedPICPrototype(void) /* begin uniqueLiteral:forInstruction: */ anInstruction2 = genoperandoperand(MoveCwR, wordConstant1, SendNumArgsReg); /* begin JumpLong: */ - jumpTarget1 = (cPICPrototypeCaseOffset()) + 13262352; + jumpTarget1 = (((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352; genoperand(JumpLong, jumpTarget1); endCPICCase0 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); for (h = 1; h < MaxCPICCases; h += 1) { @@ -5825,7 +5821,7 @@ generateClosedPICPrototype(void) /* begin checkLiteral:forInstruction: */ anInstruction1 = genoperandoperand(opcode, operandOne, TempReg); /* begin JumpLongZero: */ - jumpTarget = ((cPICPrototypeCaseOffset()) + 13262352) + (h * 16); + jumpTarget = ((((methodZoneBase + (youngReferrers())) / 2) - 13262352) + 13262352) + (h * 16); genConditionalBranchoperand(JumpLongZero, ((sqInt)jumpTarget)); if (h == 1) { endCPICCase1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -5871,7 +5867,7 @@ generateCogFullBlock(void) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -5920,7 +5916,7 @@ generateCogMethod(sqInt selector) sqInt mapSize; CogMethod *method; sqInt result; - sqInt startAddress; + usqInt startAddress; sqInt totalSize; headerSize = sizeof(CogMethod); @@ -5966,17 +5962,17 @@ generateCogMethod(sqInt selector) /* Cogit>>#generateMapAt:start: */ static sqInt NoDbgRegParms -generateMapAtstart(sqInt addressOrNull, sqInt startAddress) +generateMapAtstart(usqInt addressOrNull, usqInt startAddress) { unsigned char annotation; - usqIntptr_t delta; + sqInt delta; sqInt i; AbstractInstruction *instruction; sqInt length; - usqIntptr_t location; - usqIntptr_t mapEntry; + usqInt location; + sqInt mapEntry; sqInt maxDelta; - usqIntptr_t mcpc; + usqInt mcpc; length = 0; location = startAddress; @@ -6944,7 +6940,7 @@ gMoveCwR(sqInt wordConstant, sqInt reg) /* 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; @@ -7039,7 +7035,7 @@ static void mapObjectReferencesInGeneratedRuntime(void) { sqInt i; - sqInt literal; + usqInt literal; sqInt mappedLiteral; usqInt mcpc; @@ -7513,7 +7509,7 @@ static void markAndTraceObjectReferencesInGeneratedRuntime(void) { sqInt i; - sqInt literal; + usqInt literal; usqInt mcpc; for (i = 0; i < runtimeObjectRefIndex; i += 1) { @@ -7658,7 +7654,7 @@ markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt sqInt cacheTagMarked; sqInt entryPoint; usqInt entryPoint1; - sqInt literal; + usqInt literal; sqInt sendTable; sqInt *sendTable1; sqInt tagCouldBeObj; @@ -7748,7 +7744,7 @@ markLiteralspcmethod(sqInt annotation, char *mcpc, sqInt cogMethod) usqInt cacheTag1; sqInt entryPoint; usqInt entryPoint1; - sqInt literal; + usqInt literal; sqInt tagCouldBeObj; sqInt tagCouldBeObj1; @@ -8659,7 +8655,7 @@ remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr) sqInt entryPoint; usqInt entryPoint1; sqInt ignored; - sqInt literal; + usqInt literal; sqInt mappedCacheTag; sqInt mappedLiteral; sqInt *sendTable; @@ -8754,7 +8750,7 @@ remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr) static sqInt NoDbgRegParms remapMaybeObjRefInClosedPICAt(sqInt mcpc) { - sqInt object; + usqInt object; sqInt subject; object = literalBeforeFollowingAddress(backEnd, mcpc); @@ -8856,7 +8852,7 @@ static sqInt NoDbgRegParms spanForCleanBlockStartingAt(sqInt startPC) { BytecodeDescriptor *descriptor; - usqInt end; + sqInt end; sqInt pc; pc = startPC; @@ -9653,14 +9649,14 @@ addToYoungReferrers(CogMethod *cogMethod) } /* CogMethodZone>>#allocate: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms allocate(sqInt numBytes) { usqInt allocation; sqInt roundedBytes; roundedBytes = (numBytes + 7) & -8; - if ((mzFreeStart + roundedBytes) >= (limitAddress - (methodCount * BytesPerWord))) { + if ((mzFreeStart + roundedBytes) >= ((((limitAddress - (methodCount * BytesPerWord)) < allocationThreshold) ? (limitAddress - (methodCount * BytesPerWord)) : allocationThreshold))) { return 0; } allocation = mzFreeStart; @@ -9850,15 +9846,15 @@ freeMethod(CogMethod *cogMethod) static void freeOlderMethodsForCompaction(void) { - usqInt amountToFree; + sqInt amountToFree; CogMethod *cogMethod; sqInt freeableUsage; - usqInt freedSoFar; - usqInt initialFreeSpace; - usqInt zoneSize; + sqInt freedSoFar; + sqInt initialFreeSpace; + sqInt zoneSize; - zoneSize = limitAddress - baseAddress; - initialFreeSpace = (limitAddress - mzFreeStart) + methodBytesFreedSinceLastCompaction; + zoneSize = ((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - baseAddress; + initialFreeSpace = (((((limitAddress) < allocationThreshold) ? (limitAddress) : allocationThreshold)) - mzFreeStart) + methodBytesFreedSinceLastCompaction; freedSoFar = initialFreeSpace; /* 4 needs to be e.g. a start-up parameter */ @@ -9909,17 +9905,6 @@ kosherYoungReferrers(void) return 1; } - /* CogMethodZone>>#manageFrom:to: */ -static void NoDbgRegParms -manageFromto(sqInt theStartAddress, sqInt theLimitAddress) -{ - mzFreeStart = (baseAddress = theStartAddress); - youngReferrers = (limitAddress = theLimitAddress); - openPICList = null; - methodBytesFreedSinceLastCompaction = 0; - methodCount = 0; -} - /* CogMethodZone>>#methodFor: */ CogMethod * methodFor(void *address) @@ -10736,8 +10721,8 @@ concretizeAddCheckOverflowCqR(AbstractInstruction * self_in_concretizeAddCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAddCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCheckOverflowCqR->operands))[1]); @@ -10775,8 +10760,8 @@ concretizeAddCheckOverflowRR(AbstractInstruction * self_in_concretizeAddCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeAddCheckOverflowRR->operands))[0]; @@ -10806,8 +10791,8 @@ concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAddCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCqR->operands))[1]); @@ -10828,8 +10813,8 @@ concretizeAddCwR(AbstractInstruction * self_in_concretizeAddCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAddCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddCwR->operands))[1]); @@ -10851,8 +10836,8 @@ concretizeAddRR(AbstractInstruction * self_in_concretizeAddRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeAddRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAddRR->operands))[1]); @@ -10882,8 +10867,8 @@ concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAndCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCqR->operands))[1]); @@ -10903,9 +10888,9 @@ concretizeAndCqRR(AbstractInstruction * self_in_concretizeAndCqRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t dstReg; - usqIntptr_t srcReg; - usqIntptr_t value; + usqInt dstReg; + usqInt srcReg; + usqInt value; value = ((self_in_concretizeAndCqRR->operands))[0]; srcReg = ((self_in_concretizeAndCqRR->operands))[1]; @@ -10930,8 +10915,8 @@ concretizeAndCwR(AbstractInstruction * self_in_concretizeAndCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeAndCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndCwR->operands))[1]); @@ -10953,8 +10938,8 @@ concretizeAndRR(AbstractInstruction * self_in_concretizeAndRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeAndRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeAndRR->operands))[1]); @@ -10970,7 +10955,7 @@ concretizeArithmeticShiftRightCqR(AbstractInstruction * self_in_concretizeArithm { sqInt aWord; sqInt distance; - usqIntptr_t reg; + usqInt reg; distance = (((((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeArithmeticShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeArithmeticShiftRightCqR->operands))[1]; @@ -10985,8 +10970,8 @@ static usqInt NoDbgRegParms concretizeArithmeticShiftRightRR(AbstractInstruction * self_in_concretizeArithmeticShiftRightRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t distReg; + usqInt destReg; + usqInt distReg; distReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[0]; destReg = ((self_in_concretizeArithmeticShiftRightRR->operands))[1]; @@ -11021,9 +11006,9 @@ concretizeBrEqualRR(AbstractInstruction * self_in_concretizeBrEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrEqualRR->operands))[0])); @@ -11054,8 +11039,8 @@ concretizeBrLongEqualRR(AbstractInstruction * self_in_concretizeBrLongEqualRR) AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongEqualRR->operands))[0])); @@ -11091,8 +11076,8 @@ concretizeBrLongNotEqualRR(AbstractInstruction * self_in_concretizeBrLongNotEqua AbstractInstruction *jumpTarget; usqInt jumpTargetAddr; AbstractInstruction *jumpTargetInstruction; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; /* begin longJumpTargetAddress */ jumpTarget = ((AbstractInstruction *) (((self_in_concretizeBrLongNotEqualRR->operands))[0])); @@ -11126,9 +11111,9 @@ concretizeBrNotEqualRR(AbstractInstruction * self_in_concretizeBrNotEqualRR) sqInt aWord; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrNotEqualRR->operands))[0])); @@ -11158,9 +11143,9 @@ concretizeBrSignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrSigne sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterEqualRR->operands))[0])); @@ -11195,9 +11180,9 @@ concretizeBrSignedGreaterRR(AbstractInstruction * self_in_concretizeBrSignedGrea sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedGreaterRR->operands))[0])); @@ -11232,9 +11217,9 @@ concretizeBrSignedLessEqualRR(AbstractInstruction * self_in_concretizeBrSignedLe sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessEqualRR->operands))[0])); @@ -11269,9 +11254,9 @@ concretizeBrSignedLessRR(AbstractInstruction * self_in_concretizeBrSignedLessRR) sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrSignedLessRR->operands))[0])); @@ -11306,9 +11291,9 @@ concretizeBrUnsignedGreaterEqualRR(AbstractInstruction * self_in_concretizeBrUns sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterEqualRR->operands))[0])); @@ -11343,9 +11328,9 @@ concretizeBrUnsignedGreaterRR(AbstractInstruction * self_in_concretizeBrUnsigned sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedGreaterRR->operands))[0])); @@ -11380,9 +11365,9 @@ concretizeBrUnsignedLessEqualRR(AbstractInstruction * self_in_concretizeBrUnsign sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessEqualRR->operands))[0])); @@ -11417,9 +11402,9 @@ concretizeBrUnsignedLessRR(AbstractInstruction * self_in_concretizeBrUnsignedLes sqInt aWord1; AbstractInstruction *jumpTarget; AbstractInstruction *jumpTarget1; - usqIntptr_t leftReg; + usqInt leftReg; sqInt offset; - usqIntptr_t rightReg; + usqInt rightReg; /* begin computeJumpTargetOffsetPlus: */ jumpTarget1 = ((AbstractInstruction *) (((self_in_concretizeBrUnsignedLessRR->operands))[0])); @@ -11525,8 +11510,8 @@ static usqInt NoDbgRegParms concretizeDivRR(AbstractInstruction * self_in_concretizeDivRR) { sqInt aWord; - usqIntptr_t dividendReg; - usqIntptr_t divisorReg; + usqInt dividendReg; + usqInt divisorReg; dividendReg = ((self_in_concretizeDivRR->operands))[0]; divisorReg = ((self_in_concretizeDivRR->operands))[1]; @@ -11675,7 +11660,7 @@ static usqInt NoDbgRegParms concretizeJumpR(AbstractInstruction * self_in_concretizeJumpR) { sqInt aWord; - usqIntptr_t reg; + usqInt reg; flag("OABI"); reg = ((self_in_concretizeJumpR->operands))[0]; @@ -11776,8 +11761,8 @@ concretizeLoadEffectiveAddressMwrR(AbstractInstruction * self_in_concretizeLoadE sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t baseReg; - usqIntptr_t destReg; + usqInt baseReg; + usqInt destReg; sqInt offset; offset = ((self_in_concretizeLoadEffectiveAddressMwrR->operands))[0]; @@ -11807,7 +11792,7 @@ concretizeLogicalShiftLeftCqR(AbstractInstruction * self_in_concretizeLogicalShi { sqInt aWord; sqInt distance; - usqIntptr_t reg; + usqInt reg; distance = (((((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftLeftCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftLeftCqR->operands))[1]; @@ -11822,8 +11807,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftLeftRR(AbstractInstruction * self_in_concretizeLogicalShiftLeftRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t distReg; + usqInt destReg; + usqInt distReg; distReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftLeftRR->operands))[1]; @@ -11839,7 +11824,7 @@ concretizeLogicalShiftRightCqR(AbstractInstruction * self_in_concretizeLogicalSh { sqInt aWord; sqInt distance; - usqIntptr_t reg; + usqInt reg; distance = (((((self_in_concretizeLogicalShiftRightCqR->operands))[0]) < 0x1F) ? (((self_in_concretizeLogicalShiftRightCqR->operands))[0]) : 0x1F); reg = ((self_in_concretizeLogicalShiftRightCqR->operands))[1]; @@ -11854,8 +11839,8 @@ static usqInt NoDbgRegParms concretizeLogicalShiftRightRR(AbstractInstruction * self_in_concretizeLogicalShiftRightRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t distReg; + usqInt destReg; + usqInt distReg; distReg = ((self_in_concretizeLogicalShiftRightRR->operands))[0]; destReg = ((self_in_concretizeLogicalShiftRightRR->operands))[1]; @@ -11873,8 +11858,8 @@ concretizeMoveAbR(AbstractInstruction * self_in_concretizeMoveAbR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destReg; - usqIntptr_t srcAddr; + usqInt destReg; + usqInt srcAddr; srcAddr = ((self_in_concretizeMoveAbR->operands))[0]; destReg = ((self_in_concretizeMoveAbR->operands))[1]; @@ -11906,8 +11891,8 @@ concretizeMoveAwR(AbstractInstruction * self_in_concretizeMoveAwR) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destReg; - usqIntptr_t srcAddr; + usqInt destReg; + usqInt srcAddr; srcAddr = ((self_in_concretizeMoveAwR->operands))[0]; destReg = ((self_in_concretizeMoveAwR->operands))[1]; @@ -11936,7 +11921,7 @@ static usqInt NoDbgRegParms concretizeMoveCqR(AbstractInstruction * self_in_concretizeMoveCqR) { sqInt aWord; - usqIntptr_t reg; + usqInt reg; sqInt word; word = ((self_in_concretizeMoveCqR->operands))[0]; @@ -11956,7 +11941,7 @@ concretizeMoveCwR(AbstractInstruction * self_in_concretizeMoveCwR) { sqInt aWord; sqInt aWord1; - usqIntptr_t reg; + usqInt reg; sqInt word; word = ((self_in_concretizeMoveCwR->operands))[0]; @@ -11975,7 +11960,7 @@ static usqInt NoDbgRegParms concretizeMoveHighR(AbstractInstruction * self_in_concretizeMoveHighR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; destReg = ((self_in_concretizeMoveHighR->operands))[0]; /* begin machineCodeAt:put: */ @@ -11989,7 +11974,7 @@ static usqInt NoDbgRegParms concretizeMoveLowR(AbstractInstruction * self_in_concretizeMoveLowR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; destReg = ((self_in_concretizeMoveLowR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12003,9 +11988,9 @@ static usqInt NoDbgRegParms concretizeMoveM16rR(AbstractInstruction * self_in_concretizeMoveM16rR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; offset = ((self_in_concretizeMoveM16rR->operands))[0]; srcReg = ((self_in_concretizeMoveM16rR->operands))[1]; @@ -12021,9 +12006,9 @@ static usqInt NoDbgRegParms concretizeMoveMbrR(AbstractInstruction * self_in_concretizeMoveMbrR) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; offset = ((self_in_concretizeMoveMbrR->operands))[0]; srcReg = ((self_in_concretizeMoveMbrR->operands))[1]; @@ -12043,8 +12028,8 @@ concretizeMoveMwrR(AbstractInstruction * self_in_concretizeMoveMwrR) sqInt aWord2; sqInt aWord3; sqInt aWord4; - usqIntptr_t baseReg; - usqIntptr_t destReg; + usqInt baseReg; + usqInt destReg; sqInt offset; offset = ((self_in_concretizeMoveMwrR->operands))[0]; @@ -12079,8 +12064,8 @@ concretizeMoveRAb(AbstractInstruction * self_in_concretizeMoveRAb) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destAddr; - usqIntptr_t srcReg; + usqInt destAddr; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRAb->operands))[0]; destAddr = ((self_in_concretizeMoveRAb->operands))[1]; @@ -12112,8 +12097,8 @@ concretizeMoveRAw(AbstractInstruction * self_in_concretizeMoveRAw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t destAddr; - usqIntptr_t srcReg; + usqInt destAddr; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRAw->operands))[0]; destAddr = ((self_in_concretizeMoveRAw->operands))[1]; @@ -12142,9 +12127,9 @@ static usqInt NoDbgRegParms concretizeMoveRM16r(AbstractInstruction * self_in_concretizeMoveRM16r) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRM16r->operands))[0]; offset = ((self_in_concretizeMoveRM16r->operands))[1]; @@ -12160,9 +12145,9 @@ static usqInt NoDbgRegParms concretizeMoveRMbr(AbstractInstruction * self_in_concretizeMoveRMbr) { sqInt aWord; - usqIntptr_t destReg; + usqInt destReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRMbr->operands))[0]; offset = ((self_in_concretizeMoveRMbr->operands))[1]; @@ -12178,9 +12163,9 @@ static usqInt NoDbgRegParms concretizeMoveRMwr(AbstractInstruction * self_in_concretizeMoveRMwr) { sqInt aWord; - usqIntptr_t baseReg; + usqInt baseReg; sqInt offset; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRMwr->operands))[0]; offset = ((self_in_concretizeMoveRMwr->operands))[1]; @@ -12196,8 +12181,8 @@ static usqInt NoDbgRegParms concretizeMoveRR(AbstractInstruction * self_in_concretizeMoveRR) { sqInt aWord; - usqIntptr_t destReg; - usqIntptr_t srcReg; + usqInt destReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRR->operands))[0]; destReg = ((self_in_concretizeMoveRR->operands))[1]; @@ -12213,9 +12198,9 @@ concretizeMoveRXbrR(AbstractInstruction * self_in_concretizeMoveRXbrR) { sqInt aWord; sqInt aWord1; - usqIntptr_t baseReg; - usqIntptr_t indexReg; - usqIntptr_t srcReg; + usqInt baseReg; + usqInt indexReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRXbrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXbrR->operands))[1]; @@ -12236,9 +12221,9 @@ concretizeMoveRXwrR(AbstractInstruction * self_in_concretizeMoveRXwrR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t baseReg; - usqIntptr_t indexReg; - usqIntptr_t srcReg; + usqInt baseReg; + usqInt indexReg; + usqInt srcReg; srcReg = ((self_in_concretizeMoveRXwrR->operands))[0]; indexReg = ((self_in_concretizeMoveRXwrR->operands))[1]; @@ -12261,9 +12246,9 @@ concretizeMoveXbrRR(AbstractInstruction * self_in_concretizeMoveXbrRR) { sqInt aWord; sqInt aWord1; - usqIntptr_t baseReg; - usqIntptr_t destReg; - usqIntptr_t indexReg; + usqInt baseReg; + usqInt destReg; + usqInt indexReg; /* index is number of *bytes* */ @@ -12286,9 +12271,9 @@ concretizeMoveXwrRR(AbstractInstruction * self_in_concretizeMoveXwrRR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t baseReg; - usqIntptr_t destReg; - usqIntptr_t indexReg; + usqInt baseReg; + usqInt destReg; + usqInt indexReg; indexReg = ((self_in_concretizeMoveXwrRR->operands))[0]; baseReg = ((self_in_concretizeMoveXwrRR->operands))[1]; @@ -12314,8 +12299,8 @@ concretizeMulCheckOverflowRR(AbstractInstruction * self_in_concretizeMulCheckOve sqInt aWord2; sqInt aWord3; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeMulCheckOverflowRR->operands))[0]; @@ -12341,7 +12326,7 @@ static usqInt NoDbgRegParms concretizeNegateR(AbstractInstruction * self_in_concretizeNegateR) { sqInt aWord; - usqIntptr_t reg; + usqInt reg; reg = ((self_in_concretizeNegateR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12365,8 +12350,8 @@ concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeOrCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCqR->operands))[1]); @@ -12387,8 +12372,8 @@ concretizeOrCwR(AbstractInstruction * self_in_concretizeOrCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeOrCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrCwR->operands))[1]); @@ -12410,8 +12395,8 @@ concretizeOrRR(AbstractInstruction * self_in_concretizeOrRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeOrRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeOrRR->operands))[1]); @@ -12427,7 +12412,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) { sqInt aWord; sqInt aWord1; - usqIntptr_t destReg; + usqInt destReg; destReg = ((self_in_concretizePopR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12443,7 +12428,7 @@ concretizePopR(AbstractInstruction * self_in_concretizePopR) static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw) { - usqIntptr_t addressOperand; + usqInt addressOperand; sqInt aWord; sqInt aWord1; sqInt aWord2; @@ -12476,7 +12461,7 @@ concretizePushCw(AbstractInstruction * self_in_concretizePushCw) sqInt aWord1; sqInt aWord2; sqInt aWord3; - usqIntptr_t value; + usqInt value; value = ((self_in_concretizePushCw->operands))[0]; /* begin machineCodeAt:put: */ @@ -12500,7 +12485,7 @@ concretizePushR(AbstractInstruction * self_in_concretizePushR) { sqInt aWord; sqInt aWord1; - usqIntptr_t srcReg; + usqInt srcReg; srcReg = ((self_in_concretizePushR->operands))[0]; /* begin machineCodeAt:put: */ @@ -12560,8 +12545,8 @@ concretizeSubCheckOverflowCqR(AbstractInstruction * self_in_concretizeSubCheckOv sqInt aWord5; sqInt aWord6; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeSubCheckOverflowCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCheckOverflowCqR->operands))[1]); @@ -12599,8 +12584,8 @@ concretizeSubCheckOverflowRR(AbstractInstruction * self_in_concretizeSubCheckOve sqInt aWord3; sqInt aWord4; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeSubCheckOverflowRR->operands))[0]; @@ -12630,8 +12615,8 @@ concretizeSubCqR(AbstractInstruction * self_in_concretizeSubCqR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeSubCqR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCqR->operands))[1]); @@ -12652,8 +12637,8 @@ concretizeSubCwR(AbstractInstruction * self_in_concretizeSubCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeSubCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubCwR->operands))[1]); @@ -12675,8 +12660,8 @@ concretizeSubRR(AbstractInstruction * self_in_concretizeSubRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeSubRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeSubRR->operands))[1]); @@ -12691,8 +12676,8 @@ static usqInt NoDbgRegParms concretizeTstCqR(AbstractInstruction * self_in_concretizeTstCqR) { sqInt aWord; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeTstCqR->operands))[0]; leftReg = ((self_in_concretizeTstCqR->operands))[1]; @@ -12712,8 +12697,8 @@ concretizeTstCwR(AbstractInstruction * self_in_concretizeTstCwR) sqInt aWord; sqInt aWord1; sqInt aWord2; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeTstCwR->operands))[0]; leftReg = ((self_in_concretizeTstCwR->operands))[1]; @@ -12745,8 +12730,8 @@ concretizeXorCwR(AbstractInstruction * self_in_concretizeXorCwR) sqInt aWord1; sqInt aWord2; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightImm; + usqInt leftReg; + usqInt rightImm; rightImm = ((self_in_concretizeXorCwR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorCwR->operands))[1]); @@ -12768,8 +12753,8 @@ concretizeXorRR(AbstractInstruction * self_in_concretizeXorRR) { sqInt aWord; sqInt destReg; - usqIntptr_t leftReg; - usqIntptr_t rightReg; + usqInt leftReg; + usqInt rightReg; rightReg = ((self_in_concretizeXorRR->operands))[0]; destReg = (leftReg = ((self_in_concretizeXorRR->operands))[1]); @@ -13885,7 +13870,7 @@ literalAtAddressput(AbstractInstruction * self_in_literalAtAddressput, sqInt mcp pc-4 ori rx, rx, lower */ /* CogMIPSELCompiler>>#literalBeforeFollowingAddress: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress) { if ((opcodeAtAddress(self_in_literalBeforeFollowingAddress, followingAddress - 4)) == ORI) { @@ -14009,9 +13994,9 @@ nop(AbstractInstruction * self_in_nop) static AbstractInstruction * NoDbgRegParms noteFollowingConditionalBranch(AbstractInstruction * self_in_noteFollowingConditionalBranch, AbstractInstruction *branch) { - usqIntptr_t newBranchLeft; + usqInt newBranchLeft; sqInt newBranchOpcode; - usqIntptr_t newBranchRight; + usqInt newBranchRight; if ((((branch->opcode)) == JumpOverflow) || (((branch->opcode)) == JumpNoOverflow)) { @@ -14307,7 +14292,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); @@ -14443,11 +14428,11 @@ rewriteConditionalJumpLongAttarget(AbstractInstruction * self_in_rewriteConditio /* CogMIPSELCompiler>>#rewriteCPICJumpAt:target: */ static AbstractInstruction * NoDbgRegParms -rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddress) +rewriteCPICJumpAttarget(AbstractInstruction * self_in_rewriteCPICJumpAttarget, usqInt addressFollowingJump, usqInt jumpTargetAddr) { assert((opcodeAtAddress(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8)) == BNE); assert((longAt(addressFollowingJump - 4)) == (nop(self_in_rewriteCPICJumpAttarget))); - rewriteITypeBranchAtAddresstarget(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8, jumpTargetAddress); + rewriteITypeBranchAtAddresstarget(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8, jumpTargetAddr); assert((opcodeAtAddress(self_in_rewriteCPICJumpAttarget, addressFollowingJump - 8)) == BNE); assert((longAt(addressFollowingJump - 4)) == (nop(self_in_rewriteCPICJumpAttarget))); return self_in_rewriteCPICJumpAttarget; @@ -14678,7 +14663,7 @@ shRbaseoffset(AbstractInstruction * self_in_shRbaseoffset, sqInt srcReg, sqInt b static usqInt NoDbgRegParms sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) { - usqIntptr_t alignment; + usqInt alignment; if (((self_in_sizePCDependentInstructionAt->opcode)) == AlignmentNops) { (self_in_sizePCDependentInstructionAt->address) = eventualAbsoluteAddress; @@ -15643,6 +15628,18 @@ isUnannotatableConstant(CogSimStackEntry *simStackEntry) || (!(shouldAnnotateObjectReference((simStackEntry->constant))))); } + +/* Character gets mapped to zero. See inlineCacheTagForInstance:. */ + + /* CogObjectRepresentationFor32BitSpur>>#classForInlineCacheTag: */ +static sqInt NoDbgRegParms +classForInlineCacheTag(sqInt inlineCacheTag) +{ + return classOrNilAtIndex((inlineCacheTag == 0 + ? characterTag() + : inlineCacheTag)); +} + /* CogObjectRepresentationFor32BitSpur>>#genAddSmallIntegerTagsTo: */ static sqInt NoDbgRegParms genAddSmallIntegerTagsTo(sqInt aRegister) @@ -16512,6 +16509,7 @@ genPrimitiveAtPut(void) static sqInt genPrimitiveIdentityHash(void) { + AbstractInstruction *abstractInstruction; AbstractInstruction *anInstruction; AbstractInstruction *jumpImm; AbstractInstruction *jumpNotSet; @@ -16537,7 +16535,17 @@ genPrimitiveIdentityHash(void) /* begin Jump: */ genoperand(Jump, ((sqInt)ret)); jmpTarget(jumpNotSet, genoperandoperand(Label, (labelCounter += 1), bytecodePC)); - return 0; + if (!(primitiveIndex == 75)) { + return 0; + } + /* begin CallRT: */ + abstractInstruction = genoperand(Call, ceNewHashTrampoline); + (abstractInstruction->annotation = IsRelativeCall); + assert(methodOrBlockNumArgs <= (numRegArgs())); + /* begin RetN: */ + genoperand(RetN, 0); + + return UnfailingPrimitive; } @@ -17586,10 +17594,10 @@ markAndTraceCacheTagLiteralinatpc(sqInt literal, CogMethod *cogMethodOrNil, usqI } /* CogObjectRepresentationFor32BitSpur>>#numCountersFor: */ -static sqInt NoDbgRegParms +static usqInt NoDbgRegParms numCountersFor(usqInt theCounters) { - usqInt objOop; + sqInt objOop; if (theCounters == 0) { return 0; @@ -17734,13 +17742,6 @@ checkValidOopReference(sqInt anOop) || ((heapMapAtWord(pointerForOop(anOop))) != 0); } - /* CogObjectRepresentationForSpur>>#classForInlineCacheTag: */ -static sqInt NoDbgRegParms -classForInlineCacheTag(sqInt classIndex) -{ - return classOrNilAtIndex(classIndex); -} - /* CogObjectRepresentationForSpur>>#couldBeDerivedObject: */ static sqInt NoDbgRegParms couldBeDerivedObject(sqInt bodyAddress) @@ -18166,7 +18167,9 @@ generateObjectRepresentationTrampolines(void) # endif /* IMMUTABILITY */ - ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(1, "newHashTrampoline", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 1); + ceNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceNewHash", 1, ReceiverResultReg, null, null, null, (/* begin emptyRegisterMask */ + 0), 1, ReceiverResultReg, 0); + ceInlineNewHashTrampoline = genTrampolineForcallednumArgsargargargargregsToSavepushLinkRegresultRegappendOpcodes(ceNewHashOf, "ceInlineNewHash", 1, ReceiverResultReg, null, null, null, ((CallerSavedRegisterMask | (1U << ReceiverResultReg)) - (1U << ReceiverResultReg)), 1, ReceiverResultReg, 0); /* begin genStoreCheckTrampoline */ if (CheckRememberedInTrampoline) { @@ -18798,7 +18801,7 @@ genGetIdentityHashresultReg(sqInt rcvrReg, sqInt resultReg) /* begin MoveR:R: */ genoperandoperand(MoveRR, rcvrReg, resultReg); /* begin CallRT: */ - abstractInstruction = genoperand(Call, ceNewHashTrampoline); + abstractInstruction = genoperand(Call, ceInlineNewHashTrampoline); (abstractInstruction->annotation = IsRelativeCall); /* begin annotateBytecode: */ abstractInstruction1 = genoperandoperand(Label, (labelCounter += 1), bytecodePC); @@ -18812,7 +18815,7 @@ genGetIdentityHashresultReg(sqInt rcvrReg, sqInt resultReg) /* begin JumpNonZero: */ jumpSet = genConditionalBranchoperand(JumpNonZero, ((sqInt)0)); /* begin CallRT: */ - abstractInstruction2 = genoperand(Call, ceNewHashTrampoline); + abstractInstruction2 = genoperand(Call, ceInlineNewHashTrampoline); (abstractInstruction2->annotation = IsRelativeCall); /* begin annotateBytecode: */ abstractInstruction3 = genoperandoperand(MoveRR, ReceiverResultReg, resultReg); @@ -22601,7 +22604,7 @@ static sqInt NoDbgRegParms pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwardBranchAndAnnotation, char *mcpc, sqInt bcpc, void *cogMethodArg) { sqInt actualBcpc; - usqInt actualMcpc; + sqInt actualMcpc; if (!(descriptor)) { @@ -22630,7 +22633,7 @@ pcDataForAnnotationMcpcBcpcMethod(BytecodeDescriptor *descriptor, sqInt isBackwa : (bcpc + ((descriptor->numBytes))) + 1); actualMcpc = (((usqInt)mcpc)) - (((usqInt)cogMethodArg)); storePointerUncheckedofObjectwithValue(introspectionDataIndex, introspectionData, (((usqInt)actualBcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, ((actualMcpc << 1) | 1)); + storePointerUncheckedofObjectwithValue(introspectionDataIndex + 1, introspectionData, (((usqInt)actualMcpc << 1) | 1)); introspectionDataIndex += 2; } return 0; @@ -22888,7 +22891,7 @@ primitiveGeneratorOrNil(void) void recordCallOffsetIn(CogMethod *cogMethod) { - usqIntptr_t offset; + sqInt offset; sqInt *offsetTable; offset = ((primSetFunctionLabel->address)) - (((sqInt)cogMethod)); @@ -23215,7 +23218,11 @@ compileCogFullBlockMethod(sqInt numCopied) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -23291,7 +23298,11 @@ compileCogMethod(sqInt selector) numAbstractOpcodes = numberOfAbstractOpcodes; opcodeBytes = (sizeof(CogAbstractInstruction)) * numAbstractOpcodes; fixupBytes = (sizeof(CogBytecodeFixup)) * numAbstractOpcodes; + + /* Document the fact that the MaxStackAllocSize ensures that the number of abstract + opcodes fits in a 16 bit integer (e.g. CogBytecodeFixup's instructionIndex). */ allocBytes = opcodeBytes + fixupBytes; + assert((((sizeof(CogAbstractInstruction)) + (sizeof(CogBytecodeFixup))) * 49152) > MaxStackAllocSize); if (allocBytes > MaxStackAllocSize) { return ((CogMethod *) MethodTooBig); @@ -23552,6 +23563,18 @@ compileFullBlockMethodFrameBuild(sqInt numCopied) } } + +/* Return the default number of bytes to allocate for native code at startup. + The actual value can be set via vmParameterAt: and/or a preference in the + ini file. */ + + /* SistaCogit>>#defaultCogCodeSize */ +sqInt +defaultCogCodeSize(void) +{ + return 2 * (1024 * 1536); +} + /* SistaCogit>>#fillInCounters:atStartAddress: */ static void NoDbgRegParms fillInCountersatStartAddress(sqInt nCounters, sqInt startAddress) @@ -24286,7 +24309,8 @@ genCounterTripOnlyJumpIfto(sqInt boolean, sqInt targetBytecodePC) sqInt quickConstant; extA = 0; - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); popToReg(ssTop(), TempReg); ssPop(1); @@ -24367,7 +24391,8 @@ genExtJumpIfNotInstanceOfBehaviorsBytecode(void) reg = allocateRegForStackEntryAtnotConflictingWith(0, 0); popToReg(ssTop(), reg); ssPop(1); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); literal = getLiteral((extA * 256) + byte1); if ((inverse = extB < 0)) { extB += 128; @@ -24697,7 +24722,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor1->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg1, !unforwardRcvr1, argReg1, rcvrReg1, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); /* begin Label */ label = genoperandoperand(Label, (labelCounter += 1), bytecodePC); /* begin genCmpArgIsConstant:rcvrIsConstant:argReg:rcvrReg: */ @@ -24876,7 +24902,8 @@ genForwardersInlinedIdenticalOrNotIf(sqInt orNot) || ((branchDescriptor->isBranchFalse)))) { return genIdenticalNoBranchArgIsConstantrcvrIsConstantargRegrcvrRegorNotIf(!unforwardArg, !unforwardRcvr, argReg, rcvrReg, orNot); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); if (unforwardArg) { genEnsureOopInRegNotForwardedscratchReg(argReg, TempReg); } @@ -25108,7 +25135,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) /* In optimized code we don't generate counters to improve performance */ if (isOptimizedMethod(methodObj)) { eventualTarget1 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc1 = ssTop(); ssPop(1); if ((((desc1->type)) == SSConstant) @@ -25181,7 +25209,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) nextDescriptor = generatorAt((fetchByteofObject(nextPC, methodObj)) + bytecodeSetOffset); if (((nextDescriptor->generator)) == genPushConstantTrueBytecode) { eventualTarget2 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc2 = ssTop(); ssPop(1); if ((((desc2->type)) == SSConstant) @@ -25248,7 +25277,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) nextDescriptor = generatorAt((fetchByteofObject(targetBytecodePC, methodObj)) + bytecodeSetOffset); if (((nextDescriptor->generator)) == genPushConstantFalseBytecode) { eventualTarget3 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc3 = ssTop(); ssPop(1); if ((((desc3->type)) == SSConstant) @@ -25322,7 +25352,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) && ((((desc->constant)) == (trueObject())) || (((desc->constant)) == (falseObject())))) { eventualTarget4 = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); desc4 = ssTop(); ssPop(1); if ((((desc4->type)) == SSConstant) @@ -25387,7 +25418,8 @@ genJumpIfto(sqInt boolean, sqInt targetBytecodePC) return 0; } eventualTarget = eventualTargetOf(targetBytecodePC); - ssFlushTo(simStackPtr - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 1, simNativeStackPtr); popToReg(desc, TempReg); ssPop(1); ssAllocateRequiredReg(SendNumArgsReg); @@ -25552,7 +25584,8 @@ genSpecialSelectorComparison(void) if (isOptimizedMethod(methodObj)) { return genSpecialSelectorComparisonWithoutCounters(); } - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -25732,7 +25765,8 @@ genSpecialSelectorComparisonWithoutCounters(void) sqInt targetBytecodePC; sqInt targetPC; - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); primDescriptor = generatorAt(byte0); argIsIntConst = ((((ssTop())->type)) == SSConstant) && ((((argInt = ((ssTop())->constant))) & 1)); @@ -26051,7 +26085,8 @@ genUnconditionalTrapBytecode(void) AbstractInstruction *abstractInstruction; AbstractInstruction *abstractInstruction1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin CallRT: */ abstractInstruction = genoperand(Call, ceTrapTrampoline); (abstractInstruction->annotation = IsRelativeCall); @@ -26336,9 +26371,9 @@ picDataForBlockEntryMethod(sqInt blockEntryMcpc, sqInt cogMethod) static sqInt NoDbgRegParms picDataForCounterat(unsigned int counter, sqInt bcpc) { - unsigned int executedCount; + int executedCount; sqInt tuple; - unsigned int untakenCount; + int untakenCount; tuple = eeInstantiateClassIndexformatnumSlots(ClassArrayCompactIndex, arrayFormat(), 3); if (tuple == 0) { @@ -26348,8 +26383,8 @@ picDataForCounterat(unsigned int counter, sqInt bcpc) executedCount = initialCounterValue - (((usqInt) counter) >> 16); untakenCount = initialCounterValue - (counter & 0xFFFF); storePointerUncheckedofObjectwithValue(0, tuple, (((usqInt)bcpc << 1) | 1)); - storePointerUncheckedofObjectwithValue(1, tuple, ((executedCount << 1) | 1)); - storePointerUncheckedofObjectwithValue(2, tuple, ((untakenCount << 1) | 1)); + storePointerUncheckedofObjectwithValue(1, tuple, (((usqInt)executedCount << 1) | 1)); + storePointerUncheckedofObjectwithValue(2, tuple, (((usqInt)untakenCount << 1) | 1)); return tuple; } @@ -26695,7 +26730,7 @@ populatewithPICInfoForfirstCacheTag(sqInt tuple, CogMethod *cPIC, sqInt firstCac { sqInt cacheTag; sqInt classOop; - usqInt entryPoint; + sqInt entryPoint; sqInt i; sqInt pc; CogMethod *targetMethod; @@ -26726,6 +26761,41 @@ populatewithPICInfoForfirstCacheTag(sqInt tuple, CogMethod *cPIC, sqInt firstCac } } + /* SistaMethodZone>>#getCogCodeZoneThreshold */ +double +getCogCodeZoneThreshold(void) +{ + return thresholdRatio; +} + + /* SistaMethodZone>>#manageFrom:to: */ +static void NoDbgRegParms +manageFromto(sqInt theStartAddress, sqInt theLimitAddress) +{ + mzFreeStart = (baseAddress = theStartAddress); + youngReferrers = (limitAddress = theLimitAddress); + openPICList = null; + methodBytesFreedSinceLastCompaction = 0; + methodCount = 0; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; +} + + /* SistaMethodZone>>#setCogCodeZoneThreshold: */ +sqInt +setCogCodeZoneThreshold(double ratio) +{ + /* send of break elided */; + if (!((ratio >= 0.1) + && (ratio <= 1.0))) { + return PrimErrBadArgument; + } + thresholdRatio = ratio; + /* begin computeAllocationThreshold */ + allocationThreshold = ((((((usqInt)((limitAddress - baseAddress) * thresholdRatio))) + (8 - 1)) & ~7)) + baseAddress; + return 0; +} + /* Add a blockStart for an embedded block. For a binary tree walk block dispatch blocks must be compiled in pc/depth-first order but are scanned @@ -27022,7 +27092,7 @@ compileBlockBodies(void) inBlock = InVanillaBlock; compiledBlocksCount = 0; while (compiledBlocksCount < blockCount) { - blockPass = 1; + compilationPass = 1; blockStart = blockStartAt(compiledBlocksCount); if (((result = scanBlock(blockStart))) < 0) { return result; @@ -27040,8 +27110,8 @@ compileBlockBodies(void) assert((initialStackPtr > simStackPtr) || (deadCode)); - /* for asserts :-( */ - blockPass += 1; + /* for asserts */ + compilationPass += 1; (blockStart->numInitialNils = (((blockStart->numInitialNils)) + simStackPtr) - initialStackPtr); (((blockStart->fakeHeader))->dependent = null); reinitializeFixupsFromthrough(((blockStart->startpc)) + ((blockStart->numInitialNils)), (((blockStart->startpc)) + ((blockStart->span))) - 1); @@ -28388,7 +28458,8 @@ genJumpBackTo(sqInt targetBytecodePC) void *jumpTarget; void *jumpTarget1; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -28419,7 +28490,8 @@ genJumpTo(sqInt targetBytecodePC) { void *jumpTarget; - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* can't fall through */ deadCode = 1; @@ -28985,7 +29057,8 @@ genPushNewArrayBytecode(void) assert(needsFrame); voidReceiverResultRegContainsSelf(); if ((popValues = byte1 > 0x7F)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } else { ssAllocateCallRegand(SendNumArgsReg, ReceiverResultReg); @@ -29271,7 +29344,8 @@ genSpecialSelectorArithmetic(void) return genSpecialSelectorSend(); } if (argIsInt) { - ssFlushTo(simStackPtr - 2); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - 2, simNativeStackPtr); popToReg(ssValue(1), ReceiverResultReg); ssPop(2); } @@ -29508,7 +29582,8 @@ genStorePopLiteralVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolean if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, ValueIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -29579,7 +29654,8 @@ genStorePopMaybeContextReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqI ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -29652,7 +29728,8 @@ genStorePopMaybeContextRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCh ssPush(1); genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); /* begin checkQuickConstant:forInstruction: */ anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg); /* begin CallRT: */ @@ -29689,7 +29766,8 @@ genStorePopReceiverVariableneedsStoreCheckneedsImmutabilityCheck(sqInt popBoolea if (needsImmCheck1) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck1, 1); } @@ -29714,7 +29792,8 @@ genStorePopRemoteInstVarofObjectAtneedsStoreCheckneedsImmutabilityCheck(sqInt po if (needsImmCheck) { ssAllocateRequiredReg(ClassReg); ssStoreAndReplacePoptoReg(popBoolean, ClassReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); return genStoreWithImmutabilityCheckSourceRegslotIndexdestRegscratchRegneedsStoreCheckneedRestoreRcvr(ClassReg, slotIndex, ReceiverResultReg, TempReg, needsStoreCheck, 0); } @@ -29856,19 +29935,18 @@ genUpArrowReturn(void) proper instruction. */ /* StackToRegisterMappingCogit>>#initializeFixupAt: */ -static BytecodeFixup * NoDbgRegParms +static void NoDbgRegParms initializeFixupAt(sqInt targetPC) { - BytecodeFixup *fixup; + BytecodeFixup * fixup; /* begin fixupAt: */ fixup = fixupAtIndex(targetPC - initialPC); - /* begin becomeMergeFixup */ + /* begin initializeFixup: */ (fixup->targetInstruction) = ((AbstractInstruction *) NeedsMergeFixupFlag); /* begin setIsBackwardBranchFixup */ (fixup->simStackPtr) = UnknownSimStackPtrFlag; - return fixup; -} + } /* StackToRegisterMappingCogit>>#initSimStackForFramefulMethod: */ static void NoDbgRegParms @@ -30042,7 +30120,8 @@ marshallSendArguments(sqInt numArgs) CogSimStackEntry * cascade0; sqInt numSpilled; - ssFlushTo((simStackPtr - numArgs) - 1); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo((simStackPtr - numArgs) - 1, simNativeStackPtr); if (numArgs > 2) { /* If there are no spills and no references to ReceiverResultReg @@ -30052,7 +30131,8 @@ marshallSendArguments(sqInt numArgs) anyRefs = anyReferencesToRegisterinTopNItems(ReceiverResultReg, numArgs + 1); if ((numSpilled > 0) || (anyRefs)) { - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); storeToReg(simStackAt(simStackPtr - numArgs), ReceiverResultReg); } else { @@ -30060,7 +30140,8 @@ marshallSendArguments(sqInt numArgs) storeToReg(cascade0, ReceiverResultReg); (cascade0->type = SSRegister); (cascade0->registerr = ReceiverResultReg); - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } } else { @@ -30099,7 +30180,7 @@ maybeCompilingFirstPassOfBlockWithInitialPushNil(void) { return (inBlock == InVanillaBlock) && ((methodOrBlockNumTemps > methodOrBlockNumArgs) - && (blockPass == 1)); + && (compilationPass == 1)); } @@ -30164,7 +30245,8 @@ mergeWithFixupIfRequired(BytecodeFixup *fixup) else { /* case 4 */ - ssFlushTo(simStackPtr); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr, simNativeStackPtr); } deadCode = 0; if (((fixup->simStackPtr)) == UnknownSimStackPtrFlag) { @@ -30297,8 +30379,7 @@ reinitializeFixupsFromthrough(sqInt start, sqInt end) while (pc <= end) { /* begin reinitialize */ self_in_reinitialize = fixupAtIndex(pc - initialPC); - (self_in_reinitialize->targetInstruction) = 0; - (self_in_reinitialize->simStackPtr) = 0; + (self_in_reinitialize->targetInstruction) = ((self_in_reinitialize->simStackPtr) = 0); byte0 = (fetchByteofObject(pc, methodObj)) + bytecodeSetOffset; descriptor = generatorAt(byte0); if ((isBranch(descriptor)) @@ -30650,13 +30731,6 @@ ssAllocateRequiredRegupThrough(sqInt requiredReg, sqInt stackPtr) ssAllocateRequiredRegMaskupThrough(1U << requiredReg, stackPtr); } - /* StackToRegisterMappingCogit>>#ssFlushTo: */ -static void NoDbgRegParms -ssFlushTo(sqInt index) -{ - ssFlushTonativeFlushTo(index, simNativeStackPtr); -} - /* StackToRegisterMappingCogit>>#ssFlushTo:nativeFlushTo: */ static void NoDbgRegParms ssFlushTonativeFlushTo(sqInt index, sqInt nativeIndex) @@ -30698,7 +30772,8 @@ ssFlushUpThroughReceiverVariable(sqInt slotIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == ReceiverResultReg) && ((((simStackAt(index))->offset)) == (slotOffsetOfInstVarIndex(slotIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -30722,7 +30797,8 @@ ssFlushUpThroughTemporaryVariable(sqInt tempIndex) if (((((simStackAt(index))->type)) == SSBaseOffset) && (((((simStackAt(index))->registerr)) == FPReg) && ((((simStackAt(index))->offset)) == (frameOffsetOfTemporary(tempIndex))))) { - ssFlushTo(index); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(index, simNativeStackPtr); goto l1; } } @@ -31017,6 +31093,7 @@ voidReceiverResultRegContainsSelf(void) } } if (spillIndex > 0) { - ssFlushTo(simStackPtr - spillIndex); + /* begin ssFlushTo: */ + ssFlushTonativeFlushTo(simStackPtr - spillIndex, simNativeStackPtr); } } diff --git a/spursistasrc/vm/cointerp.c b/spursistasrc/vm/cointerp.c index 837dcaff0..3392ef882 100644 --- a/spursistasrc/vm/cointerp.c +++ b/spursistasrc/vm/cointerp.c @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -729,6 +729,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -900,9 +901,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1163,8 +1164,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1232,6 +1233,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1326,14 +1328,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1458,6 +1461,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1634,8 +1638,8 @@ _iss usqInt instructionPointer; _iss usqInt newMethod; _iss sqInt messageSelector; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt needGCFlag; @@ -1703,6 +1707,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1711,7 +1716,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1738,6 +1742,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1752,11 +1758,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1791,6 +1795,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1813,7 +1818,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1844,6 +1848,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1859,6 +1864,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2471,7 +2479,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5074,7 +5082,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l774; + goto l773; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5122,10 +5130,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l801; + goto l800; } ourContext = marryFrameSP(localFP, localSP); - l801: /* end ensureFrameIsMarried:SP: */; + l800: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5134,7 +5142,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l774; + goto l773; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5143,10 +5151,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l794; + goto l793; } ourContext1 = marryFrameSP(localFP, localSP); - l794: /* end ensureFrameIsMarried:SP: */; + l793: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5157,7 +5165,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l774; + goto l773; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -5209,10 +5217,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l787; + goto l786; } ourContext2 = marryFrameSP(localFP, localSP); - l787: /* end ensureFrameIsMarried:SP: */; + l786: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5221,7 +5229,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l774; + goto l773; } } assert(pageListIsWellFormed()); @@ -5326,11 +5334,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l784; + goto l783; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l784: /* end maybeReturnToMachineCodeFrame */; + l783: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5345,7 +5353,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l774: /* end case */; + l773: /* end case */; break; case 121: case 345: /*89*/ @@ -5464,27 +5472,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l812; + goto l811; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l812; + goto l811; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l812: /* end findFrameAbove:inPage: */; + l811: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l807; + goto l806; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l807: /* end newStackPage */; + l806: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5507,7 +5515,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l803; + goto l802; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5543,7 +5551,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l803; + goto l802; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5561,7 +5569,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l803; + goto l802; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5586,7 +5594,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l803; + goto l802; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5604,7 +5612,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l803: /* end case */; + l802: /* end case */; break; case 126: case 127: @@ -5638,10 +5646,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l813; + goto l812; } ourContext = marryFrameSP(theFP, theSP); - l813: /* end ensureFrameIsMarried:SP: */; + l812: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6085,12 +6093,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l831; + goto l830; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l831: /* end classAtIndex: */; + l830: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6111,7 +6119,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l815; + goto l814; } /* second probe */ @@ -6121,7 +6129,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l815; + goto l814; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6129,10 +6137,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l815; + goto l814; } ok = 0; - l815: /* end inlineLookupInMethodCacheSel:classTag: */; + l814: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6204,7 +6212,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l832; + goto l831; } } /* begin classAtIndex: */ @@ -6217,12 +6225,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l824; + goto l823; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l824: /* end classAtIndex: */; + l823: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6234,7 +6242,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l832: /* end internalFindNewMethodOrdinary */; + l831: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6247,28 +6255,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l836; + goto l835; } if (localPrimIndex == 256) { - goto l836; + goto l835; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l836; + goto l835; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l836; + goto l835; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l836; + goto l835; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l836; + goto l835; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6330,7 +6338,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l836; + goto l835; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6410,11 +6418,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l829; + goto l828; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l829: /* end getErrorObjectFromPrimFailCode */; + l828: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6438,7 +6446,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l836: /* end internalExecuteNewMethod */; + l835: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6886,18 +6894,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7013,7 +7025,7 @@ interpret(void) case 138: /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7238,7 +7250,7 @@ interpret(void) goto l147; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l147; } if (fmt >= (firstShortFormat())) { @@ -7253,14 +7265,14 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -7758,7 +7770,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -8469,7 +8481,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l850; + goto l848; } if (bytecode == 172) { @@ -8478,7 +8490,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l850; + goto l848; } if (bytecode > 167) { @@ -8488,7 +8500,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l850; + goto l848; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8496,7 +8508,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l850: /* end case */; + l848: /* end case */; break; case 179: /* bytecodePrimGreaterThan */ @@ -8607,7 +8619,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l853; + goto l851; } if (bytecode == 172) { @@ -8617,14 +8629,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l853; + goto l851; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l853: /* end case */; + l851: /* end case */; break; case 180: /* bytecodePrimLessOrEqual */ @@ -9268,7 +9280,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -10617,7 +10629,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l854; + goto l852; } if (bytecode == 239) { @@ -10626,7 +10638,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l854; + goto l852; } if (bytecode == 238) { @@ -10636,7 +10648,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l854; + goto l852; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10644,7 +10656,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l854: /* end case */; + l852: /* end case */; break; case 355: /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -10755,7 +10767,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l857; + goto l855; } if (bytecode == 239) { @@ -10765,14 +10777,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l857; + goto l855; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l857: /* end case */; + l855: /* end case */; break; case 356: /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -11416,7 +11428,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -12228,10 +12240,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l859; + goto l857; } ourContext = marryFrameSP(theFP, theSP); - l859: /* end ensureFrameIsMarried:SP: */; + l857: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -12463,7 +12475,7 @@ interpret(void) case 487: /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -12612,6 +12624,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l603; } @@ -13490,7 +13503,7 @@ interpret(void) goto l687; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l687; } if (fmt >= (firstShortFormat())) { @@ -13505,14 +13518,14 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -13914,7 +13927,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -13953,7 +13966,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -13965,10 +13977,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l725; + goto l715; } context = marryFrameSP(theFP, theSP); - l725: /* end ensureFrameIsMarried:SP: */; + l715: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -13996,13 +14008,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l719; + goto l724; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l719: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l724: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14060,7 +14072,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14085,10 +14097,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l735; + goto l734; } context = marryFrameSP(theFP, theSP); - l735: /* end ensureFrameIsMarried:SP: */; + l734: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14116,13 +14128,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l731; + goto l730; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l731: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l730: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14242,11 +14254,11 @@ interpret(void) value = result; } object2 = value; - goto l741; + goto l740; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l741; + goto l740; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14269,7 +14281,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l741; + goto l740; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -14277,24 +14289,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l741; + goto l740; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l741; + goto l740; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); - goto l741; + goto l740; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l741; + goto l740; } error("bad index"); object2 = 0; - l741: /* end instVar:ofContext: */; + l740: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -14398,7 +14410,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l753; + goto l752; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14419,7 +14431,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l753; + goto l752; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14452,7 +14464,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l753: /* end instVar:ofContext:put: */; + l752: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -14470,7 +14482,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l756; + goto l755; } # endif /* IMMUTABILITY */ @@ -14490,7 +14502,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l756: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l755: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -14589,7 +14601,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l763; + goto l762; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14610,7 +14622,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l763; + goto l762; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14643,7 +14655,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l763: /* end instVar:ofContext:put: */; + l762: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -14661,7 +14673,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l766; + goto l765; } # endif /* IMMUTABILITY */ @@ -14681,7 +14693,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l766: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l765: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -14731,7 +14743,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l767; + goto l766; } } if (!inverse) { @@ -14740,7 +14752,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l767; + goto l766; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -14749,7 +14761,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l767: /* end case */; + l766: /* end case */; break; } } @@ -15426,7 +15438,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -15448,10 +15459,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -15994,8 +16005,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -16016,8 +16028,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -16324,13 +16337,13 @@ ceCounterTripped(sqInt condition) resetCountersIn(mframeHomeMethod(GIV(framePointer))); return condition; } - addNewMethodToCache(classObj); } if ((primitiveFunctionPointer != 0) || ((argumentCountOfMethodHeader(methodHeaderOf(GIV(newMethod)))) != 1)) { resetCountersIn(mframeHomeMethod(GIV(framePointer))); return condition; } + setCogCodeZoneThreshold(1.0); /* begin splObj:put: */ assert(!(isForwarded(GIV(specialObjectsOop)))); if ((assert(isNonImmediate(GIV(specialObjectsOop))), @@ -16541,6 +16554,8 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) sqInt ceNewHashOf(sqInt anObject) { + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); return (((usqInt)(newHashBitsOf(anObject)) << 1) | 1); } @@ -16814,8 +16829,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -16974,7 +16990,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17091,7 +17106,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17334,7 +17348,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -17464,18 +17477,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -17560,7 +17577,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -17926,7 +17942,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -18910,7 +18926,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -19024,7 +19040,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) numArgs = ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory()) ? ((mframeCogMethod(theFP))->cmNumArgs) : byteAt((theFP + FoxIFrameFlags) + 1)); - offset = ((sqInt) ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))))); + offset = (FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))); oop = longAt(theFP + offset); if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -19994,7 +20010,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -20597,18 +20613,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -20631,11 +20648,12 @@ mnuMethodOrNilFor(sqInt rcvr) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt currentClass; sqInt dictionary; + sqInt fieldIndex; sqInt hash; sqInt hash1; - sqInt index; + usqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -20692,7 +20710,7 @@ mnuMethodOrNilFor(sqInt rcvr) wrapAround = 0; while (1) { /* begin fetchPointer:ofObject: */ - nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); + nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord()))); if (nextSelector == GIV(nilObj)) { mnuMethod = null; goto l15; @@ -20710,10 +20728,12 @@ mnuMethodOrNilFor(sqInt rcvr) } methodArray = objOop2; /* begin followField:ofObject: */ - objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord()))))); + fieldIndex = index - SelectorStart; + /* begin fetchPointer:ofObject: */ + objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (((objOop1 & (tagMask())) == 0) && (((longAt(objOop1)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1); + objOop1 = fixFollowedFieldofObjectwithInitialValue(fieldIndex, methodArray, objOop1); } mnuMethod = objOop1; goto l15; @@ -21024,7 +21044,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -21089,7 +21109,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -21152,8 +21172,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -21271,7 +21291,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -21726,7 +21746,7 @@ printFrameWithSP(char *theFP, char *theSP) char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - sqInt theMethodEnd; + usqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -22212,7 +22232,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -22366,6 +22386,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -22566,6 +22589,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -22813,15 +22837,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -22878,6 +22914,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -22890,8 +22927,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -23067,6 +23106,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -23416,7 +23456,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -23508,7 +23548,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -23898,8 +23938,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -24072,6 +24113,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -24392,8 +24434,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -24401,14 +24442,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -24437,8 +24478,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -24446,14 +24486,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -24484,8 +24524,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -24493,14 +24532,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -26274,8 +26313,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -26283,14 +26321,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -26314,8 +26352,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -26323,14 +26360,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l21; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -26356,8 +26393,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -26365,14 +26401,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -26395,6 +26431,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -26847,16 +26884,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -26897,7 +26934,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -27052,7 +27089,7 @@ noInlineSigned32BitValueGutsOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -27442,7 +27479,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -27480,7 +27516,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -28241,8 +28277,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28421,8 +28457,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28603,7 +28639,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -28788,8 +28824,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29188,7 +29224,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -29282,8 +29318,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -29511,7 +29547,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -29778,7 +29814,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30042,7 +30078,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -30478,7 +30514,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -30488,7 +30524,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -30499,7 +30535,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -30516,7 +30552,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -30528,8 +30564,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -30547,7 +30582,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -30665,7 +30700,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -31266,8 +31301,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -31333,7 +31368,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -31391,7 +31426,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -32119,8 +32154,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -32128,14 +32162,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -32160,8 +32194,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -32169,14 +32202,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -32203,8 +32236,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -32212,14 +32244,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -32251,7 +32283,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -32465,7 +32497,7 @@ primitiveFullClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32731,7 +32763,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32994,7 +33026,7 @@ primitiveFullClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -33318,6 +33350,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -33550,7 +33629,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -33736,7 +33815,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -33911,7 +33990,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -34055,7 +34134,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - sqInt value; + usqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -34074,7 +34153,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 1) | 1)); GIV(stackPointer) = sp; } @@ -35003,7 +35082,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -35239,7 +35318,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -35549,7 +35628,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -35643,7 +35722,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -35704,7 +35783,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -35848,8 +35927,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -35857,18 +35935,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -35891,8 +35969,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -35900,18 +35977,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -35923,8 +36000,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -35932,22 +36008,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -36171,7 +36247,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -36187,28 +36263,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = ((usqInt) numSlots2) >> 1; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ setIsMarkedOfto(stack, 1); current = GIV(specialObjectsOop); @@ -36223,28 +36299,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots3) >> 1; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -36254,7 +36330,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -36264,7 +36339,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -36303,7 +36377,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & 1) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -36325,7 +36399,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -36362,28 +36436,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots) >> 1; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -36398,13 +36472,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 1); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -37387,7 +37461,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -37448,7 +37522,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -38676,7 +38750,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -39784,8 +39858,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -39793,14 +39866,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39825,8 +39898,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -39834,14 +39906,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -39868,8 +39940,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -39877,14 +39948,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -40143,7 +40214,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -40390,8 +40461,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40399,14 +40469,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40427,8 +40497,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40436,14 +40505,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40466,8 +40535,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40475,14 +40543,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -40625,18 +40693,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1))) != 7)) { return 0; @@ -40707,8 +40779,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41116,9 +41187,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -41293,7 +41364,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -41362,7 +41433,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -41458,7 +41529,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -41474,7 +41545,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -41485,7 +41556,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -41939,8 +42010,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41948,14 +42018,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41978,8 +42048,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -41987,14 +42056,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -42040,8 +42109,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42049,14 +42117,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -42180,16 +42248,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; unsigned int header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -42219,12 +42286,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -42263,7 +42329,6 @@ copyAndForward(sqInt survivor) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -42309,12 +42374,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -42349,12 +42413,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -42552,7 +42616,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -43066,7 +43130,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -43082,8 +43146,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43537,8 +43600,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43546,14 +43608,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43579,8 +43641,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -43588,14 +43649,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43610,8 +43671,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -43619,14 +43679,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -44000,7 +44060,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -44008,7 +44068,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -44019,8 +44079,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44061,8 +44120,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44070,14 +44128,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44116,8 +44174,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -44164,8 +44221,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44173,14 +44229,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -44229,8 +44285,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -44238,14 +44293,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44291,8 +44346,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -44346,8 +44400,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -44355,14 +44408,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -44421,7 +44474,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -44438,7 +44491,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -44538,8 +44591,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44575,8 +44627,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44584,14 +44635,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44628,8 +44679,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -44637,14 +44687,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44674,8 +44724,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44683,14 +44732,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -44801,8 +44850,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44810,14 +44858,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44841,8 +44889,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44850,14 +44897,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -44883,8 +44930,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44892,14 +44938,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -44941,8 +44987,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44950,14 +44995,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -46045,8 +46090,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46054,14 +46098,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46106,8 +46150,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46115,14 +46158,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46202,8 +46245,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46211,14 +46253,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -46374,12 +46416,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46422,8 +46464,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46431,14 +46472,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46489,12 +46530,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46537,8 +46578,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46546,14 +46586,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46647,12 +46687,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -46712,8 +46752,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46721,14 +46760,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -46778,7 +46817,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -46819,7 +46858,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -47413,8 +47452,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47422,14 +47460,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -47855,8 +47893,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47864,14 +47901,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47903,8 +47940,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -47912,14 +47948,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47953,8 +47989,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -47962,14 +47997,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -48255,7 +48290,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -48511,8 +48545,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48520,14 +48553,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48550,8 +48583,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48559,14 +48591,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -48802,8 +48834,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48811,14 +48842,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48851,8 +48882,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48860,14 +48890,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48902,8 +48932,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48911,14 +48940,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -48998,8 +49027,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49007,14 +49035,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49044,8 +49072,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -49053,14 +49080,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49092,8 +49119,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49101,14 +49127,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49668,7 +49694,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -49993,8 +50019,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -50002,14 +50027,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50032,8 +50057,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -50041,14 +50065,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50073,8 +50097,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -50082,14 +50105,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -50147,7 +50170,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -50155,7 +50178,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -50194,10 +50217,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -50248,8 +50271,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -50257,14 +50279,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -50301,11 +50323,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -51769,8 +51791,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -51792,8 +51813,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51837,7 +51857,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop1 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -51845,7 +51865,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex1 & TopHashBit) { if ((classIndex1 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex1 - TopHashBit)) << (shiftForWord()))))); @@ -51853,7 +51873,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } else { @@ -51861,11 +51881,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex1 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) { @@ -51875,7 +51895,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -51883,11 +51903,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } } assert(!(isOopForwarded(objOop1))); @@ -51900,8 +51920,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -51909,17 +51928,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l22; + goto l23; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l26: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -51943,7 +51962,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -51960,7 +51979,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -51981,8 +52000,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -51990,17 +52008,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -52008,8 +52026,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52017,17 +52034,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -52047,7 +52064,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop2)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -52107,8 +52123,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -52116,14 +52131,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l33; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l33: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -52249,8 +52264,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -52258,14 +52272,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -52295,8 +52309,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52304,14 +52317,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52334,8 +52347,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52343,14 +52355,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -52456,8 +52468,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -52465,14 +52476,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52526,8 +52537,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52535,14 +52545,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -52598,8 +52608,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -52607,14 +52616,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -52646,7 +52655,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -52755,7 +52764,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52781,7 +52790,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52806,7 +52815,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52832,7 +52841,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52855,8 +52864,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52864,14 +52872,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -53351,7 +53359,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -53593,7 +53601,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -53966,8 +53974,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54003,7 +54010,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -54018,7 +54025,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -54282,8 +54289,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54305,8 +54311,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54329,8 +54334,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -54351,8 +54355,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -54430,8 +54433,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54439,14 +54441,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54468,8 +54470,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54477,14 +54478,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -54509,8 +54510,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54518,14 +54518,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -54634,8 +54634,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54721,8 +54720,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54730,14 +54728,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -54772,8 +54770,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -54781,14 +54778,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54816,8 +54813,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54825,14 +54821,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -54975,8 +54971,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55465,8 +55460,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55474,14 +55468,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55512,8 +55506,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55521,14 +55514,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55561,8 +55554,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55570,14 +55562,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55681,8 +55673,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55690,14 +55681,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55735,8 +55726,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55744,14 +55734,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55791,8 +55781,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55800,14 +55789,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55933,8 +55922,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55942,14 +55930,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55979,8 +55967,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55988,14 +55975,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56018,8 +56005,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56027,14 +56013,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56110,8 +56096,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56119,14 +56104,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56154,8 +56139,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56163,14 +56147,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -56193,8 +56177,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56202,14 +56185,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -56555,8 +56538,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56564,14 +56546,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56601,8 +56583,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56610,14 +56591,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56640,8 +56621,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56649,14 +56629,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56782,8 +56762,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56791,14 +56770,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56827,8 +56806,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56836,14 +56814,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56874,8 +56852,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56883,14 +56860,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56973,8 +56950,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56982,14 +56958,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57025,8 +57001,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57034,14 +57009,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57079,8 +57054,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57088,14 +57062,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57179,8 +57153,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57188,14 +57161,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57225,8 +57198,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -57234,14 +57206,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57264,8 +57236,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57273,14 +57244,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57490,8 +57461,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57499,14 +57469,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57534,8 +57504,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -57543,14 +57512,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57571,8 +57540,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57580,14 +57548,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57662,13 +57630,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57676,15 +57644,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57701,7 +57669,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57725,8 +57693,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -57734,14 +57701,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57762,13 +57729,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57776,15 +57743,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57801,7 +57768,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57825,8 +57792,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57834,14 +57800,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57863,13 +57829,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -57877,15 +57843,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -57902,7 +57868,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -57927,8 +57893,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57936,14 +57901,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58354,7 +58319,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -58364,8 +58328,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -58416,7 +58379,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -58609,6 +58572,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -58724,7 +58697,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -58741,7 +58714,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -58765,7 +58738,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -58782,7 +58755,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -58848,8 +58821,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59012,7 +58984,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -59694,11 +59666,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -59713,7 +59685,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -59727,8 +59699,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59736,16 +59707,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -59769,8 +59740,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59778,14 +59748,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -59805,16 +59775,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -59823,11 +59793,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -59835,7 +59805,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -59903,8 +59873,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -59912,14 +59881,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -60018,8 +59987,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60039,8 +60007,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -60048,14 +60015,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -60113,8 +60080,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60191,7 +60157,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -60213,7 +60179,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -60262,7 +60228,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -60276,8 +60242,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60285,16 +60250,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -60359,8 +60324,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60368,14 +60332,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -60394,9 +60358,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -60412,9 +60373,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -60442,9 +60402,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -60455,8 +60414,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60466,9 +60424,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -60526,7 +60483,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -60601,8 +60558,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60658,8 +60614,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60667,14 +60622,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -60737,8 +60692,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60746,14 +60700,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -60870,8 +60824,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60879,14 +60832,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -60926,7 +60879,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -61092,13 +61045,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l66; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l66: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l65; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -61106,15 +61059,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l65; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l65; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l65; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -61131,7 +61084,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals1 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l65: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -61158,8 +61111,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -61167,14 +61119,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -61186,7 +61138,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -61199,13 +61151,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -61213,15 +61165,15 @@ updatePointers(void) numPointerSlots2 = (numSlots5 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots5); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -61238,7 +61190,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals2 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -61266,8 +61218,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots22 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots22 + (numSlots22 & 1)) << (shiftForWord()); @@ -61275,16 +61226,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l39; + goto l40; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l39: /* end objectAfter:limit: */; + l40: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -61325,13 +61276,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -61339,15 +61290,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -61364,7 +61315,7 @@ updatePointers(void) assert((header4 & 1)); numLiterals3 = ((header4 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -61401,8 +61352,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -61437,7 +61387,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -61450,8 +61400,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -61459,18 +61408,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -61493,13 +61442,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -61507,15 +61456,15 @@ updatePointers(void) numPointerSlots = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -61532,7 +61481,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i = 0; i < numPointerSlots; i += 1) { /* begin fetchPointer:ofObject: */ oop = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))); @@ -61561,8 +61510,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61570,14 +61518,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } } @@ -61779,8 +61727,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61788,14 +61735,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -61880,7 +61827,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -61980,8 +61927,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -62148,7 +62095,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -62264,8 +62211,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -62273,24 +62219,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -62353,8 +62299,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -62583,8 +62529,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); @@ -62985,8 +62931,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -62994,14 +62939,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63022,8 +62967,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -63031,14 +62975,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -63061,8 +63005,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -63070,14 +63013,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -63792,7 +63735,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -63802,7 +63745,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -63890,9 +63833,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -63998,6 +63941,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -64619,8 +64591,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -64628,14 +64599,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -64687,8 +64658,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -64696,14 +64666,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64757,8 +64727,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -64766,20 +64735,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -64812,8 +64781,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64821,14 +64789,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64853,8 +64821,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -64862,14 +64829,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64896,8 +64863,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -64905,16 +64871,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -65039,8 +65005,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -65114,8 +65081,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -65205,8 +65173,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66554,8 +66523,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -67627,7 +67597,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67804,7 +67774,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67974,7 +67944,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68138,11 +68108,12 @@ lookupSelectorinClass(sqInt selector, sqInt class) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt currentClass; sqInt dictionary; + sqInt fieldIndex; sqInt hash; sqInt hash1; - sqInt index; + usqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -68194,7 +68165,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) wrapAround = 0; while (1) { /* begin fetchPointer:ofObject: */ - nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); + nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord()))); if (nextSelector == GIV(nilObj)) { meth = null; goto l12; @@ -68212,10 +68183,12 @@ lookupSelectorinClass(sqInt selector, sqInt class) } methodArray = objOop2; /* begin followField:ofObject: */ - objOop11 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord()))))); + fieldIndex = index - SelectorStart; + /* begin fetchPointer:ofObject: */ + objOop11 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (((objOop11 & (tagMask())) == 0) && (((longAt(objOop11)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop11 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop11); + objOop11 = fixFollowedFieldofObjectwithInitialValue(fieldIndex, methodArray, objOop11); } meth = objOop11; goto l12; @@ -68309,7 +68282,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -68656,8 +68629,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -68710,11 +68684,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -68740,11 +68712,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -68943,18 +68913,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -69110,7 +69081,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69295,6 +69266,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -69350,7 +69354,7 @@ popthenPush(sqInt nItems, sqInt oop) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69802,8 +69806,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -69811,14 +69814,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -69849,8 +69852,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -69858,14 +69860,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -69889,8 +69891,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -69898,14 +69899,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -70634,7 +70635,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -70645,23 +70646,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -70677,38 +70678,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -70721,7 +70722,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -70729,7 +70730,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -70740,7 +70741,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -70754,7 +70755,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -70767,12 +70768,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -70783,7 +70784,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -70791,9 +70792,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -70807,8 +70808,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -70816,14 +70816,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70870,7 +70870,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -70881,23 +70881,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -70913,38 +70913,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -70957,7 +70957,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -70965,7 +70965,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -70976,7 +70976,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -70990,7 +70990,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71003,12 +71003,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71019,7 +71019,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71027,9 +71027,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71043,8 +71043,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71052,14 +71051,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71107,7 +71106,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71118,23 +71117,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71150,38 +71149,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71194,7 +71193,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71202,7 +71201,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -71213,7 +71212,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71227,7 +71226,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71240,12 +71239,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71256,7 +71255,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71264,9 +71263,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71281,8 +71280,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71290,14 +71288,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -72602,11 +72600,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -72750,7 +72750,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); header = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); if ((header & 1)) { @@ -72861,14 +72861,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -72885,6 +72894,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -72897,21 +72907,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -72927,12 +72941,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -72948,6 +72965,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -72961,11 +72979,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -72991,6 +73012,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -74393,7 +74418,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -74508,7 +74533,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -75630,8 +75655,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -77752,7 +77777,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -78109,7 +78134,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -78146,7 +78171,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -78449,7 +78474,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -78601,7 +78626,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -78805,7 +78830,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -79097,8 +79122,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -79148,8 +79174,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -79286,6 +79314,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -79295,165 +79324,134 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer = floatObjectOf(getCogCodeZoneThreshold()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (16U << (shiftForWord())), valuePointer); + /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -79461,9 +79459,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -79471,22 +79469,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -79494,192 +79492,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -79708,7 +79611,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -79741,14 +79644,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { result = ConstZero; } + if (arg == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -79824,7 +79730,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -79938,47 +79844,41 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l85; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l85: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -80033,7 +79933,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -80055,12 +79956,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l66; + goto l78; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l66: /* end setCogVMFlags: */; + l78: /* end setCogVMFlags: */; } } if (index == 49) { @@ -80083,14 +79984,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l83; + goto l86; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l83: /* end floatValueOf: */; + l86: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -80301,8 +80202,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -80310,14 +80210,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -80352,8 +80252,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -80361,14 +80260,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -80396,8 +80295,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -80405,14 +80303,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -80438,6 +80336,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -80487,6 +80386,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spursistasrc/vm/cointerp.h b/spursistasrc/vm/cointerp.h index 1ac733986..f92cabf26 100644 --- a/spursistasrc/vm/cointerp.h +++ b/spursistasrc/vm/cointerp.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ @@ -229,7 +229,7 @@ extern void NeverInline NeverInline markAndTrace(sqInt objOop); extern sqInt maybeSplObj(sqInt index); extern sqInt nilObject(void); extern sqInt nonIndexablePointerFormat(void); -extern usqInt numBytesOf(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); extern sqInt numStrongSlotsOfWeakling(sqInt objOop); @@ -284,8 +284,9 @@ extern sqInt argumentCountOf(sqInt methodPointer); extern sqInt canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader); extern sqInt checkAllAccessibleObjectsOkay(void); extern sqInt checkOkayInterpreterObjects(sqInt writeBack); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt disownVM(sqInt flags); extern sqInt doSignalSemaphoreWithIndex(sqInt index); extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ; extern usqLong getNextWakeupUsecs(void); @@ -310,6 +311,7 @@ extern sqInt methodClassOf(sqInt methodPointer); extern sqInt methodPrimitiveIndex(void); extern sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); extern sqInt objCouldBeClassObj(sqInt objOop); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); @@ -351,6 +353,9 @@ VM_EXPORT sqInt breakSelectorLength ; VM_EXPORT sqInt checkAllocFiller; VM_EXPORT sqInt checkedPluginName; VM_EXPORT sqInt checkForLeaks; +VM_EXPORT sqInt debugCallbackInvokes; +VM_EXPORT sqInt debugCallbackPath; +VM_EXPORT sqInt debugCallbackReturns; VM_EXPORT sqInt deferDisplayUpdates; VM_EXPORT sqInt desiredCogCodeSize; VM_EXPORT sqInt desiredEdenBytes; diff --git a/spursistasrc/vm/gcc3x-cointerp.c b/spursistasrc/vm/gcc3x-cointerp.c index e1ef76ca8..0fcba14c3 100644 --- a/spursistasrc/vm/gcc3x-cointerp.c +++ b/spursistasrc/vm/gcc3x-cointerp.c @@ -2,11 +2,11 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 from - CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 + CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 */ -static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2142 uuid: a11f8834-2f47-4326-aac8-64dac840dec3 " __DATE__ ; +static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2165 uuid: 2fa022b2-1323-47d7-b2cd-66682edbaf80 " __DATE__ ; char *__interpBuildInfo = __buildInfo; @@ -732,6 +732,7 @@ static void primitiveFullClosureValue(void); extern void primitiveFullClosureValueNoContextSwitch(void); static void primitiveFullClosureValueWithArgs(void); static void primitiveGetAttribute(void); +EXPORT(sqInt) primitiveGetenv(void); #if IMMUTABILITY static void primitiveGetImmutability(void); #else @@ -903,9 +904,9 @@ static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); static sqInt allWeakSurvivorsOnWeakList(void); static void NeverInline computeRefCountToShrinkRT(void); -static usqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); static sqInt NoDbgRegParms copyAndForward(sqInt survivor); -static usqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); static void fireEphemeronsInRememberedSet(void); static void fireEphemeronsOnEphemeronList(void); static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); @@ -1166,8 +1167,8 @@ static sqInt NoDbgRegParms noInlineFollowForwarded(sqInt objOop); static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); extern sqInt nonIndexablePointerFormat(void); static sqInt noUnscannedEphemerons(void); -static usqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); -extern usqInt numBytesOf(sqInt objOop); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); extern sqInt numPointerSlotsOf(sqInt objOop); static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); extern usqInt numSlotsOf(sqInt objOop); @@ -1235,6 +1236,7 @@ static sqInt slidingCompactionInProgress(void); extern sqInt slotSizeOf(sqInt oop); extern sqInt splObj(sqInt index); static usqInt NoDbgRegParms startOfObject(sqInt objOop); +EXPORT(sqInt) statNumGCs(void); extern usqInt storeCheckBoundary(void); static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); @@ -1329,14 +1331,15 @@ static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); -extern usqInt copiedValueCountOfClosure(sqInt closurePointer); -extern usqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); extern sqInt copyBits(void); extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); static void cr(void); static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); static sqInt divorceAllFrames(void); static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); @@ -1461,6 +1464,7 @@ static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); static sqInt numStkPages(void); extern sqInt objCouldBeClassObj(sqInt objOop); extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); extern sqInt penultimateLiteralOf(sqInt aMethodOop); extern sqInt popStack(void); extern sqInt pop(sqInt nItems); @@ -1637,8 +1641,8 @@ _iss usqInt instructionPointer; _iss usqInt newMethod; _iss sqInt messageSelector; _iss usqInt endOfMemory; -_iss usqInt newSpaceLimit; _iss StackPage * pages; +_iss usqInt newSpaceLimit; _iss usqInt oldSpaceStart; _iss char * stackBasePlus1; _iss sqInt needGCFlag; @@ -1706,6 +1710,7 @@ _iss sqInt classNameIndex; _iss sqInt cogCompiledCodeCompactionCalledFor; _iss sqInt gcPhaseInProgress; _iss sqInt tempOop3; +_iss sqInt cogCodeSize; _iss sqInt metaclassNumSlots; _iss sqInt numSegInfos; _iss sqInt preemptionYields; @@ -1714,7 +1719,6 @@ _iss sqInt gcMode; _iss usqLong nextWakeupUsecs; _iss sqInt savedFirstFieldsSpaceNotInOldSpace; _iss usqLong statGCEndUsecs; -_iss sqInt cogCodeSize; _iss sqInt highestRunnableProcessPriority; _iss usqLong longRunningPrimitiveStartUsecs; _iss usqLong longRunningPrimitiveStopUsecs; @@ -1741,6 +1745,8 @@ _iss sqInt lastHash; _iss sqInt lastMethodCacheProbeWrite; _iss sqInt longRunningPrimitiveCheckSequenceNumber; _iss usqInt memory; +_iss sqInt statFullGCs; +_iss sqInt statScavenges; _iss sqInt anomaly; _iss sqInt bogon; _iss sqInt fullScreenFlag; @@ -1755,11 +1761,9 @@ _iss sqInt savedWindowSize; _iss usqLong statCompactionUsecs; _iss usqLong statForceInterruptCheck; _iss usqLong statFullGCUsecs; -_iss sqInt statFullGCs; _iss sqInt statGrowMemory; _iss usqLong statProcessSwitch; _iss usqLong statScavengeGCUsecs; -_iss sqInt statScavenges; _iss sqInt statShrinkMemory; _iss usqLong statStackOverflow; _iss usqLong statStackPageDivorce; @@ -1794,6 +1798,7 @@ _iss sqInt statRootTableOverflows; _iss usqLong statSGCDeltaUsecs; _iss sqInt tenuringClassIndex; _iss sqInt the2ndUnknownShort; +_iss sqInt statIncrGCs; _iss sqIntptr_t methodCache[MethodCacheSize + 1 /* 4097 */]; _iss sqInt traceLog[TraceBufferSize /* 768 */]; _iss sqInt primTraceLog[256]; @@ -1816,7 +1821,6 @@ _iss sqInt shadowCallStackPointer; _iss sqInt statCoalesces; _iss usqLong statFGCDeltaUsecs; _iss usqLong statIncrGCUsecs; -_iss sqInt statIncrGCs; _iss sqInt theUnknownShort; #undef _iss #if SQ_USE_GLOBAL_STRUCT @@ -1847,6 +1851,7 @@ static void (*primitiveFunctionPointer)(); sqInt maxLiteralCountForCompile = MaxLiteralCountForCompile /* 60 */; sqInt checkForLeaks; jmp_buf reenterInterpreter; /* private export */; +sqInt debugCallbackPath; sqInt checkAllocFiller; sqInt breakSelectorLength = MinSmallInteger; sqInt desiredEdenBytes; @@ -1862,6 +1867,9 @@ sqInt deferDisplayUpdates; struct VirtualMachine* interpreterProxy; static void (*interruptCheckChain)(void) = 0; sqInt suppressHeartbeatFlag; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static int (*sHEAFn)() = 0; static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { /* 0 */ (void (*)(void))0, @@ -2474,7 +2482,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.2142]"; +const char *interpreterVersion = "Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.2165]"; sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; volatile int sendTrace; @@ -5083,7 +5091,7 @@ interpret(void) frameToReturnTo = 0; if (!((byteAt((localFP + FoxIFrameFlags) + 3)) != 0)) { goto commonCallerReturn; - goto l774; + goto l773; } closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); @@ -5131,10 +5139,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext = longAt(localFP + FoxThisContext); - goto l801; + goto l800; } ourContext = marryFrameSP(localFP, localSP); - l801: /* end ensureFrameIsMarried:SP: */; + l800: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); /* begin internalPush: */ @@ -5143,7 +5151,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l774; + goto l773; } if (unwindContextOrNilOrZero != 0) { /* begin internalAboutToReturn:through: */ @@ -5152,10 +5160,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext1 = longAt(localFP + FoxThisContext); - goto l794; + goto l793; } ourContext1 = marryFrameSP(localFP, localSP); - l794: /* end ensureFrameIsMarried:SP: */; + l793: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext1); /* begin internalPush: */ @@ -5166,7 +5174,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l774; + goto l773; } contextToReturnTo = null; if (((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { @@ -5218,10 +5226,10 @@ interpret(void) : (byteAt((localFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(localFP))); ourContext2 = longAt(localFP + FoxThisContext); - goto l787; + goto l786; } ourContext2 = marryFrameSP(localFP, localSP); - l787: /* end ensureFrameIsMarried:SP: */; + l786: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext2); /* begin internalPush: */ @@ -5230,7 +5238,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); GIV(argumentCount) = 1; goto normalSend; - goto l774; + goto l773; } } assert(pageListIsWellFormed()); @@ -5335,11 +5343,11 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l784; + goto l783; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } - l784: /* end maybeReturnToMachineCodeFrame */; + l783: /* end maybeReturnToMachineCodeFrame */; /* begin setMethod: */ aMethodObj = longAt(localFP + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -5354,7 +5362,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l774: /* end case */; + l773: /* end case */; BREAK; CASE(121) CASE(345) /*89*/ @@ -5473,27 +5481,27 @@ interpret(void) fp = (thePage->headFP); if (fp == theFP) { frameAbove = 0; - goto l812; + goto l811; } while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { if (callerFP == theFP) { frameAbove = fp; - goto l812; + goto l811; } fp = callerFP; } error("did not find theFP in stack page"); frameAbove = 0; - l812: /* end findFrameAbove:inPage: */; + l811: /* end findFrameAbove:inPage: */; /* begin newStackPage */ lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); if (((lruOrFree->baseFP)) == 0) { newPage = lruOrFree; - goto l807; + goto l806; } divorceFramesIn(lruOrFree); newPage = lruOrFree; - l807: /* end newStackPage */; + l806: /* end newStackPage */; assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); @@ -5516,7 +5524,7 @@ interpret(void) longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp2; ceSendAborttonumArgs(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))), contextToReturnFrom, 1); - goto l803; + goto l802; } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); @@ -5552,7 +5560,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l803; + goto l802; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5570,7 +5578,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l803; + goto l802; } localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); localSP = localFP + (frameStackedReceiverOffsetNumArgs(((((usqInt)(longAt(localFP + FoxMethod)))) < (startOfMemory()) @@ -5595,7 +5603,7 @@ interpret(void) GIV(stackPointer) = localSP; GIV(framePointer) = localFP; ceEnterCogCodePopReceiverReg(); - goto l803; + goto l802; } localIP = pointerForOop(longAt(localFP + FoxIFSavedIP)); } @@ -5613,7 +5621,7 @@ interpret(void) longAtPointerput(localSP, localReturnValue); } - l803: /* end case */; + l802: /* end case */; BREAK; CASE(126) CASE(127) @@ -5647,10 +5655,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l813; + goto l812; } ourContext = marryFrameSP(theFP, theSP); - l813: /* end ensureFrameIsMarried:SP: */; + l812: /* end ensureFrameIsMarried:SP: */; localIP -= 1; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); @@ -6094,12 +6102,12 @@ interpret(void) classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOrInteger = null; - goto l831; + goto l830; } /* begin fetchPointer:ofObject: */ fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); classOrInteger = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l831: /* end classAtIndex: */; + l830: /* end classAtIndex: */; GIV(traceLog)[GIV(traceLogIndex)] = classOrInteger; GIV(traceLog)[GIV(traceLogIndex) + 1] = GIV(messageSelector); GIV(traceLog)[GIV(traceLogIndex) + 2] = TraceIsFromInterpreter; @@ -6120,7 +6128,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l815; + goto l814; } /* second probe */ @@ -6130,7 +6138,7 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l815; + goto l814; } probe = (((usqInt) hash) >> 2) & MethodCacheMask; if (((GIV(methodCache)[probe + MethodCacheSelector]) == GIV(messageSelector)) @@ -6138,10 +6146,10 @@ interpret(void) GIV(newMethod) = GIV(methodCache)[probe + MethodCacheMethod]; primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe + MethodCachePrimFunction])); ok = 1; - goto l815; + goto l814; } ok = 0; - l815: /* end inlineLookupInMethodCacheSel:classTag: */; + l814: /* end inlineLookupInMethodCacheSel:classTag: */; if (ok) { /* begin ifAppropriateCompileToNativeCode:selector: */ aMethodObj = GIV(newMethod); @@ -6213,7 +6221,7 @@ interpret(void) maybeFlagMethodAsInterpreted(aMethodObj1); } } - goto l832; + goto l831; } } /* begin classAtIndex: */ @@ -6226,12 +6234,12 @@ interpret(void) classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { GIV(lkupClass) = null; - goto l824; + goto l823; } /* begin fetchPointer:ofObject: */ fieldIndex11 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); GIV(lkupClass) = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l824: /* end classAtIndex: */; + l823: /* end classAtIndex: */; assert((GIV(lkupClass) != null) && (addressCouldBeClassObj(GIV(lkupClass)))); lookupMethodInClass(GIV(lkupClass)); @@ -6243,7 +6251,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); addNewMethodToCache(GIV(lkupClass)); } - l832: /* end internalFindNewMethodOrdinary */; + l831: /* end internalFindNewMethodOrdinary */; /* begin internalExecuteNewMethod */ if (primitiveFunctionPointer != 0) { if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { @@ -6256,28 +6264,28 @@ interpret(void) /* begin internalStackTopPut: */ aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); longAtPointerput(localSP, aValue); - goto l836; + goto l835; } if (localPrimIndex == 256) { - goto l836; + goto l835; } if (localPrimIndex == 257) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(trueObj)); - goto l836; + goto l835; } if (localPrimIndex == 258) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(falseObj)); - goto l836; + goto l835; } if (localPrimIndex == 259) { /* begin internalStackTopPut: */ longAtPointerput(localSP, GIV(nilObj)); - goto l836; + goto l835; } longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); - goto l836; + goto l835; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -6339,7 +6347,7 @@ interpret(void) if (succeeded) { returntoExecutive(popStack(), 1); browserPluginReturnIfNeeded(); - goto l836; + goto l835; } } if ((assert(isNonImmediate(GIV(newMethod))), @@ -6419,11 +6427,11 @@ interpret(void) if (GIV(primFailCode) <= (numSlotsOf(table))) { /* begin fetchPointer:ofObject: */ errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); - goto l829; + goto l828; } } errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); - l829: /* end getErrorObjectFromPrimFailCode */; + l828: /* end getErrorObjectFromPrimFailCode */; longAtPointerput(localSP, errorCode); } GIV(primFailCode) = 0; @@ -6447,7 +6455,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); } } - l836: /* end internalExecuteNewMethod */; + l835: /* end internalExecuteNewMethod */; /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); @@ -6895,18 +6903,22 @@ interpret(void) objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); } literal = objOop11; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -7022,7 +7034,7 @@ interpret(void) CASE(138) /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -7247,7 +7259,7 @@ interpret(void) goto l147; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l147; } if (fmt >= (firstShortFormat())) { @@ -7262,14 +7274,14 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -7767,7 +7779,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; sqInt numArgsNumCopied; @@ -8478,7 +8490,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l850; + goto l848; } if (bytecode == 172) { @@ -8487,7 +8499,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l850; + goto l848; } if (bytecode > 167) { @@ -8497,7 +8509,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l850; + goto l848; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -8505,7 +8517,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l850: /* end case */; + l848: /* end case */; BREAK; CASE(179) /* bytecodePrimGreaterThan */ @@ -8616,7 +8628,7 @@ interpret(void) localIP = (localIP + (bytecode - 151)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l853; + goto l851; } if (bytecode == 172) { @@ -8626,14 +8638,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l853; + goto l851; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l853: /* end case */; + l851: /* end case */; BREAK; CASE(180) /* bytecodePrimLessOrEqual */ @@ -9277,7 +9289,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -10626,7 +10638,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l854; + goto l852; } if (bytecode == 239) { @@ -10635,7 +10647,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l854; + goto l852; } if (bytecode == 238) { @@ -10645,7 +10657,7 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l854; + goto l852; } } currentBytecode = bytecode + GIV(bytecodeSetSelector); @@ -10653,7 +10665,7 @@ interpret(void) /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); } - l854: /* end case */; + l852: /* end case */; BREAK; CASE(355) /*99*/ /* bytecodePrimGreaterThanSistaV1 */ @@ -10764,7 +10776,7 @@ interpret(void) localIP = (localIP + (bytecode - 191)) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l857; + goto l855; } if (bytecode == 239) { @@ -10774,14 +10786,14 @@ interpret(void) localIP = (localIP + offset) + 1; currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); - goto l857; + goto l855; } currentBytecode = bytecode + GIV(bytecodeSetSelector); /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); } - l857: /* end case */; + l855: /* end case */; BREAK; CASE(356) /*100*/ /* bytecodePrimLessOrEqualSistaV1 */ @@ -11425,7 +11437,7 @@ interpret(void) { sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -12237,10 +12249,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); ourContext = longAt(theFP + FoxThisContext); - goto l859; + goto l857; } ourContext = marryFrameSP(theFP, theSP); - l859: /* end ensureFrameIsMarried:SP: */; + l857: /* end ensureFrameIsMarried:SP: */; /* begin internalPush: */ longAtPointerput((localSP -= BytesPerOop), ourContext); GIV(argumentCount) = 0; @@ -12472,7 +12484,7 @@ interpret(void) CASE(487) /*231*/ /* pushNewArrayBytecode */ { - sqInt array; + usqInt array; sqInt i; usqInt newObj; usqInt numBytes; @@ -12621,6 +12633,7 @@ interpret(void) if (extB >= 64) { GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); extB = 0; + numExtB = 0; /* goto directedSuperclassSend */ goto l603; } @@ -13499,7 +13512,7 @@ interpret(void) goto l687; } if (fmt <= (sixtyFourBitIndexableFormat())) { - result2 = numBytes; + result2 = ((sqInt) numBytes); goto l687; } if (fmt >= (firstShortFormat())) { @@ -13514,14 +13527,14 @@ interpret(void) case 4: /* begin num16BitUnitsOf: */ objOop22 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop22))) >> 1)); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; case 5: /* begin num32BitUnitsOf: */ objOop31 = longAtPointer(localSP); - result2 = ((sqInt) (((usqInt) (numBytesOf(objOop31))) >> 2)); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; /* begin internalStackTopPut: */ longAtPointerput(localSP, ((result2 << 1) | 1)); break; @@ -13923,7 +13936,7 @@ interpret(void) sqInt i; int ignoreContext; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -13962,7 +13975,6 @@ interpret(void) ignoreContext = byte & (1U << 6); /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ if (ignoreContext) { - /* begin nilObject */ context = GIV(nilObj); } else { @@ -13974,10 +13986,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l725; + goto l715; } context = marryFrameSP(theFP, theSP); - l725: /* end ensureFrameIsMarried:SP: */; + l715: /* end ensureFrameIsMarried:SP: */; } /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14005,13 +14017,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l719; + goto l724; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l719: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l724: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14069,7 +14081,7 @@ interpret(void) sqInt i; sqInt initialIP; sqInt newClosure; - sqInt newClosure1; + usqInt newClosure1; usqInt newObj; sqInt numArgs; usqInt numBytes; @@ -14094,10 +14106,10 @@ interpret(void) : (byteAt((theFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(theFP))); context = longAt(theFP + FoxThisContext); - goto l735; + goto l734; } context = marryFrameSP(theFP, theSP); - l735: /* end ensureFrameIsMarried:SP: */; + l734: /* end ensureFrameIsMarried:SP: */; /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ initialIP = ((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize); /* begin eeInstantiateSmallClassIndex:format:numSlots: */ @@ -14125,13 +14137,13 @@ interpret(void) if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); newClosure1 = 0; - goto l731; + goto l730; } } long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); GIV(freeStart) += numBytes; newClosure1 = newObj; - l731: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + l730: /* end eeInstantiateSmallClassIndex:format:numSlots: */; /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(newClosure1))); @@ -14251,11 +14263,11 @@ interpret(void) value = result; } object2 = value; - goto l741; + goto l740; } if (isWidowedContext(object)) { object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); - goto l741; + goto l740; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14278,7 +14290,7 @@ interpret(void) assert((callerContextOrNil == (nilObject())) || (isContext(callerContextOrNil))); object2 = callerContextOrNil; - goto l741; + goto l740; } /* begin ensureFrameIsMarried:SP: */ if (((((usqInt)(longAt(callerFP + FoxMethod)))) < (startOfMemory()) @@ -14286,24 +14298,24 @@ interpret(void) : (byteAt((callerFP + FoxIFrameFlags) + 2)) != 0)) { assert(isContext(frameContext(callerFP))); object2 = longAt(callerFP + FoxThisContext); - goto l741; + goto l740; } object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); - goto l741; + goto l740; } if (slotIndex == StackPointerIndex) { assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); - goto l741; + goto l740; } if (slotIndex == InstructionPointerIndex) { object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); - goto l741; + goto l740; } error("bad index"); object2 = 0; - l741: /* end instVar:ofContext: */; + l740: /* end instVar:ofContext: */; longAtPointerput((localSP -= BytesPerOop), object2); } else { @@ -14407,7 +14419,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l753; + goto l752; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14428,7 +14440,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l753; + goto l752; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14461,7 +14473,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l753: /* end instVar:ofContext:put: */; + l752: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -14479,7 +14491,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l756; + goto l755; } # endif /* IMMUTABILITY */ @@ -14499,7 +14511,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l756: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l755: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } } @@ -14598,7 +14610,7 @@ interpret(void) if (slotIndex == StackPointerIndex) { ensureContextIsExecutionSafeAfterAssignToStackPointer(object); } - goto l763; + goto l762; } /* begin frameOfMarriedContext: */ senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); @@ -14619,7 +14631,7 @@ interpret(void) else { markStackPageMostRecentlyUsed(GIV(stackPage)); } - goto l763; + goto l762; } /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); @@ -14652,7 +14664,7 @@ interpret(void) localFP = pointerForOop(GIV(framePointer)); markStackPageMostRecentlyUsed(GIV(stackPage)); assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); - l763: /* end instVar:ofContext:put: */; + l762: /* end instVar:ofContext:put: */; } else { /* begin storePointerImmutabilityCheck:ofObject:withValue: */ @@ -14670,7 +14682,7 @@ interpret(void) GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); GIV(argumentCount) = 2; goto normalSend; - goto l766; + goto l765; } # endif /* IMMUTABILITY */ @@ -14690,7 +14702,7 @@ interpret(void) } } longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); - l766: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + l765: /* end storePointerImmutabilityCheck:ofObject:withValue: */; } } /* begin internalPop: */ @@ -14740,7 +14752,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l767; + goto l766; } } if (!inverse) { @@ -14749,7 +14761,7 @@ interpret(void) /* begin fetchNextBytecode */ currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); - goto l767; + goto l766; } if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { localIP += distance; @@ -14758,7 +14770,7 @@ interpret(void) currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); } - l767: /* end case */; + l766: /* end case */; BREAK; } } @@ -15435,7 +15447,6 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt if (assertal(cheapAddressCouldBeInHeap(methodField), ln)) { if (lip == (ceReturnToInterpreterPC())) { - /* begin iframeSavedIP: */ theIP = longAt(lifp + FoxIFSavedIP); } else { @@ -15457,10 +15468,10 @@ assertValidExecutionPointersimbarline(usqInt lip, char *lifp, char *lisp, sqInt cogMethod = (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->cpicHasMNUCaseOrCMIsFullBlock) ? ((CogMethod *) (((CogBlockMethod *) (methodField1 & MFMethodMask)))) : ((CogMethod *) ((((usqInt)(((CogBlockMethod *) (methodField1 & MFMethodMask))))) - (((((CogBlockMethod *) (methodField1 & MFMethodMask)))->homeOffset))))); - goto l3; + goto l2; } cogMethod = ((CogMethod *) (methodField1 & MFMethodMask)); - l3: /* end mframeHomeMethod: */; + l2: /* end mframeHomeMethod: */; assertl((lip > (methodField + ((mframeIsBlockActivation(lifp) ? sizeof(CogBlockMethod) : sizeof(CogMethod))))) @@ -16003,8 +16014,9 @@ ceBaseFrameReturn(sqInt returnValue) assert(newPage == GIV(stackPage)); moveFramesInthroughtoPage(thePage, frameAbove, newPage); markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } } else { @@ -16025,8 +16037,9 @@ ceBaseFrameReturn(sqInt returnValue) } GIV(instructionPointer) = 0; thePage = makeBaseFrameFor(contextToReturnTo); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin setStackPageAndLimit: */ assert(thePage != 0); @@ -16333,13 +16346,13 @@ ceCounterTripped(sqInt condition) resetCountersIn(mframeHomeMethod(GIV(framePointer))); return condition; } - addNewMethodToCache(classObj); } if ((primitiveFunctionPointer != 0) || ((argumentCountOfMethodHeader(methodHeaderOf(GIV(newMethod)))) != 1)) { resetCountersIn(mframeHomeMethod(GIV(framePointer))); return condition; } + setCogCodeZoneThreshold(1.0); /* begin splObj:put: */ assert(!(isForwarded(GIV(specialObjectsOop)))); if ((assert(isNonImmediate(GIV(specialObjectsOop))), @@ -16550,6 +16563,8 @@ ceMNUFromPICMNUMethodreceiver(sqInt aMethodObj, sqInt rcvr) sqInt ceNewHashOf(sqInt anObject) { + assert((isNonImmediate(anObject)) + && ((rawHashBitsOf(anObject)) == 0)); return (((usqInt)(newHashBitsOf(anObject)) << 1) | 1); } @@ -16823,8 +16838,9 @@ ceNonLocalReturn(sqInt returnValue) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(stackPointer) = (GIV(stackPage)->headSP); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } if (GIV(framePointer) == frameToReturnTo) { /* begin popStack */ @@ -16983,7 +16999,6 @@ ceSendAborttonumArgs(sqInt selector, sqInt rcvr, sqInt numArgs) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17100,7 +17115,6 @@ ceSendFromInLineCacheMiss(CogMethod *cogMethodOrPIC) handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -17343,7 +17357,6 @@ ceSendabovetonumArgs(sqInt selector, sqInt startAssociationArg, sqInt rcvr, sqIn handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -17473,18 +17486,22 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop2 & (tagMask())) == 0) && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); } - literal = objOop2; + classPointer = objOop2; + } + else { + /* begin nilObject */ + classPointer = GIV(nilObj); } - classPointer = literal; /* begin followField:ofObject: */ objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) @@ -17569,7 +17586,6 @@ ceSendsupertonumArgs(sqInt selector, sqInt superNormalBar, sqInt rcvr, sqInt num handleMNUInMachineCodeToclassForMessage(errSelIdx, rcvr, classObj); assert(0); } - addNewMethodToCache(classObj); } if (((GIV(newMethod) & (tagMask())) == 0) && ((((((usqInt) (longAt(GIV(newMethod)))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) @@ -17935,7 +17951,7 @@ checkStackIntegrity(void) sqInt i; sqInt methodField; sqInt ok; - usqInt oop; + sqInt oop; char *theFP; StackPage *thePage; char *theSP; @@ -18919,7 +18935,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) sqInt i; sqInt newOop; sqInt numArgs; - usqInt offset; + sqInt offset; usqInt oop; sqInt referent; sqInt referent1; @@ -19033,7 +19049,7 @@ followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags) numArgs = ((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory()) ? ((mframeCogMethod(theFP))->cmNumArgs) : byteAt((theFP + FoxIFrameFlags) + 1)); - offset = ((sqInt) ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))))); + offset = (FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)(numArgs) << (shiftForWord())))); oop = longAt(theFP + offset); if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { @@ -20003,7 +20019,7 @@ mapStackPages(void) sqInt numLivePages; sqInt oop; char *theFP; - usqInt theIP; + sqInt theIP; char *theIPPtr; StackPage *thePage; char *theSP; @@ -20606,18 +20622,19 @@ mMethodClass(void) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } /* CoInterpreter>>#mnuCompilationBreakpointFor: */ @@ -20640,11 +20657,12 @@ mnuMethodOrNilFor(sqInt rcvr) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt currentClass; sqInt dictionary; + sqInt fieldIndex; sqInt hash; sqInt hash1; - sqInt index; + usqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt methodHeader; sqInt mnuMethod; @@ -20701,7 +20719,7 @@ mnuMethodOrNilFor(sqInt rcvr) wrapAround = 0; while (1) { /* begin fetchPointer:ofObject: */ - nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); + nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord()))); if (nextSelector == GIV(nilObj)) { mnuMethod = null; goto l15; @@ -20719,10 +20737,12 @@ mnuMethodOrNilFor(sqInt rcvr) } methodArray = objOop2; /* begin followField:ofObject: */ - objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord()))))); + fieldIndex = index - SelectorStart; + /* begin fetchPointer:ofObject: */ + objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (((objOop1 & (tagMask())) == 0) && (((longAt(objOop1)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1); + objOop1 = fixFollowedFieldofObjectwithInitialValue(fieldIndex, methodArray, objOop1); } mnuMethod = objOop1; goto l15; @@ -21033,7 +21053,7 @@ noAssertHeaderOf(sqInt methodPointer) sqInt positive32BitIntegerFor(unsigned int integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -21098,7 +21118,7 @@ positive32BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; sqInt value; /* begin maybeInlinePositive32BitValueOf: */ @@ -21161,8 +21181,8 @@ sqInt positive64BitIntegerFor(usqLong integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int highWord; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -21280,7 +21300,7 @@ positive64BitValueOf(sqInt oop) sqInt ccIndex; sqInt fmt; sqInt ok; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -21735,7 +21755,7 @@ printFrameWithSP(char *theFP, char *theSP) char *rcvrAddress; sqInt rcvrOrClosure; sqInt theMethod; - sqInt theMethodEnd; + usqInt theMethodEnd; sqInt topThing; if (!((((((usqInt)theFP)) & (BytesPerWord - 1)) == 0) @@ -22221,7 +22241,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea sqInt bit; sqInt bytes; sqInt bytesRead; - usqInt bytesToShift; + sqInt bytesToShift; sqInt classArrayClass; sqInt classArrayObj; size_t dataSize; @@ -22375,6 +22395,9 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea : (hdrCogCodeSize == 0 ? defaultCogCodeSize() : hdrCogCodeSize)); + if (GIV(cogCodeSize) > (maxCogCodeSize())) { + GIV(cogCodeSize) = maxCogCodeSize(); + } /* begin getWord32FromFile:swap: */ w8 = 0; sqImageFileRead((&w8), sizeof(int), 1, f); @@ -22575,6 +22598,7 @@ readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squea while (GIV(globalSessionID) == 0) { GIV(globalSessionID) = (time(NULL)) + (ioMSecs()); } + sHEAFn = ioLoadFunctionFrom("secHasEnvironmentAccess", "SecurityPlugin"); /* begin initializeCodeGenerator */ initializeCodeZoneFromupTo(memory(), (memory()) + GIV(cogCodeSize)); return dataSize; @@ -22822,15 +22846,27 @@ saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex) /* Send the calllback message to Alien class with the supplied arg(s). Use - either the - 1 arg invokeCallbackContext: or the 4 arg - invokeCallback:stack:registers:jmpbuf: message, depending on what selector - is installed in the specialObjectsArray. - Note that if invoking the legacy invokeCallback:stack:registers:jmpbuf: we - pass the - vmCallbackContext as the jmpbuf argument (see - reestablishContextPriorToCallback:). The arguments are raw C addresses and - are converted to integer objects on the way. */ + either the 1 arg + invokeCallbackContext: or the 4 arg invokeCallback:stack:registers:jmpbuf: + message, depending on what selector is installed in the + specialObjectsArray. Note that if invoking the + legacy invokeCallback:stack:registers:jmpbuf: we pass the + vmCallbackContext as the jmpbuf + argument (see reestablishContextPriorToCallback:). The arguments are raw C + addresses and + are converted to integer objects on the way. sendInvokeCallbackContext: & + returnAs:ThroughCallback:Context: along with ownVM: and disownVM: conspire + to save and + restore newMethod, argumentCount and primitiveFunctionPointer around a + callback. The VM depends on argumentCount being correct to cut-back the + correct number of + arguments on primitive return. If a primitive that invokes a callback + fails after invoking a + callback (a bad idea, but s**t happens during development) then newMethod + is required to + activate the right faling method, and Spur expects + primitiveFunctionPointer to be valid, so + asserts will fail misleadingly if not. */ /* Override to log and check stack alignment. Since this is an implicit send we need to log it explicitly. The return side is done via a primitive so that gets @@ -22887,6 +22923,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) GIV(primTraceLog)[GIV(primTraceLogIndex)] = aSelectorOrImmediate; primTraceLogIndex(GIV(primTraceLogIndex) + 1); } + (vmCallbackContext->savedPrimFunctionPointer = primitiveFunctionPointer); /* begin fetchClassTagOfNonImm: */ obj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassAlien) << (shiftForWord()))))); /* begin classIndexOf: */ @@ -22899,8 +22936,10 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) } } if (primitiveFunctionPointer != 0) { + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); return 0; } + assert(((debugCallbackInvokes += 1)) > 0); /* begin saveCStackStateForCallbackContext: */ (vmCallbackContext->savedCStackPointer = getCStackPointer()); (vmCallbackContext->savedCFramePointer = getCFramePointer()); @@ -23076,6 +23115,7 @@ sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext) if (GIV(stackPointer) < ((GIV(stackPage)->realStackLimit))) { handleStackOverflow(); } + assert((frameReceiver(GIV(framePointer))) == (splObj(ClassAlien))); /* begin enterSmalltalkExecutiveFromCallback */ enterSmalltalkExecutive(); return 1; @@ -23425,7 +23465,7 @@ signed64BitIntegerFor(sqLong integerValue) usqInt highWord; sqInt largeClass; usqLong magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -23517,7 +23557,7 @@ signed64BitValueOf(sqInt oop) usqLong magnitude; sqInt negative; sqInt ok; - usqInt sz; + sqInt sz; sqLong value; if ((oop & 1)) { @@ -23907,8 +23947,9 @@ tearDownAndRebuildFrameForCannotReturnBaseFrameReturnFromtoreturnValue(sqInt con GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert((stackTop()) == (ceCannotResumePC())); longAtPointerput(GIV(stackPointer), returnValue); GIV(instructionPointer) = ceCannotResumePC(); @@ -24081,6 +24122,7 @@ transferTofrom(sqInt newProc, sqInt sourceCode) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); if (!((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()))) { @@ -24401,8 +24443,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -24410,14 +24451,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -24446,8 +24487,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -24455,14 +24495,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -24493,8 +24533,7 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -24502,14 +24541,14 @@ voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } activeContext = activeContext1; voidCogCompiledCode(); @@ -26283,8 +26322,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -26292,14 +26330,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -26323,8 +26361,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -26332,14 +26369,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l21; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l21: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -26365,8 +26402,7 @@ primitiveVoidVMStateForMethod(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -26374,14 +26410,14 @@ primitiveVoidVMStateForMethod(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (hasCogMethod) { unlinkSendsToandFreeIf(methodObj, 1); @@ -26404,6 +26440,7 @@ primitiveVoidVMStateForMethod(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(thePage); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); GIV(framePointer) = (thePage->headFP); /* begin popStack */ @@ -26856,16 +26893,16 @@ magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) return (((usqInt)smallVal << 1) | 1); } if (isNegative) { + /* begin knownClassAtIndex: */ assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); - } else { + /* begin knownClassAtIndex: */ assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); /* begin fetchPointer:ofObject: */ largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); - } if (((highWord = magnitude >> 32)) == 0) { sz = 4; @@ -26906,7 +26943,7 @@ magnitude64BitValueOf(sqInt oop) sqInt fmt; sqInt ok; sqInt smallIntValue; - usqInt sz; + sqInt sz; usqLong value; if ((oop & 1)) { @@ -27061,7 +27098,7 @@ noInlineSigned32BitValueGutsOf(sqInt oop) usqIntptr_t positiveMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt ok; @@ -27451,7 +27488,6 @@ primitiveAsCharacter(void) GIV(primFailCode) = reasonCode; return; } - /* begin characterObjectOf: */ characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); /* begin pop:thenPush: */ @@ -27489,7 +27525,7 @@ primitiveAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -28250,8 +28286,8 @@ primitiveBehaviorHash(void) static void primitiveBitAnd(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28430,8 +28466,8 @@ primitiveBitAndLargeIntegers(void) static void primitiveBitOr(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -28612,7 +28648,7 @@ primitiveBitShift(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt integerArgument; sqInt integerReceiver; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -28797,8 +28833,8 @@ primitiveBitShiftLargeIntegers(void) static void primitiveBitXor(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; - usqInt bs1; + sqInt bs; + sqInt bs1; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -29197,7 +29233,7 @@ primitiveClipboardText(void) sqInt numSlots; sqInt s; char *sp; - usqInt sz; + sqInt sz; if (GIV(argumentCount) == 1) { s = longAt(GIV(stackPointer)); @@ -29291,8 +29327,8 @@ primitiveClockLogAddresses(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt midx; void *msecs; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -29520,7 +29556,7 @@ primitiveClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -29787,7 +29823,7 @@ primitiveClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt object; sqInt object1; sqInt object11; @@ -30051,7 +30087,7 @@ primitiveClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt object; sqInt object1; @@ -30487,7 +30523,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } if (format >= (firstShortFormat())) { if (format >= (firstByteFormat())) { @@ -30497,7 +30533,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); oddBytes = format & 7; @@ -30508,7 +30544,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 16; oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); @@ -30525,7 +30561,7 @@ primitiveConstantFill(void) if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } - goto l5; + goto l4; } fillValue += fillValue << 32; oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); @@ -30537,8 +30573,7 @@ primitiveConstantFill(void) ? longAt(rcvr - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -30556,7 +30591,7 @@ primitiveConstantFill(void) } /* begin pop: */ GIV(stackPointer) += 1 * BytesPerWord; -l5: /* end primitiveConstantFillSpur */; +l4: /* end primitiveConstantFillSpur */; } @@ -30674,7 +30709,7 @@ primitiveCopyObject(void) goto l4; } if (fmt <= (sixtyFourBitIndexableFormat())) { - length = numBytes; + length = ((sqInt) numBytes); goto l4; } if (fmt >= (firstShortFormat())) { @@ -31275,8 +31310,8 @@ primitiveFloatAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -31342,7 +31377,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger; + result = ((sqInt) newLargeInteger); goto l6; l6: /* end positive32BitIntegerFor: */; @@ -31400,7 +31435,7 @@ primitiveFloatAt(void) /* begin storeLong32:ofObject:withValue: */ long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); - result = newLargeInteger1; + result = ((sqInt) newLargeInteger1); goto l11; l11: /* end positive32BitIntegerFor: */; @@ -32128,8 +32163,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -32137,14 +32171,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -32169,8 +32203,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -32178,14 +32211,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -32212,8 +32245,7 @@ primitiveFlushExternalPrimitives(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -32221,14 +32253,14 @@ primitiveFlushExternalPrimitives(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -32260,7 +32292,7 @@ static void primitiveFormPrint(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt bitsArray; - usqInt bitsArraySize; + sqInt bitsArraySize; sqInt depth; sqInt fmt; sqInt h; @@ -32474,7 +32506,7 @@ primitiveFullClosureValue(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -32740,7 +32772,7 @@ primitiveFullClosureValueNoContextSwitch(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; sqInt numTemps; sqInt object; sqInt object1; @@ -33003,7 +33035,7 @@ primitiveFullClosureValueWithArgs(void) sqInt methodHeader1; sqInt methodHeader2; sqInt numArgs; - usqInt numCopied; + sqInt numCopied; usqInt numSlots; sqInt numTemps; sqInt object; @@ -33327,6 +33359,53 @@ primitiveGetAttribute(void) } } + +/* Access to environment variables via getenv. No putenv or setenv as yet. */ + + /* InterpreterPrimitives>>#primitiveGetenv */ +EXPORT(sqInt) +primitiveGetenv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *result; + char *sp; + char *var; + + if (sHEAFn != 0) { + + /* secHasEnvironmentAccess */ + if (!(sHEAFn())) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrInappropriate); + } + } + var = cStringOrNullFor(longAt(GIV(stackPointer))); + if (var == 0) { + if (!GIV(primFailCode)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrBadArgument); + } + return 0; + } + result = getenv(var); + free(var); + if (result != 0) { + result = stringForCString(result); + if (!(result)) { + /* begin primitiveFailFor: */ + return (GIV(primFailCode) = PrimErrNoMemory); + } + } + assert(GIV(primFailCode) == 0); + /* begin pop:thenPush: */ + oop = (result == 0 + ? GIV(nilObj) + : result); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + /* InterpreterPrimitives>>#primitiveGetImmutability */ #if IMMUTABILITY static void @@ -33559,7 +33638,7 @@ primitiveGetWindowSize(void) sqInt numSlots; sqInt object; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; char *sp; sqInt w; @@ -33745,7 +33824,7 @@ EXPORT(sqInt) primitiveHeartbeatFrequency(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -33920,7 +33999,7 @@ primitiveIdentityHash(void) EXPORT(sqInt) primitiveImageFormatVersion(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -34064,7 +34143,7 @@ primitiveImmediateAsInteger(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt oop; char *sp; - sqInt value; + usqInt value; value = 0; oop = longAt(GIV(stackPointer)); @@ -34083,7 +34162,7 @@ primitiveImmediateAsInteger(void) } } /* begin pop:thenPushInteger: */ - longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)value << 1) | 1)); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 1) | 1)); GIV(stackPointer) = sp; } @@ -35012,7 +35091,7 @@ primitiveMakePoint(void) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pt; + usqInt pt; sqInt rcvr; char *sp; @@ -35248,7 +35327,7 @@ primitiveMousePoint(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; sqInt x; @@ -35558,7 +35637,7 @@ primitiveNewMethod(void) sqInt hash; sqInt header; sqInt i; - usqInt instSpec; + sqInt instSpec; sqInt literalCount; sqInt newObj; usqInt newObj1; @@ -35652,7 +35731,7 @@ primitiveNewMethod(void) long64Atput(newObj1, headerForSlotsformatclassIndex(numSlotsMask(), instSpec, classIndex)); } else { - long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (instSpec << (formatShift()))) + classIndex); + long64Atput(newObj1, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(instSpec) << (formatShift()))))) + classIndex); } assert((numBytes % (allocationUnit())) == 0); assert((newObj1 % (allocationUnit())) == 0); @@ -35713,7 +35792,7 @@ primitiveNewMethod(void) static void primitiveNewWithArg(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt classFormat; sqInt fmt; @@ -35857,8 +35936,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -35866,18 +35944,18 @@ primitiveNextInstance(void) followingWordAddress = (actualObj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { actualObj = GIV(freeStart); - goto l5; + goto l4; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); actualObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l5: /* end objectAfter:limit: */; + l4: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(freeStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } if (oopisGreaterThan(GIV(pastSpaceStart), ((pastSpace()).start))) { @@ -35900,8 +35978,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -35909,18 +35986,18 @@ primitiveNextInstance(void) followingWordAddress1 = (actualObj + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { actualObj = GIV(pastSpaceStart); - goto l10; + goto l8; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); actualObj = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l10: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(pastSpaceStart)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } actualObj = GIV(nilObj); @@ -35932,8 +36009,7 @@ primitiveNextInstance(void) ? longAt(actualObj - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -35941,22 +36017,22 @@ primitiveNextInstance(void) followingWordAddress2 = (actualObj + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { actualObj = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); actualObj = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; if (!(oopisLessThan(actualObj, GIV(endOfMemory)))) break; if (classIndex == ((longAt(actualObj)) & (classIndexMask()))) { subsequentObject = actualObj; - goto l15; + goto l12; } } subsequentObject = null; - l15: /* end instanceAfter: */; + l12: /* end instanceAfter: */; if (!(subsequentObject == null)) { /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), subsequentObject); @@ -36180,7 +36256,7 @@ primitivePathToUsing(void) if (!(((stack & (tagMask())) == 0) && (((((usqInt) (longAt(stack))) >> (formatShift())) & (formatMask())) == 2))) { err = PrimErrBadArgument; - goto l10; + goto l8; } assert(allObjectsUnmarked()); @@ -36196,28 +36272,28 @@ primitivePathToUsing(void) : numSlots11); if (fmt1 <= 5) { stackSize = numSlots2; - goto l7; + goto l5; } if (fmt1 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ stackSize = (numSlots2 << (shiftForWord())) - (fmt1 & 7); - goto l7; + goto l5; } if (fmt1 >= (firstShortFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); - goto l7; + goto l5; } if (fmt1 >= (firstLongFormat())) { stackSize = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); - goto l7; + goto l5; } if (fmt1 == (sixtyFourBitIndexableFormat())) { stackSize = ((usqInt) numSlots2) >> 1; - goto l7; + goto l5; } stackSize = 0; -l7: /* end lengthOf:format: */; +l5: /* end lengthOf:format: */; /* begin mark: */ setIsMarkedOfto(stack, 1); current = GIV(specialObjectsOop); @@ -36232,28 +36308,28 @@ primitivePathToUsing(void) : numSlots12); if (fmt2 <= 5) { index = numSlots3; - goto l9; + goto l7; } if (fmt2 >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots3 << (shiftForWord())) - (fmt2 & 7); - goto l9; + goto l7; } if (fmt2 >= (firstShortFormat())) { index = (numSlots3 << ((shiftForWord()) - 1)) - (fmt2 & 3); - goto l9; + goto l7; } if (fmt2 >= (firstLongFormat())) { index = (numSlots3 << ((shiftForWord()) - 2)) - (fmt2 & 1); - goto l9; + goto l7; } if (fmt2 == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots3) >> 1; - goto l9; + goto l7; } index = 0; -l9: /* end lengthOf:format: */; +l7: /* end lengthOf:format: */; stackp = 0; while(1) { while (((index -= 1)) >= -1) { @@ -36263,7 +36339,6 @@ primitivePathToUsing(void) next = fieldofFrame(index, ((char *) current)); } else { - /* begin nilObject */ next = GIV(nilObj); } } @@ -36273,7 +36348,6 @@ primitivePathToUsing(void) next = fieldOrSenderFPofContext(index, current); } else { - /* begin fetchPointer:ofObject: */ next = longAt((current + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); } } @@ -36312,7 +36386,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); pruneStackstackp(stack, stackp); err = 0; - goto l10; + goto l8; } if (((next & 1) == 0) && (((((((usqInt)next)) & (BytesPerWord - 1)) == 0) @@ -36334,7 +36408,7 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrBadIndex; - goto l10; + goto l8; } assert(!(isOopForwarded(stack))); longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(stackp) << (shiftForWord())))), current); @@ -36371,28 +36445,28 @@ primitivePathToUsing(void) : numSlots1); if (fmt <= 5) { index = numSlots; - goto l5; + goto l3; } if (fmt >= (firstByteFormat())) { /* bytes, including CompiledMethod */ index = (numSlots << (shiftForWord())) - (fmt & 7); - goto l5; + goto l3; } if (fmt >= (firstShortFormat())) { index = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); - goto l5; + goto l3; } if (fmt >= (firstLongFormat())) { index = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); - goto l5; + goto l3; } if (fmt == (sixtyFourBitIndexableFormat())) { index = ((usqInt) numSlots) >> 1; - goto l5; + goto l3; } index = 0; - l5: /* end lengthOf:format: */; + l3: /* end lengthOf:format: */; } } current = next; @@ -36407,13 +36481,13 @@ primitivePathToUsing(void) longAtput((stack + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))), GIV(nilObj)); } err = PrimErrNotFound; - goto l10; + goto l8; } index = ((longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 1)) << (shiftForWord())))))) >> 1); current = longAt((stack + BaseHeaderSize) + (((sqInt)((usqInt)((stackp - 2)) << (shiftForWord()))))); stackp -= 2; } -l10: /* end pathTo:using:followWeak: */; +l8: /* end pathTo:using:followWeak: */; if (err != 0) { /* begin primitiveFailFor: */ return (GIV(primFailCode) = err); @@ -37396,7 +37470,7 @@ primitiveScreenSize(void) sqInt numSlots; sqInt objFormat; sqInt oop; - sqInt pointResult; + usqInt pointResult; sqInt pointWord; char *sp; @@ -37457,7 +37531,7 @@ static void primitiveSecondsClock(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -38685,7 +38759,7 @@ primitiveStringAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -39793,8 +39867,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -39802,14 +39875,14 @@ primitiveUnloadModule(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -39834,8 +39907,7 @@ primitiveUnloadModule(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -39843,14 +39915,14 @@ primitiveUnloadModule(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -39877,8 +39949,7 @@ primitiveUnloadModule(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -39886,14 +39957,14 @@ primitiveUnloadModule(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } flushMethodCache(); /* begin flushExternalPrimitiveTable */ @@ -40152,7 +40223,7 @@ signalNoResume(sqInt aSemaphore) sqIntptr_t signedMachineIntegerValueOf(sqInt oop) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt ccIndex1; sqInt fmt; @@ -40399,8 +40470,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -40408,14 +40478,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -40436,8 +40506,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -40445,14 +40514,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -40475,8 +40544,7 @@ clearLeakMapAndMapAccessibleObjects(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -40484,14 +40552,14 @@ clearLeakMapAndMapAccessibleObjects(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } addCogMethodsToHeapMap(); } @@ -40634,18 +40702,22 @@ receiverTagBitsForMethod(sqInt aMethodObj) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, aMethodObj, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); + if ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5))) { + assert((numSlotsOf(literal)) > ValueIndex); /* begin followField:ofObject: */ objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); if (((objOop & (tagMask())) == 0) && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); } - literal = objOop; + methodClassOrNil = objOop; + } + else { + /* begin nilObject */ + methodClassOrNil = GIV(nilObj); } - methodClassOrNil = literal; if ((methodClassOrNil == GIV(nilObj)) || ((instSpecOfClassFormat(((longAt((methodClassOrNil + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1))) != 7)) { return 0; @@ -40716,8 +40788,7 @@ addressAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41125,9 +41196,9 @@ changeClassOfto(sqInt rcvr, sqInt argClass) sqInt fixedFields; sqInt fmt; sqInt hash; - usqInt instBytes; + sqInt instBytes; sqInt instFormat; - usqInt newFormat; + sqInt newFormat; sqInt normalizedInstFormat; usqInt numBytes; usqInt numSlots; @@ -41302,7 +41373,7 @@ changeClassOfto(sqInt rcvr, sqInt argClass) assert(((classIndex >= 0) && (classIndex <= (classIndexMask())))); assert(((newFormat >= 0) && (newFormat <= (formatMask())))); flag("endianness"); - longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (newFormat << (formatShift())))); + longAtput(rcvr, ((longAt(rcvr)) & ((unsigned int)~((((sqInt)((usqInt)((formatMask())) << (formatShift())))) + (classIndexMask())))) + (classIndex + (((sqInt)((usqInt)(newFormat) << (formatShift())))))); return 0; } @@ -41371,7 +41442,7 @@ fetchClassTagOf(sqInt oop) sqInt floatObjectOf(double aFloat) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newFloatObj; + usqInt newFloatObj; usqInt newObj; usqInt numBytes; sqInt numSlots; @@ -41467,7 +41538,7 @@ headerIndicatesAlternateBytecodeSet(sqInt methodHeader) static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BytesPerOop))); @@ -41483,7 +41554,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) numSlots = ((usqInt) (numBytes - BaseHeaderSize)) >> (shiftForWord()); assert(numSlots < (numSlotsMask())); longAtput(address, 0); - longAtput(address + 4, numSlots << (numSlotsHalfShift())); + longAtput(address + 4, ((sqLong)((usqLong)(numSlots) << (numSlotsHalfShift())))); return address; } @@ -41494,7 +41565,7 @@ initFreeChunkWithBytesat(usqLong numBytes, sqInt address) static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address) { - usqLong numSlots; + sqLong numSlots; assert(((numBytes % (allocationUnit())) == 0) && (numBytes >= (BaseHeaderSize + BaseHeaderSize))); @@ -41948,8 +42019,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -41957,14 +42027,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -41987,8 +42057,7 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -41996,14 +42065,14 @@ allNewSpaceObjectsHaveZeroRTRefCount(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 1; } @@ -42049,8 +42118,7 @@ allWeakSurvivorsOnWeakList(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -42058,14 +42126,14 @@ allWeakSurvivorsOnWeakList(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -42189,16 +42257,15 @@ computeRefCountToShrinkRT(void) Also, don't repeat any of the ephemeron processing. */ /* SpurGenerationScavenger>>#copyAndForwardMourner: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesInObj; sqInt classIndex; sqInt format; unsigned int header; - usqInt newLocation; + sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -42228,12 +42295,11 @@ copyAndForwardMourner(sqInt mourner) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (mourner - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (mourner - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (mourner - startOfSurvivor), header); } newLocation = newStart + (mourner - startOfSurvivor); } @@ -42272,7 +42338,6 @@ copyAndForward(sqInt survivor) unsigned int header; sqInt newLocation; sqInt newStart; - sqInt obj; usqInt startOfSurvivor; sqInt tenure; @@ -42318,12 +42383,11 @@ copyAndForward(sqInt survivor) memcpy(((void *)newStart), ((void *)startOfSurvivor), bytesInObj); if (GIV(tenureCriterion) == TenureToShrinkRT) { /* begin rtRefCountOf:put: */ - obj = newStart + (survivor - startOfSurvivor); assert(((0 >= 0) && (0 <= MaxRTRefCount))); - header = longAt(obj); + header = longAt(newStart + (survivor - startOfSurvivor)); header = header & ((unsigned int)~(7U << (rememberedBitShift()))); header += 0U << (rememberedBitShift()); - longAtput(obj, header); + longAtput(newStart + (survivor - startOfSurvivor), header); } newLocation = newStart + (survivor - startOfSurvivor); } @@ -42358,12 +42422,12 @@ copyAndForward(sqInt survivor) /* Should be too infrequent to lower icache density of copyAndForward: */ /* SpurGenerationScavenger>>#copyToOldSpace:bytes:format: */ -static usqInt NoDbgRegParms NeverInline +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt field; unsigned int header; - usqInt newOop; + sqInt newOop; sqInt newStart; sqInt nTenures; sqInt p; @@ -42561,7 +42625,7 @@ static void growRememberedSet(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt *base; - usqInt fudge; + sqInt fudge; sqInt i; sqInt newObj; sqInt nSlots; @@ -43075,7 +43139,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) usqInt numSlots1; usqInt numSlots2; sqInt obj; - usqInt ptr; + sqInt ptr; usqInt slotBytes; ptr = initialAddress; @@ -43091,8 +43155,7 @@ scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -43546,8 +43609,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -43555,14 +43617,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress = (objAfter + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(freeStart))) { objAfter = GIV(freeStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objAfter = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(freeStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43588,8 +43650,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -43597,14 +43658,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress1 = (objAfter + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objAfter = GIV(pastSpaceStart); - goto l9; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objAfter = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; if (!(oopisLessThan(objAfter, GIV(pastSpaceStart)))) break; if (((longAt(objAfter)) & (classIndexMask())) > (lastClassIndexPun())) { return objAfter; @@ -43619,8 +43680,7 @@ accessibleObjectAfter(sqInt objOop) ? longAt(objAfter - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -43628,14 +43688,14 @@ accessibleObjectAfter(sqInt objOop) followingWordAddress2 = (objAfter + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objAfter = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objAfter = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (objAfter == GIV(endOfMemory)) { return null; } @@ -44009,7 +44069,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } freeChunk = allocateSlotsInOldSpacebytesformatclassIndex(0, numBytes, 2, ClassArrayCompactIndex); - goto l6; + goto l5; } long64Atput(newObj, (((((usqLong) 0)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); @@ -44017,7 +44077,7 @@ allInstancesOf(sqInt aClass) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; freeChunk = newObj; - l6: /* end allocateSlots:format:classIndex: */; + l5: /* end allocateSlots:format:classIndex: */; return freeChunk; } freeChunk = allocateLargestFreeChunk(); @@ -44028,8 +44088,7 @@ allInstancesOf(sqInt aClass) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44070,8 +44129,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44079,14 +44137,14 @@ allInstancesOf(sqInt aClass) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44125,8 +44183,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -44173,8 +44230,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44182,14 +44238,14 @@ allInstancesOf(sqInt aClass) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l20; + goto l15; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } count = count1; ptr = ptr1; @@ -44238,8 +44294,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop11 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -44247,14 +44302,14 @@ allInstancesOf(sqInt aClass) followingWordAddress21 = (objOop11 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l36; + goto l29; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop11 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l36: /* end objectAfter:limit: */; + l29: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44300,8 +44355,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -44355,8 +44409,7 @@ allInstancesOf(sqInt aClass) ? longAt(objOop2 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -44364,14 +44417,14 @@ allInstancesOf(sqInt aClass) followingWordAddress11 = (objOop2 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l32; + goto l23; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop2 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l32: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } /* begin purgeDuplicateClassTableEntriesFor: */ expectedIndex1 = (long32At(aClass + 4)) & (identityHashHalfWordMask()); @@ -44430,7 +44483,7 @@ allInstancesOf(sqInt aClass) forceInterruptCheck(); } smallObj = allocateSlotsInOldSpacebytesformatclassIndex(count, numBytes1, 2, ClassArrayCompactIndex); - goto l8; + goto l7; } if (count >= (numSlotsMask())) { @@ -44447,7 +44500,7 @@ allInstancesOf(sqInt aClass) assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; smallObj = newObj1; - l8: /* end allocateSlots:format:classIndex: */; + l7: /* end allocateSlots:format:classIndex: */; for (i = 0; i < count; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(smallObj))); @@ -44547,8 +44600,7 @@ allObjects(void) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44584,8 +44636,7 @@ allObjects(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44593,14 +44644,14 @@ allObjects(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -44637,8 +44688,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -44646,14 +44696,14 @@ allObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop = limit1; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44683,8 +44733,7 @@ allObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44692,14 +44741,14 @@ allObjects(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } assert(isEmptyObjStack(GIV(markStack))); assert(isEmptyObjStack(GIV(weaklingStack))); @@ -44810,8 +44859,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44819,14 +44867,14 @@ allObjectsUnmarked(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -44850,8 +44898,7 @@ allObjectsUnmarked(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -44859,14 +44906,14 @@ allObjectsUnmarked(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -44892,8 +44939,7 @@ allObjectsUnmarked(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -44901,14 +44947,14 @@ allObjectsUnmarked(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return 1; } @@ -44950,8 +44996,7 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -44959,14 +45004,14 @@ allOldMarkedWeakObjectsOnWeaklingStack(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return 1; } @@ -46054,8 +46099,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46063,14 +46107,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46115,8 +46159,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46124,14 +46167,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46211,8 +46254,7 @@ checkHeapFreeSpaceIntegrity(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46220,14 +46262,14 @@ checkHeapFreeSpaceIntegrity(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l14; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l14: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } if (total != GIV(totalFreeOldSpace)) { print("incorrect totalFreeOldSpace; expected "); @@ -46383,12 +46425,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (classTablePage == GIV(nilObj)) { classOop = GIV(nilObj); - goto l25; + goto l22; } /* begin fetchPointer:ofObject: */ fieldIndex1 = classIndex1 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); - l25: /* end classOrNilAtIndex: */; + l22: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46431,8 +46473,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -46440,14 +46481,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -46498,12 +46539,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage1 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << (shiftForWord()))))); if (classTablePage1 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l26; + goto l23; } /* begin fetchPointer:ofObject: */ fieldIndex11 = classIndex2 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage1 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex11) << (shiftForWord()))))); - l26: /* end classOrNilAtIndex: */; + l23: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (!(((longAt(objOop)) & (classIndexMask())) <= (lastClassIndexPun()))))) { @@ -46546,8 +46587,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -46555,14 +46595,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -46656,12 +46696,12 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla classTablePage2 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex3) << (shiftForWord()))))); if (classTablePage2 == GIV(nilObj)) { classOop = GIV(nilObj); - goto l27; + goto l24; } /* begin fetchPointer:ofObject: */ fieldIndex12 = classIndex3 & ((1U << (classTableMajorIndexShift())) - 1); classOop = longAt((classTablePage2 + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex12) << (shiftForWord()))))); - l27: /* end classOrNilAtIndex: */; + l24: /* end classOrNilAtIndex: */; if (classIndicesShouldBeValid && ((classOop == GIV(nilObj)) && (classIndex > (lastClassIndexPun())))) { @@ -46721,8 +46761,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -46730,14 +46769,14 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l23; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l23: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } if (numRememberedObjectsInHeap != (rememberedSetSize())) { print("root count mismatch. #heap roots "); @@ -46787,7 +46826,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla } /* begin objStack:do: */ if (GIV(mournQueue) == GIV(nilObj)) { - goto l14; + goto l12; } eassert(isValidObjStack(GIV(mournQueue))); objStackPage = GIV(mournQueue); @@ -46828,7 +46867,7 @@ checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt cla /* begin fetchPointer:ofObject: */ objStackPage = longAt((objStackPage + BaseHeaderSize) + (((int)((usqInt)(ObjStackNextx) << (shiftForWord()))))); } -l14: /* end objStack:do: */; +l12: /* end objStack:do: */; for (ri = 1; ri <= GIV(remapBufferCount); ri += 1) { obj = GIV(remapBuffer)[ri]; if ((obj & (BytesPerWord - 1)) != 0) { @@ -47422,8 +47461,7 @@ clearLeakMapAndMapAccessibleFreeSpace(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47431,14 +47469,14 @@ clearLeakMapAndMapAccessibleFreeSpace(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } } @@ -47864,8 +47902,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -47873,14 +47910,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -47912,8 +47949,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -47921,14 +47957,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -47962,8 +47998,7 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -47971,14 +48006,14 @@ countMarkedAndUnmarkdObjects(sqInt printFlags) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } print("n marked: "); printNum(nm); @@ -48264,7 +48299,6 @@ ensureRoomOnObjStackAt(sqInt objStackRootIndex) freeOrNewPage = 0; } else { - /* begin fetchPointer:ofObject: */ freeOrNewPage = longAt((stackOrNil + BaseHeaderSize) + (((int)((usqInt)(ObjStackFreex) << (shiftForWord()))))); } if (freeOrNewPage != 0) { @@ -48520,8 +48554,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48529,14 +48562,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48559,8 +48592,7 @@ existInstancesInNewSpaceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48568,14 +48600,14 @@ existInstancesInNewSpaceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return 0; } @@ -48811,8 +48843,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -48820,14 +48851,14 @@ findStringBeginningWith(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -48860,8 +48891,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -48869,14 +48899,14 @@ findStringBeginningWith(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -48911,8 +48941,7 @@ findStringBeginningWith(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -48920,14 +48949,14 @@ findStringBeginningWith(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49007,8 +49036,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -49016,14 +49044,14 @@ findString(char *aCString) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -49053,8 +49081,7 @@ findString(char *aCString) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -49062,14 +49089,14 @@ findString(char *aCString) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -49101,8 +49128,7 @@ findString(char *aCString) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -49110,14 +49136,14 @@ findString(char *aCString) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -49677,7 +49703,7 @@ growOldSpaceByAtLeast(sqInt minAmmount) sqInt address; sqInt ammount; sqInt bytes; - usqInt headroom; + sqInt headroom; sqInt i; SpurSegmentInfo *segInfo; usqInt total; @@ -50002,8 +50028,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -50011,14 +50036,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -50041,8 +50066,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -50050,14 +50074,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -50082,8 +50106,7 @@ initialInstanceOf(sqInt classObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -50091,14 +50114,14 @@ initialInstanceOf(sqInt classObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return null; } @@ -50156,7 +50179,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt freeChunk; sqInt freeListObj; usqInt freeOldStart; - usqInt fudge; + sqInt fudge; sqInt i; sqInt i1; sqInt i2; @@ -50164,7 +50187,7 @@ initializeObjectMemory(sqInt bytesToShift) sqInt index; sqInt indexLimiT; usqInt limit; - usqInt nilObjPreSwizzle; + sqInt nilObjPreSwizzle; usqInt numSlots; usqInt numSlots1; usqInt numSlots11; @@ -50203,10 +50226,10 @@ initializeObjectMemory(sqInt bytesToShift) for (i1 = 2; i1 < GIV(numClassTablePages); i1 += 1) { if ((longAt((classTableRoot + BaseHeaderSize) + (((sqInt)((usqInt)(i1) << (shiftForWord())))))) == nilObjPreSwizzle) { GIV(numClassTablePages) = i1; - goto l12; + goto l11; } } -l12: /* end countNumClassPagesPreSwizzle: */; +l11: /* end countNumClassPagesPreSwizzle: */; if ((bytesToShift != 0) || ((numSegments()) > 1)) { /* begin objectStartingAt: */ @@ -50257,8 +50280,7 @@ initializeObjectMemory(sqInt bytesToShift) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -50266,14 +50288,14 @@ initializeObjectMemory(sqInt bytesToShift) followingWordAddress = (obj + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { obj = GIV(endOfMemory); - goto l4; + goto l13; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); obj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l13: /* end objectAfter:limit: */; } } @@ -50310,11 +50332,11 @@ initializeObjectMemory(sqInt bytesToShift) if ((longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord())))))) == GIV(nilObj)) { GIV(numClassTablePages) = i2; GIV(classTableIndex) = ((sqInt)((usqInt)(((((GIV(numClassTablePages) - 1) < 1) ? 1 : (GIV(numClassTablePages) - 1)))) << (classTableMajorIndexShift()))); - goto l18; + goto l17; } } GIV(classTableIndex) = 1U << (classTableMajorIndexShift()); -l18: /* end setHiddenRootsObj: */; +l17: /* end setHiddenRootsObj: */; GIV(markStack) = swizzleObjStackAt(MarkStackRootIndex); GIV(weaklingStack) = swizzleObjStackAt(WeaklingStackRootIndex); GIV(mournQueue) = swizzleObjStackAt(MournQueueRootIndex); @@ -51778,8 +51800,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -51801,8 +51822,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(segmentWordArray - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -51846,7 +51866,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) numSegObjs += 1; if (((((usqInt) (longAt(objOop1 + 4))) >> (markedBitHalfShift())) & 1) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } /* validate the class ref, but don't update it until any internal classes have been added to the class table. */ @@ -51854,7 +51874,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (classIndex1 & TopHashBit) { if ((classIndex1 - TopHashBit) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classIndex1 - TopHashBit)) << (shiftForWord()))))); @@ -51862,7 +51882,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (!((hash > (lastClassIndexPun())) && ((classOrNilAtIndex(hash)) == mappedOop))) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } else { @@ -51870,11 +51890,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) /* The class is contained within the segment. */ if (((oop1 = (classIndex1 * 8) + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } if (((long32At(oop1 + 4)) & (identityHashHalfWordMask())) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } } for (i = 0, iLimiT = ((numPointerSlotsOf(objOop1)) - 1); i <= iLimiT; i += 1) { @@ -51884,7 +51904,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) if (oop1 & TopOopBit) { if (((oop1 = (oop1 - TopOopBit) / BytesPerOop)) >= numOutPointers) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } /* begin fetchPointer:ofObject: */ mappedOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)(oop1) << (shiftForWord()))))); @@ -51892,11 +51912,11 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) else { if ((oop1 & (8 - 1)) != 0) { errorCode = PrimErrInappropriate; - goto l31; + goto l26; } if (((mappedOop = oop1 + segmentStart)) >= segmentLimit) { errorCode = PrimErrBadIndex; - goto l31; + goto l26; } } assert(!(isOopForwarded(objOop1))); @@ -51909,8 +51929,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop1 - BaseHeaderSize) : numSlots14); if (numSlots7 == 0) { - /* begin allocationUnit */ - slotBytes4 = ((sqInt) 8); + slotBytes4 = 8; } else { slotBytes4 = (numSlots7 + (numSlots7 & 1)) << (shiftForWord()); @@ -51918,17 +51937,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes4; if (oopisGreaterThanOrEqualTo(followingWordAddress2, segmentLimit)) { objOop1 = segmentLimit; - goto l22; + goto l23; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l22: /* end objectAfter:limit: */; + l23: /* end objectAfter:limit: */; } errorCode = -numSegObjs; -l31: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; +l26: /* end mapOopsAndValidateClassRefsFrom:to:outPointers: */; if (errorCode > 0) { return errorCode; } @@ -51952,7 +51971,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) forceInterruptCheck(); } loadedObjectsArray = allocateSlotsInOldSpacebytesformatclassIndex(numLoadedObjects, numBytes, 2, ClassArrayCompactIndex); - goto l14; + goto l12; } if (numLoadedObjects >= (numSlotsMask())) { @@ -51969,7 +51988,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; loadedObjectsArray = newObj; -l14: /* end allocateSlots:format:classIndex: */; +l12: /* end allocateSlots:format:classIndex: */; if (!(loadedObjectsArray)) { return PrimErrNoMemory; } @@ -51990,8 +52009,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -51999,17 +52017,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segmentLimit)) { objOop = segmentLimit; - goto l4; + goto l7; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } errorCode = errorCode1; - goto l12; + goto l10; } /* begin objectAfter:limit: */ numSlots11 = byteAt(objOop + 7); @@ -52017,8 +52035,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52026,17 +52043,17 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, segmentLimit)) { objOop = segmentLimit; - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } errorCode = 0; -l12: /* end enterClassesIntoClassTableFrom:to: */; +l10: /* end enterClassesIntoClassTableFrom:to: */; if (errorCode != 0) { return errorCode; } @@ -52056,7 +52073,6 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) fillIdx += 1; classRef = ((longAt(objOop2)) & (classIndexMask())) - (firstClassIndexPun()); if (classRef & TopHashBit) { - /* begin fetchPointer:ofObject: */ classOop = longAt((outPointerArray + BaseHeaderSize) + (((sqInt)((usqInt)((classRef - TopHashBit)) << (shiftForWord()))))); } else { @@ -52116,8 +52132,7 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) ? longAt(objOop2 - BaseHeaderSize) : numSlots15); if (numSlots8 == 0) { - /* begin allocationUnit */ - slotBytes5 = ((sqInt) 8); + slotBytes5 = 8; } else { slotBytes5 = (numSlots8 + (numSlots8 & 1)) << (shiftForWord()); @@ -52125,14 +52140,14 @@ loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray) followingWordAddress3 = (objOop2 + BaseHeaderSize) + slotBytes5; if (oopisGreaterThanOrEqualTo(followingWordAddress3, segmentLimit)) { objOop2 = segmentLimit; - goto l33; + goto l28; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop2 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l33: /* end objectAfter:limit: */; + l28: /* end objectAfter:limit: */; } if ((byteAt(segmentWordArray + 7)) == (numSlotsMask())) { /* begin rawOverflowSlotsOf:put: */ @@ -52258,8 +52273,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -52267,14 +52281,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -52304,8 +52318,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52313,14 +52326,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52343,8 +52356,7 @@ longPrintInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52352,14 +52364,14 @@ longPrintInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -52465,8 +52477,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -52474,14 +52485,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -52535,8 +52546,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -52544,14 +52554,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -52607,8 +52617,7 @@ longPrintReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -52616,14 +52625,14 @@ longPrintReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -52655,7 +52664,7 @@ mapMournQueue(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; sqInt i1; - usqInt mourner; + sqInt mourner; sqInt numOnThisPage; sqInt objStackPage; sqInt page; @@ -52764,7 +52773,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l11; + goto l10; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52790,7 +52799,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); setIsMarkedOfto(oop, 1); outIndex += 1; - l11: /* end newOutPointer:at:in:hashes: */; + l10: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52815,7 +52824,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe /* no room in outPointers; fail */ outIndex = 0; - goto l14; + goto l13; } /* begin storePointer:ofObject:withValue: */ assert(!(isForwarded(outPointerArray))); @@ -52841,7 +52850,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe long32Atput(oop + 4, ((((long32At(oop + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash2); setIsMarkedOfto(oop, 1); outIndex += 1; - l14: /* end newOutPointer:at:in:hashes: */; + l13: /* end newOutPointer:at:in:hashes: */; if (outIndex == 0) { /* no room in outPointers; fail */ @@ -52864,8 +52873,7 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -52873,14 +52881,14 @@ mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointe followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, segAddr)) { objOop = segAddr; - goto l6; + goto l5; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l6: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } return outIndex; } @@ -53360,7 +53368,7 @@ markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged) sqInt referent2; sqInt referent3; sqInt referent4; - usqInt sizeOfUnusedEden; + sqInt sizeOfUnusedEden; StackPage *thePage; runLeakCheckerFor(GCModeFull); @@ -53602,7 +53610,7 @@ markWeaklingsAndMarkAndFireEphemerons(void) sqInt i1; sqInt iLimiT; sqInt key; - usqInt lastptr; + sqInt lastptr; sqInt numOnThisPage; sqInt numToEnumerate; sqInt numToEnumerateOnThisPage; @@ -53975,8 +53983,7 @@ noInlineObjectAfterlimit(sqInt objOop, sqInt limit) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54012,7 +54019,7 @@ noUnscannedEphemerons(void) */ /* SpurMemoryManager>>#numBytesOfBytes: */ -static usqInt NoDbgRegParms +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop) { sqInt fmt; @@ -54027,7 +54034,7 @@ numBytesOfBytes(sqInt objOop) Does not adjust the size of contexts by stackPointer. */ /* SpurMemoryManager>>#numBytesOf: */ -usqInt +sqInt numBytesOf(sqInt objOop) { sqInt fmt; @@ -54291,8 +54298,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54314,8 +54320,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54338,8 +54343,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -54360,8 +54364,7 @@ objectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots13); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -54439,8 +54442,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54448,14 +54450,14 @@ objectBefore(sqInt objOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54477,8 +54479,7 @@ objectBefore(sqInt objOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54486,14 +54487,14 @@ objectBefore(sqInt objOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } return prev; } @@ -54518,8 +54519,7 @@ objectBefore(sqInt objOop) ? longAt(objOop2 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54527,14 +54527,14 @@ objectBefore(sqInt objOop) followingWordAddress2 = (objOop2 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop2 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } return prev; } @@ -54643,8 +54643,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(freeChunk - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -54730,8 +54729,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -54739,14 +54737,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -54781,8 +54779,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -54790,14 +54787,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit1)) { objOop2 = limit1; - goto l16; + goto l15; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l15: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -54825,8 +54822,7 @@ objectsReachableFromRoots(sqInt arrayOfRoots) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -54834,14 +54830,14 @@ objectsReachableFromRoots(sqInt arrayOfRoots) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l14; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* Now try and allocate the result */ @@ -54984,8 +54980,7 @@ oldSpaceObjectAfter(sqInt objOop) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55474,8 +55469,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55483,14 +55477,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55521,8 +55515,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55530,14 +55523,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55570,8 +55563,7 @@ printActivationsOf(sqInt aMethodObj) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55579,14 +55571,14 @@ printActivationsOf(sqInt aMethodObj) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55690,8 +55682,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55699,14 +55690,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -55744,8 +55735,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -55753,14 +55743,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -55800,8 +55790,7 @@ printContextReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55809,14 +55798,14 @@ printContextReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -55942,8 +55931,7 @@ printForwarders(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -55951,14 +55939,14 @@ printForwarders(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -55988,8 +55976,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -55997,14 +55984,14 @@ printForwarders(void) followingWordAddress = (objOop2 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop2 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop2 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56027,8 +56014,7 @@ printForwarders(void) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56036,14 +56022,14 @@ printForwarders(void) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop2 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56119,8 +56105,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56128,14 +56113,14 @@ printFreeChunks(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56163,8 +56148,7 @@ printFreeChunks(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56172,14 +56156,14 @@ printFreeChunks(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceEntitiesDo: */ assert(isOldObject(GIV(nilObj))); @@ -56202,8 +56186,7 @@ printFreeChunks(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56211,14 +56194,14 @@ printFreeChunks(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } @@ -56564,8 +56547,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56573,14 +56555,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -56610,8 +56592,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56619,14 +56600,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56649,8 +56630,7 @@ printInstancesWithClassIndex(sqInt classIndex) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56658,14 +56638,14 @@ printInstancesWithClassIndex(sqInt classIndex) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -56791,8 +56771,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56800,14 +56779,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -56836,8 +56815,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -56845,14 +56823,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -56883,8 +56861,7 @@ printMethodImplementorsOf(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -56892,14 +56869,14 @@ printMethodImplementorsOf(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -56982,8 +56959,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -56991,14 +56967,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57034,8 +57010,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57043,14 +57018,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57088,8 +57063,7 @@ printMethodReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57097,14 +57071,14 @@ printMethodReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -57188,8 +57162,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57197,14 +57170,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57234,8 +57207,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -57243,14 +57215,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57273,8 +57245,7 @@ printObjectsWithHash(sqInt hash) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57282,14 +57253,14 @@ printObjectsWithHash(sqInt hash) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57499,8 +57470,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57508,14 +57478,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -57543,8 +57513,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -57552,14 +57521,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57580,8 +57549,7 @@ printOopsSuchThat(sqInt (*function)(sqInt)) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57589,14 +57557,14 @@ printOopsSuchThat(sqInt (*function)(sqInt)) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -57671,13 +57639,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l21; + goto l18; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l21: /* end fetchStackPointerOf: */; + l18: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l20; + goto l17; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57685,15 +57653,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l20; + goto l17; } if (fmt == 7) { i = 1; - goto l20; + goto l17; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l20; + goto l17; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57710,7 +57678,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l20: /* end numPointerSlotsOf: */; + l17: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57734,8 +57702,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -57743,14 +57710,14 @@ printReferencesTo(sqInt anOop) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l15; + goto l14; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l15: /* end objectAfter:limit: */; + l14: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -57771,13 +57738,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l23; + goto l20; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l23: /* end fetchStackPointerOf: */; + l20: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l22; + goto l19; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -57785,15 +57752,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l22; + goto l19; } if (fmt == 7) { i = 1; - goto l22; + goto l19; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l22; + goto l19; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -57810,7 +57777,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l22: /* end numPointerSlotsOf: */; + l19: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop1); @@ -57834,8 +57801,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -57843,14 +57809,14 @@ printReferencesTo(sqInt anOop) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -57872,13 +57838,13 @@ printReferencesTo(sqInt anOop) sp = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l25; + goto l22; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop11))); contextSize = (sp >> 1); - l25: /* end fetchStackPointerOf: */; + l22: /* end fetchStackPointerOf: */; i = CtxtTempFrameStart + contextSize; - goto l24; + goto l21; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -57886,15 +57852,15 @@ printReferencesTo(sqInt anOop) i = (numSlots == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots); - goto l24; + goto l21; } if (fmt == 7) { i = 1; - goto l24; + goto l21; } if (fmt < (firstCompiledMethodFormat())) { i = 0; - goto l24; + goto l21; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -57911,7 +57877,7 @@ printReferencesTo(sqInt anOop) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; i = numLiterals + LiteralStart; - l24: /* end numPointerSlotsOf: */; + l21: /* end numPointerSlotsOf: */; while (((i -= 1)) >= 0) { if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { printHex(objOop11); @@ -57936,8 +57902,7 @@ printReferencesTo(sqInt anOop) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -57945,14 +57910,14 @@ printReferencesTo(sqInt anOop) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } } @@ -58363,7 +58328,6 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd usqInt limit; sqInt oldStart; sqInt p; - sqInt requestedSurvivorBytes; sqInt reserve; sqInt survivorBytes; sqInt totalBytes; @@ -58373,8 +58337,7 @@ setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd GIV(newSpaceLimit) = (baseOfHeap + GIV(edenBytes)) + reserve; /* begin newSpaceStart:newSpaceBytes:survivorBytes: */ totalBytes = GIV(newSpaceLimit) - GIV(newSpaceStart); - requestedSurvivorBytes = ((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7; - survivorBytes = (requestedSurvivorBytes & ~7); + survivorBytes = ((((GIV(newSpaceLimit) - GIV(newSpaceStart)) - reserve) / 7) & ~7); actualEdenBytes = (((totalBytes - survivorBytes) - survivorBytes) & ~7); assert((((totalBytes - actualEdenBytes) - survivorBytes) - survivorBytes) < (allocationUnit())); (GIV(pastSpace).start = GIV(newSpaceStart)); @@ -58425,7 +58388,7 @@ shortentoIndexableSize(sqInt objOop, sqInt indexableSize) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqInt bytesBefore; sqInt classIndex; - usqInt delta; + sqInt delta; sqInt format; sqInt freeChunk; sqInt numSlots; @@ -58618,6 +58581,16 @@ startOfObject(sqInt objOop) } +/* Part of InterpreterProxy's 1.14 API */ + + /* SpurMemoryManager>>#statNumGCs */ +EXPORT(sqInt) +statNumGCs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(statScavenges) + GIV(statIncrGCs)) + GIV(statFullGCs); +} + + /* A renaming for the Cogit, which couldn't make sense of GIV(newSpaceLimit) */ /* SpurMemoryManager>>#storeCheckBoundary */ @@ -58733,7 +58706,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedInHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots3, numBytes, formatField, classIndex); - goto l9; + goto l8; } if (numSlots3 >= (numSlotsMask())) { @@ -58750,7 +58723,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj % (allocationUnit())) == 0); GIV(freeStart) += numBytes; savedInHashes = newObj; -l9: /* end allocateSlots:format:classIndex: */; +l8: /* end allocateSlots:format:classIndex: */; /* begin allocateSlots:format:classIndex: */ numBytes3 = (numSlotsOf(outPointerArray)) * 4; numSlots4 = (numBytes3 + (BytesPerWord - 1)) / BytesPerWord; @@ -58774,7 +58747,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr forceInterruptCheck(); } savedOutHashes = allocateSlotsInOldSpacebytesformatclassIndex(numSlots4, numBytes1, formatField1, classIndex1); - goto l11; + goto l10; } if (numSlots4 >= (numSlotsMask())) { @@ -58791,7 +58764,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr assert((newObj1 % (allocationUnit())) == 0); GIV(freeStart) += numBytes1; savedOutHashes = newObj1; -l11: /* end allocateSlots:format:classIndex: */; +l10: /* end allocateSlots:format:classIndex: */; if ((savedInHashes == null) || (savedOutHashes == null)) { freeObject(arrayOfObjects); @@ -58857,8 +58830,7 @@ storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerAr ? longAt(segmentWordArray - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -59021,7 +58993,7 @@ stringForCString(const char *aCString) static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt heapSizePostGC; + sqInt heapSizePostGC; assert(numBytes == 0); scavengingGCTenuringIf(TenureByAge); @@ -59703,11 +59675,11 @@ compact(void) sqInt prevPrevObj; sqInt prevPrevObj1; sqInt prevPrevObj2; - usqInt sizeOfEden; + sqInt sizeOfEden; usqInt slotBytes; usqInt slotBytes1; usqInt slotBytes2; - usqInt spaceEstimate; + sqInt spaceEstimate; /* for profiling */ @@ -59722,7 +59694,7 @@ compact(void) assert((long64At(objOop11)) != 0); if (isEnumerableObject(objOop11)) { if (oopisGreaterThanOrEqualTo(objOop11, GIV(firstMobileObject))) { - goto l10; + goto l8; } setIsMarkedOfto(objOop11, 0); @@ -59736,8 +59708,7 @@ compact(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -59745,16 +59716,16 @@ compact(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l8; + goto l7; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l7: /* end objectAfter:limit: */; } - l10: /* end unmarkInitialImmobileObjects */; + l8: /* end unmarkInitialImmobileObjects */; /* begin unmarkSurvivingObjectsForCompact */ prevPrevObj = (prevObj = null); /* begin objectStartingAt: */ @@ -59778,8 +59749,7 @@ compact(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -59787,14 +59757,14 @@ compact(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(pastSpaceStart))) { objOop1 = GIV(pastSpaceStart); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return; } @@ -59814,16 +59784,16 @@ compact(void) if (((bytesInObject(largestFreeChunk)) >= spaceEstimate) && ((((usqInt)largestFreeChunk)) > (((usqInt)((endOfMemory()) - GIV(totalFreeOldSpace)))))) { highestSuitableFreeBlock1 = largestFreeChunk; - goto l22; + goto l19; } } highestSuitableFreeBlock1 = null; - l22: /* end findHighestSuitableFreeBlock: */; + l19: /* end findHighestSuitableFreeBlock: */; if (!(highestSuitableFreeBlock1 == null)) { if ((spaceEstimate > ((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1)))) && (useSegmentForSavedFirstFieldsSpace(spaceEstimate))) { - goto l19; + goto l16; } if (((assert(isFreeObject(highestSuitableFreeBlock1)), bytesInObject(highestSuitableFreeBlock1))) > sizeOfEden) { @@ -59832,11 +59802,11 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = addressAfter(highestSuitableFreeBlock1)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 0; assert(!((savedFirstFieldsSpaceWasAllocated()))); - goto l19; + goto l16; } } if (useSegmentForSavedFirstFieldsSpace(spaceEstimate)) { - goto l19; + goto l16; } } /* begin useEdenForSavedFirstFieldsSpace */ @@ -59844,7 +59814,7 @@ compact(void) (GIV(savedFirstFieldsSpace).limit = ((eden()).limit)); GIV(savedFirstFieldsSpaceNotInOldSpace) = 1; assert(!((savedFirstFieldsSpaceWasAllocated()))); -l19: /* end selectSavedFirstFieldsSpace */; +l16: /* end selectSavedFirstFieldsSpace */; /* begin unpinRememberedSet */ objOop5 = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((int)((usqInt)(RememberedSetRootIndex) << (shiftForWord()))))); GIV(firstFieldOfRememberedSet) = longAt((objOop5 + BaseHeaderSize) + (0U << (shiftForWord()))); @@ -59912,8 +59882,7 @@ compact(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -59921,14 +59890,14 @@ compact(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(pastSpaceStart))) { objOop12 = GIV(pastSpaceStart); - goto l17; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l17: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } /* begin endSlidingCompaction */ GIV(gcPhaseInProgress) = 0; @@ -60027,8 +59996,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(finalObject - BaseHeaderSize) : numSlots12); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60048,8 +60016,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -60057,14 +60024,14 @@ copyAndUnmarkMobileObjects(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { nextObj = GIV(endOfMemory); - goto l9; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); nextObj = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l9: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; assert((previousPin == null ? toFinger <= (startOfObject(objOop)) : (isMarked(previousPin)) @@ -60122,8 +60089,7 @@ copyAndUnmarkMobileObjects(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60200,7 +60166,7 @@ copyAndUnmarkMobileObjects(void) : previousPin)); /* begin coalesceFrom: */ if (toFinger >= (endOfMemory())) { - goto l20; + goto l17; } /* begin objectStartingAt: */ numSlots5 = byteAt(toFinger + 7); @@ -60222,7 +60188,7 @@ copyAndUnmarkMobileObjects(void) obj = next; } } -l20: /* end coalesceFrom: */; +l17: /* end coalesceFrom: */; return 1; } @@ -60271,7 +60237,7 @@ copyAndUnmark(sqInt firstPass) assert((long64At(objOop1)) != 0); if (isEnumerableObject(objOop1)) { if (oopisGreaterThanOrEqualTo(objOop1, GIV(firstMobileObject))) { - goto l5; + goto l4; } setIsMarkedOfto(objOop1, 0); @@ -60285,8 +60251,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60294,16 +60259,16 @@ copyAndUnmark(sqInt firstPass) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } - l5: /* end unmarkInitialImmobileObjects */; + l4: /* end unmarkInitialImmobileObjects */; } finalPass = copyAndUnmarkMobileObjects(); if ((GIV(lastMobileObject) != null) @@ -60368,8 +60333,7 @@ copyAndUnmark(sqInt firstPass) ? longAt(objOop2 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60377,14 +60341,14 @@ copyAndUnmark(sqInt firstPass) followingWordAddress1 = (objOop2 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(endOfMemory))) { objOop2 = GIV(endOfMemory); - goto l9; + goto l5; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop2 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l9: /* end objectAfter:limit: */; + l5: /* end objectAfter:limit: */; } if (!(startOfFree == null)) { /* begin addFreeChunkWithBytes:at: */ @@ -60403,9 +60367,6 @@ copyAndUnmark(sqInt firstPass) static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt bytes; - sqInt bytes1; - sqInt bytes2; usqInt numSlots; usqInt numSlots1; usqInt numSlots2; @@ -60421,9 +60382,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) : nextObject); if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes = objStart - toFinger; - freeChunkWithBytesat(bytes, toFinger); - GIV(totalFreeOldSpace) += bytes; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = objStart; while (objStart < limit) { @@ -60451,9 +60411,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (toFinger < objStart) { /* begin addFreeChunkWithBytes:at: */ - bytes1 = objStart - toFinger; - freeChunkWithBytesat(bytes1, toFinger); - GIV(totalFreeOldSpace) += bytes1; + freeChunkWithBytesat(objStart - toFinger, toFinger); + GIV(totalFreeOldSpace) += objStart - toFinger; } toFinger = (objStart = addressAfter(obj)); } @@ -60464,8 +60423,7 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) ? longAt(obj - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60475,9 +60433,8 @@ freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject) } if (limit > toFinger) { /* begin addFreeChunkWithBytes:at: */ - bytes2 = limit - toFinger; - freeChunkWithBytesat(bytes2, toFinger); - GIV(totalFreeOldSpace) += bytes2; + freeChunkWithBytesat(limit - toFinger, toFinger); + GIV(totalFreeOldSpace) += limit - toFinger; } } @@ -60535,7 +60492,7 @@ isPostMobile(sqInt obj) static sqInt NeverInline planCompactSavingForwarders(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt followingWord; usqInt followingWordAddress; @@ -60610,8 +60567,7 @@ planCompactSavingForwarders(void) ? longAt(previousPin - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -60667,8 +60623,7 @@ planCompactSavingForwarders(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots3 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots3 + (numSlots3 & 1)) << (shiftForWord()); @@ -60676,14 +60631,14 @@ planCompactSavingForwarders(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l11; + goto l8; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l8: /* end objectAfter:limit: */; } if (!(GIV(lastMobileObject) == null)) { (GIV(savedFirstFieldsSpace).top = top - BytesPerOop); @@ -60746,8 +60701,7 @@ reinitializeScanFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60755,14 +60709,14 @@ reinitializeScanFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } GIV(firstMobileObject) = GIV(objectAfterLastMobileObject); } @@ -60879,8 +60833,7 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -60888,14 +60841,14 @@ scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return firstFree; } @@ -60935,7 +60888,7 @@ static void NeverInline updatePointers(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt address; - usqInt availableSpace; + sqInt availableSpace; usqInt bytes; sqInt contextSize; sqInt contextSize1; @@ -61101,13 +61054,13 @@ updatePointers(void) sp1 = longAt((objOop11 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp1 & 1))) { contextSize1 = 0; - goto l66; + goto l61; } assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(objOop11))); contextSize1 = (sp1 >> 1); - l66: /* end fetchStackPointerOf: */; + l61: /* end fetchStackPointerOf: */; numPointerSlots1 = CtxtTempFrameStart + contextSize1; - goto l65; + goto l60; } /* begin numSlotsOf: */ assert((classIndexOf(objOop11)) > (isForwardedObjectClassIndexPun())); @@ -61115,15 +61068,15 @@ updatePointers(void) numPointerSlots1 = (numSlots3 == (numSlotsMask()) ? longAt(objOop11 - BaseHeaderSize) : numSlots3); - goto l65; + goto l60; } if (fmt1 == 7) { numPointerSlots1 = 1; - goto l65; + goto l60; } if (fmt1 < (firstCompiledMethodFormat())) { numPointerSlots1 = 0; - goto l65; + goto l60; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop11)); @@ -61140,7 +61093,7 @@ updatePointers(void) assert((header2 & 1)); numLiterals1 = ((header2 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots1 = numLiterals1 + LiteralStart; - l65: /* end numPointerSlotsOf: */; + l60: /* end numPointerSlotsOf: */; for (i2 = 0; i2 < numPointerSlots1; i2 += 1) { /* begin fetchPointer:ofObject: */ oop2 = longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i2) << (shiftForWord()))))); @@ -61167,8 +61120,7 @@ updatePointers(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots11); if (numSlots4 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots4 + (numSlots4 & 1)) << (shiftForWord()); @@ -61176,14 +61128,14 @@ updatePointers(void) followingWordAddress1 = (objOop11 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(pastSpaceStart))) { objOop11 = GIV(pastSpaceStart); - goto l20; + goto l24; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop11 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l20: /* end objectAfter:limit: */; + l24: /* end objectAfter:limit: */; } /* begin updatePointersInInitialImmobileObjects */ assert(isOldObject(GIV(nilObj))); @@ -61195,7 +61147,7 @@ updatePointers(void) assert((long64At(objOop12)) != 0); if (isEnumerableObject(objOop12)) { if (oopisGreaterThanOrEqualTo(objOop12, GIV(firstFreeObject))) { - goto l44; + goto l41; } /* begin updatePointersIn: */ fmt2 = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); @@ -61208,13 +61160,13 @@ updatePointers(void) sp2 = longAt((objOop12 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp2 & 1))) { contextSize2 = 0; - goto l68; + goto l63; } assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(objOop12))); contextSize2 = (sp2 >> 1); - l68: /* end fetchStackPointerOf: */; + l63: /* end fetchStackPointerOf: */; numPointerSlots2 = CtxtTempFrameStart + contextSize2; - goto l67; + goto l62; } /* begin numSlotsOf: */ assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); @@ -61222,15 +61174,15 @@ updatePointers(void) numPointerSlots2 = (numSlots5 == (numSlotsMask()) ? longAt(objOop12 - BaseHeaderSize) : numSlots5); - goto l67; + goto l62; } if (fmt2 == 7) { numPointerSlots2 = 1; - goto l67; + goto l62; } if (fmt2 < (firstCompiledMethodFormat())) { numPointerSlots2 = 0; - goto l67; + goto l62; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop12)); @@ -61247,7 +61199,7 @@ updatePointers(void) assert((header3 & 1)); numLiterals2 = ((header3 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots2 = numLiterals2 + LiteralStart; - l67: /* end numPointerSlotsOf: */; + l62: /* end numPointerSlotsOf: */; for (i3 = 0; i3 < numPointerSlots2; i3 += 1) { /* begin fetchPointer:ofObject: */ oop3 = longAt((objOop12 + BaseHeaderSize) + (((sqInt)((usqInt)(i3) << (shiftForWord()))))); @@ -61275,8 +61227,7 @@ updatePointers(void) ? longAt(objOop12 - BaseHeaderSize) : numSlots12); if (numSlots22 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots22 + (numSlots22 & 1)) << (shiftForWord()); @@ -61284,16 +61235,16 @@ updatePointers(void) followingWordAddress2 = (objOop12 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop12 = GIV(endOfMemory); - goto l39; + goto l40; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop12 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l39: /* end objectAfter:limit: */; + l40: /* end objectAfter:limit: */; } -l44: /* end updatePointersInInitialImmobileObjects */; +l41: /* end updatePointersInInitialImmobileObjects */; /* begin updatePointersInMobileObjects */ assert(!((isMarked(GIV(firstFreeObject))))); /* begin startOfObject: */ @@ -61334,13 +61285,13 @@ updatePointers(void) sp3 = longAt((objOop4 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp3 & 1))) { contextSize3 = 0; - goto l69; + goto l64; } assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(objOop4))); contextSize3 = (sp3 >> 1); - l69: /* end fetchStackPointerOf: */; + l64: /* end fetchStackPointerOf: */; numPointerSlots3 = CtxtTempFrameStart + contextSize3; - goto l70; + goto l65; } /* begin numSlotsOf: */ assert((classIndexOf(objOop4)) > (isForwardedObjectClassIndexPun())); @@ -61348,15 +61299,15 @@ updatePointers(void) numPointerSlots3 = (numSlots41 == (numSlotsMask()) ? longAt(objOop4 - BaseHeaderSize) : numSlots41); - goto l70; + goto l65; } if (fmt3 == 7) { numPointerSlots3 = 1; - goto l70; + goto l65; } if (fmt3 < (firstCompiledMethodFormat())) { numPointerSlots3 = 0; - goto l70; + goto l65; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop4)); @@ -61373,7 +61324,7 @@ updatePointers(void) assert((header4 & 1)); numLiterals3 = ((header4 >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots3 = numLiterals3 + LiteralStart; - l70: /* end numPointerSlotsOf: */; + l65: /* end numPointerSlotsOf: */; for (i4 = 0; i4 < numPointerSlots3; i4 += 1) { /* begin fetchPointer:ofObject: */ oop4 = longAt((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(i4) << (shiftForWord()))))); @@ -61410,8 +61361,7 @@ updatePointers(void) ? longAt(previousPin - BaseHeaderSize) : numSlots13); if (numSlots23 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots23 + (numSlots23 & 1)) << (shiftForWord()); @@ -61446,7 +61396,7 @@ updatePointers(void) if (((top += BytesPerOop)) >= ((GIV(savedFirstFieldsSpace).limit))) { assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 0; - goto l64; + goto l59; } } } @@ -61459,8 +61409,7 @@ updatePointers(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots111); if (numSlots31 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots31 + (numSlots31 & 1)) << (shiftForWord()); @@ -61468,18 +61417,18 @@ updatePointers(void) followingWordAddress3 = (objOop4 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress3, GIV(endOfMemory))) { objOop4 = GIV(endOfMemory); - goto l59; + goto l42; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop4 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l59: /* end objectAfter:limit: */; + l42: /* end objectAfter:limit: */; } assert(((GIV(savedFirstFieldsSpace).top)) == (top - BytesPerOop)); onePass = 1; -l64: /* end updatePointersInMobileObjects */; +l59: /* end updatePointersInMobileObjects */; if (!onePass) { /* begin updatePointersInObjectsOverflowingSavedFirstFieldsSpace */ assert(isOldObject(GIV(objectAfterLastMobileObject))); @@ -61502,13 +61451,13 @@ updatePointers(void) sp = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); if (!((sp & 1))) { contextSize = 0; - goto l71; + goto l66; } assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(objOop1))); contextSize = (sp >> 1); - l71: /* end fetchStackPointerOf: */; + l66: /* end fetchStackPointerOf: */; numPointerSlots = CtxtTempFrameStart + contextSize; - goto l72; + goto l67; } /* begin numSlotsOf: */ assert((classIndexOf(objOop1)) > (isForwardedObjectClassIndexPun())); @@ -61516,15 +61465,15 @@ updatePointers(void) numPointerSlots = (numSlots == (numSlotsMask()) ? longAt(objOop1 - BaseHeaderSize) : numSlots); - goto l72; + goto l67; } if (fmt == 7) { numPointerSlots = 1; - goto l72; + goto l67; } if (fmt < (firstCompiledMethodFormat())) { numPointerSlots = 0; - goto l72; + goto l67; } /* begin methodHeaderOf: */ assert(isCompiledMethod(objOop1)); @@ -61541,7 +61490,7 @@ updatePointers(void) assert((header & 1)); numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask; numPointerSlots = numLiterals + LiteralStart; - l72: /* end numPointerSlotsOf: */; + l67: /* end numPointerSlotsOf: */; for (i = 0; i < numPointerSlots; i += 1) { /* begin fetchPointer:ofObject: */ oop = longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))); @@ -61570,8 +61519,7 @@ updatePointers(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -61579,14 +61527,14 @@ updatePointers(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } } } @@ -61788,8 +61736,7 @@ validRelocationPlanInPass(sqInt onePass) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -61797,14 +61744,14 @@ validRelocationPlanInPass(sqInt onePass) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, GIV(endOfMemory))) { objOop = GIV(endOfMemory); - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } return ((((((GIV(savedFirstFieldsSpace).top)) + BytesPerOop) - ((GIV(savedFirstFieldsSpace).start))) / BytesPerOop) == nMobiles ? 0 @@ -61889,7 +61836,7 @@ static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt i; - usqInt oldBaseAddr; + sqInt oldBaseAddr; SpurSegmentInfo *segInfo; oldBaseAddr = GIV(oldSpaceStart) - firstSegmentShift; @@ -61989,8 +61936,8 @@ bridgeFor(SpurSegmentInfo *aSegment) static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil) { - usqInt bridgeSpan; - usqInt clifton; + sqInt bridgeSpan; + sqInt clifton; usqInt segEnd; segEnd = ((aSegment->segSize)) + ((aSegment->segStart)); @@ -62157,7 +62104,7 @@ nextNonEmptySegmentAfter(sqInt i) static void postSnapshot(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt address; + sqInt address; sqInt bytes; usqInt freeChunk; sqInt i; @@ -62273,8 +62220,7 @@ prepareForSnapshot(void) ? longAt(node - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -62282,24 +62228,24 @@ prepareForSnapshot(void) followingWordAddress = (node + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { next = limit; - goto l11; + goto l10; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); next = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l11: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; if (((longAt(next)) & (classIndexMask())) == (segmentBridgePun())) { /* begin segmentContainingObj: */ for (i1 = (GIV(numSegments) - 1); i1 >= 0; i1 += -1) { if (node >= (((GIV(segments)[i1]).segStart))) { seg = (&(GIV(segments)[i1])); - goto l12; + goto l11; } } seg = null; - l12: /* end segmentContainingObj: */; + l11: /* end segmentContainingObj: */; (seg->lastFreeObject = node); node = 0; } @@ -62362,8 +62308,8 @@ prepareForSnapshot(void) static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bridge; - usqInt bridgehead; + sqInt bridge; + sqInt bridgehead; usqInt bridgeSpan; sqInt bytesRead; usqInt newBase; @@ -62592,8 +62538,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); @@ -62994,8 +62940,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -63003,14 +62948,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -63031,8 +62976,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -63040,14 +62984,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -63070,8 +63014,7 @@ checkAllAccessibleObjectsOkay(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -63079,14 +63022,14 @@ checkAllAccessibleObjectsOkay(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } return ok; } @@ -63801,7 +63744,7 @@ contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfClosure: */ -usqInt +sqInt copiedValueCountOfClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - ClosureFirstCopiedValueIndex; @@ -63811,7 +63754,7 @@ copiedValueCountOfClosure(sqInt closurePointer) /* for Cogit */ /* StackInterpreter>>#copiedValueCountOfFullClosure: */ -usqInt +sqInt copiedValueCountOfFullClosure(sqInt closurePointer) { return (numSlotsOf(closurePointer)) - FullClosureFirstCopiedValueIndex; @@ -63899,9 +63842,9 @@ cr(void) static void NoDbgRegParms createActualMessageTo(sqInt lookupClass) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt argumentArray; + usqInt argumentArray; sqInt i; - sqInt message; + usqInt message; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -64007,6 +63950,35 @@ defaultNumStackPages(void) } +/* Release the VM to other threads and answer the current thread's index. + + This is the entry-point for plugins and primitives that wish to release + the VM while + performing some operation that may potentially block, and for callbacks + returning back to some blocking operation. While this exists for the + threaded FFI VM we use + it to reset newMethod and the argumentCount after a callback. */ + + /* StackInterpreter>>#disownVM: */ +sqInt +disownVM(sqInt flags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt top; + + assert(((flags & 1)) + && (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))); + assert(GIV(primFailCode) == 0); + GIV(argumentCount) = (flags >> 1); + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + GIV(newMethod) = top; + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + return 0; +} + + /* Repaint the portion of the Smalltalk screen bounded by the affected rectangle. Used to synchronize the screen after a Bitblt to the Smalltalk Display object. @@ -64628,8 +64600,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots13); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes3 = ((sqInt) 8); + slotBytes3 = 8; } else { slotBytes3 = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -64637,14 +64608,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress3 = (objOop12 + BaseHeaderSize) + slotBytes3; if (oopisGreaterThanOrEqualTo(followingWordAddress3, limit1)) { objOop12 = limit1; - goto l17; + goto l18; } flag("endianness"); followingWord3 = longAt(followingWordAddress3 + 4); objOop12 = ((((usqInt) followingWord3) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress3 + BaseHeaderSize : followingWordAddress3); - l17: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address11 = ((eden()).start); @@ -64696,8 +64667,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop12 - BaseHeaderSize) : numSlots111); if (numSlots21 == 0) { - /* begin allocationUnit */ - slotBytes11 = ((sqInt) 8); + slotBytes11 = 8; } else { slotBytes11 = (numSlots21 + (numSlots21 & 1)) << (shiftForWord()); @@ -64705,14 +64675,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress11 = (objOop12 + BaseHeaderSize) + slotBytes11; if (oopisGreaterThanOrEqualTo(followingWordAddress11, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l25; + goto l17; } flag("endianness"); followingWord11 = longAt(followingWordAddress11 + 4); objOop12 = ((((usqInt) followingWord11) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress11 + BaseHeaderSize : followingWordAddress11); - l25: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64766,8 +64736,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop111 - BaseHeaderSize) : numSlots121); if (numSlots51 == 0) { - /* begin allocationUnit */ - slotBytes21 = ((sqInt) 8); + slotBytes21 = 8; } else { slotBytes21 = (numSlots51 + (numSlots51 & 1)) << (shiftForWord()); @@ -64775,20 +64744,20 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress21 = (objOop111 + BaseHeaderSize) + slotBytes21; if (oopisGreaterThanOrEqualTo(followingWordAddress21, GIV(endOfMemory))) { objOop111 = GIV(endOfMemory); - goto l29; + goto l19; } flag("endianness"); followingWord21 = longAt(followingWordAddress21 + 4); objOop111 = ((((usqInt) followingWord21) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress21 + BaseHeaderSize : followingWordAddress21); - l29: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } } else { /* begin convertFloatsToPlatformOrder */ if (VMBIGENDIAN == GIV(imageFloatsBigEndian)) { - goto l15; + goto l12; } assert(ClassFloatCompactIndex != 0); /* begin allObjectsDo: */ @@ -64821,8 +64790,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -64830,14 +64798,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop1 = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -64862,8 +64830,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop1 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -64871,14 +64838,14 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop1 = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -64905,8 +64872,7 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -64914,16 +64880,16 @@ ensureImageFormatIsUpToDate(sqInt swapBytes) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l11; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l11: /* end objectAfter:limit: */; } - l15: /* end convertFloatsToPlatformOrder */; + l12: /* end convertFloatsToPlatformOrder */; } } @@ -65048,8 +65014,9 @@ externalDivorceFrameandContext(char *theFP, sqInt ctxt) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); } else { markStackPageMostRecentlyUsed(newPage); @@ -65123,8 +65090,9 @@ externalEnsureIsBaseFrame(char *aFramePtr) theFP = storeSenderOfFramewithValue(theFP, ensureCallerContext(theFP)); if (onCurrent) { assert(GIV(stackPage) != thePage); - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -65214,8 +65182,9 @@ externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop) } } if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { markStackPageMostRecentlyUsed(GIV(stackPage)); @@ -66563,8 +66532,9 @@ handleStackOverflow(void) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); assert(validInstructionPointerinFrame(GIV(instructionPointer) + 1, GIV(framePointer))); assert((!(frameHasContext(GIV(framePointer)))) || (isContext(frameContext(GIV(framePointer))))); @@ -67636,7 +67606,7 @@ lookupMethodInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67813,7 +67783,7 @@ lookupMNUInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -67983,7 +67953,7 @@ lookupOrdinaryNoMNUEtcInClass(sqInt class) sqInt hash1; sqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt methodArray; sqInt nextSelector; usqInt numSlots; @@ -68147,11 +68117,12 @@ lookupSelectorinClass(sqInt selector, sqInt class) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt currentClass; sqInt dictionary; + sqInt fieldIndex; sqInt hash; sqInt hash1; - sqInt index; + usqInt index; usqInt length; - usqInt mask; + sqInt mask; sqInt meth; sqInt methodArray; sqInt nextSelector; @@ -68203,7 +68174,7 @@ lookupSelectorinClass(sqInt selector, sqInt class) wrapAround = 0; while (1) { /* begin fetchPointer:ofObject: */ - nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); + nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord()))); if (nextSelector == GIV(nilObj)) { meth = null; goto l12; @@ -68221,10 +68192,12 @@ lookupSelectorinClass(sqInt selector, sqInt class) } methodArray = objOop2; /* begin followField:ofObject: */ - objOop11 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord()))))); + fieldIndex = index - SelectorStart; + /* begin fetchPointer:ofObject: */ + objOop11 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); if (((objOop11 & (tagMask())) == 0) && (((longAt(objOop11)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop11 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop11); + objOop11 = fixFollowedFieldofObjectwithInitialValue(fieldIndex, methodArray, objOop11); } meth = objOop11; goto l12; @@ -68318,7 +68291,7 @@ makePointwithxValueyValue(sqInt xValue, sqInt yValue) usqInt numBytes; sqInt numSlots; sqInt objFormat; - sqInt pointResult; + usqInt pointResult; /* begin eeInstantiateSmallClass:numSlots: */ classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); @@ -68665,8 +68638,9 @@ marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext) GIV(stackLimit) = (GIV(stackPage)->stackLimit); } markStackPageMostRecentlyUsed(newPage); - GIV(framePointer) = (GIV(stackPage)->headFP); - GIV(stackPointer) = (GIV(stackPage)->headSP); + /* begin setStackPointersFromPage: */ + GIV(stackPointer) = (newPage->headSP); + GIV(framePointer) = (newPage->headFP); /* begin setMethod: */ aMethodObj = longAt(((GIV(stackPage)->headFP)) + FoxMethod); assert((((usqInt)aMethodObj)) >= (startOfMemory())); @@ -68719,11 +68693,9 @@ marryFrameSP(char *theFP, char *theSP) numArgs = (cogMethod->cmNumArgs); if (((cogMethod->cmType)) == CMMethod) { if ((cogMethod->cpicHasMNUCaseOrCMIsFullBlock)) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } } @@ -68749,11 +68721,9 @@ marryFrameSP(char *theFP, char *theSP) ? LargeContextSlots : SmallContextSlots); if ((byteAt((theFP + FoxIFrameFlags) + 3)) != 0) { - /* begin frameStackedReceiver:numArgs: */ closureOrNil = longAt(theFP + ((FoxCallerSavedIP + BytesPerWord) + (numArgs << (shiftForWord())))); } else { - /* begin nilObject */ closureOrNil = GIV(nilObj); } /* begin iframeReceiver: */ @@ -68952,18 +68922,19 @@ methodClassOf(sqInt methodPointer) objOop1 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop1); } literal = objOop1; - if (literal != GIV(nilObj)) { - assert((isPointers(literal)) - && ((numSlotsOf(literal)) > ValueIndex)); - /* begin followField:ofObject: */ - objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); - if (((objOop & (tagMask())) == 0) - && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { - objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop); - } - literal = objOop; - } - return literal; + return ((literal != GIV(nilObj)) + && (((literal & (tagMask())) == 0) + && (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) <= 5)) + ? (assert((numSlotsOf(literal)) > ValueIndex), + /* begin followField:ofObject: */ + (objOop = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))))), + (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())) + ? (objOop = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop)) + : 0), + objOop) + : (/* begin nilObject */ + GIV(nilObj))); } @@ -69119,7 +69090,7 @@ noInlineSigned32BitIntegerGutsFor(sqInt integerValue) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt largeClass; unsigned int magnitude; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69304,6 +69275,39 @@ objectArg(sqInt index) return oop; } + +/* This is the entry-point for plugins and primitives that wish to reacquire + the VM after having + released it via disownVM or callbacks that want to acquire it without + knowing their ownership + status. While this exists for the threaded FFI VM we use it to reset + newMethod and the + argumentCount after a callback. + + Answer the argumentCount encoded as a SmallInteger if the current thread + is the VM thread. + Answer -1 if the current thread is unknown to the VM and fails to take + ownership. + */ + + /* StackInterpreter>>#ownVM: */ +sqInt +ownVM(sqInt threadIndexAndFlags) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + if (!(amInVMThread())) { + return -1; + } + assert(GIV(primFailCode) == 0); + assert((isOopCompiledMethod(GIV(newMethod))) + && ((argumentCountOf(GIV(newMethod))) == GIV(argumentCount))); + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + return (((usqInt)GIV(argumentCount) << 1) | 1); +} + /* StackInterpreter>>#penultimateLiteralOf: */ sqInt penultimateLiteralOf(sqInt aMethodOop) @@ -69359,7 +69363,7 @@ popthenPush(sqInt nItems, sqInt oop) static sqInt NoDbgRegParms positiveMachineIntegerFor(usqIntptr_t value) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt objFormat; @@ -69811,8 +69815,7 @@ printAllStacks(void) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -69820,14 +69823,14 @@ printAllStacks(void) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l13; + goto l22; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l22: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -69858,8 +69861,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots1); if (numSlots6 == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots6 + (numSlots6 & 1)) << (shiftForWord()); @@ -69867,14 +69869,14 @@ printAllStacks(void) followingWordAddress = (objOop4 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop4 = limit; - goto l16; + goto l17; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop4 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l17: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -69898,8 +69900,7 @@ printAllStacks(void) ? longAt(objOop4 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -69907,14 +69908,14 @@ printAllStacks(void) followingWordAddress1 = (objOop4 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop4 = GIV(freeStart); - goto l22; + goto l16; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop4 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l22: /* end objectAfter:limit: */; + l16: /* end objectAfter:limit: */; } } @@ -70643,7 +70644,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } if ((oop & 1)) { printNum((oop >> 1)); @@ -70654,23 +70655,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l30; + goto l27; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l30; + goto l27; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l30; + goto l27; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l30; + goto l27; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -70686,38 +70687,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l30; + goto l27; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l30; + goto l27; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l30; + goto l27; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l30; + goto l27; } if (oop == GIV(nilObj)) { print("nil"); - goto l30; + goto l27; } if (oop == GIV(trueObj)) { print("true"); - goto l30; + goto l27; } if (oop == GIV(falseObj)) { print("false"); - goto l30; + goto l27; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l30; + goto l27; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -70730,7 +70731,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l30; + goto l27; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -70738,7 +70739,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l30; + goto l27; } } if ((nameLen == 9) @@ -70749,7 +70750,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l30; + goto l27; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -70763,7 +70764,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l30; + goto l27; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -70776,12 +70777,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l28; + goto l25; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l29; + goto l26; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -70792,7 +70793,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l29: ; + l26: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -70800,9 +70801,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l28: ; + l25: ; } - l30: /* end printOopShortInner: */; + l27: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -70816,8 +70817,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -70825,14 +70825,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress = (objOop12 + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop12 = limit; - goto l16; + goto l19; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop12 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l16: /* end objectAfter:limit: */; + l19: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -70879,7 +70879,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } if ((oop & 1)) { printNum((oop >> 1)); @@ -70890,23 +70890,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l33; + goto l30; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l33; + goto l30; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l33; + goto l30; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l33; + goto l30; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -70922,38 +70922,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l33; + goto l30; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l33; + goto l30; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l33; + goto l30; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l33; + goto l30; } if (oop == GIV(nilObj)) { print("nil"); - goto l33; + goto l30; } if (oop == GIV(trueObj)) { print("true"); - goto l33; + goto l30; } if (oop == GIV(falseObj)) { print("false"); - goto l33; + goto l30; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l33; + goto l30; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -70966,7 +70966,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l33; + goto l30; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -70974,7 +70974,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l33; + goto l30; } } if ((nameLen == 9) @@ -70985,7 +70985,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l33; + goto l30; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -70999,7 +70999,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l33; + goto l30; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71012,12 +71012,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l31; + goto l28; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l32; + goto l29; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71028,7 +71028,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l32: ; + l29: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71036,9 +71036,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l31: ; + l28: ; } - l33: /* end printOopShortInner: */; + l30: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71052,8 +71052,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop12 - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -71061,14 +71060,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress1 = (objOop12 + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop12 = GIV(freeStart); - goto l23; + goto l18; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop12 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l23: /* end objectAfter:limit: */; + l18: /* end objectAfter:limit: */; } /* begin allOldSpaceObjectsDo: */ assert(isOldObject(GIV(nilObj))); @@ -71116,7 +71115,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } if ((oop & 1)) { printNum((oop >> 1)); @@ -71127,23 +71126,23 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar(')'); - goto l36; + goto l33; } print("unknown immediate "); /* begin printHexnp: */ printf("0x%lx", ((unsigned long) oop)); - goto l36; + goto l33; } if (!(addressCouldBeObj(oop))) { print(((oop & (8 - 1)) != 0 ? " is misaligned" : whereIs(oop))); - goto l36; + goto l33; } if (((longAt(oop)) & (classIndexMask())) == (isFreeObjectClassIndexPun())) { print(" is a free chunk"); - goto l36; + goto l33; } if (((longAt(oop)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { print(" is a forwarder to "); @@ -71159,38 +71158,38 @@ printLikelyImplementorsOfSelector(sqInt selector) n1 = referent; printf("0x%lx", ((unsigned long) n1)); - goto l36; + goto l33; } if (((oop & (tagMask())) == 0) && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex)) { printFloat(dbgFloatValueOf(oop)); - goto l36; + goto l33; } classOop = fetchClassOfNonImm(oop); if (!(addressCouldBeObj(classOop))) { print("a ??"); - goto l36; + goto l33; } if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) { printNameOfClasscount(oop, 5); - goto l36; + goto l33; } if (oop == GIV(nilObj)) { print("nil"); - goto l36; + goto l33; } if (oop == GIV(trueObj)) { print("true"); - goto l36; + goto l33; } if (oop == GIV(falseObj)) { print("false"); - goto l36; + goto l33; } nameLen = lengthOfNameOfClass(classOop); if (nameLen == 0) { print("a ??"); - goto l36; + goto l33; } name = nameOfClass(classOop); if (nameLen == 10) { @@ -71203,7 +71202,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('\''); - goto l36; + goto l33; } if ((strncmp(name, "ByteSymbol", 10)) == 0) { @@ -71211,7 +71210,7 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printChar: */ putchar('#'); printStringOf(oop); - goto l36; + goto l33; } } if ((nameLen == 9) @@ -71222,7 +71221,7 @@ printLikelyImplementorsOfSelector(sqInt selector) aByte1 = ((longAt((oop + BaseHeaderSize) + (0U << (shiftForWord())))) >> 1); putchar(aByte1); - goto l36; + goto l33; } print("a(n) "); for (i = 0; i < nameLen; i += 1) { @@ -71236,7 +71235,7 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = fetchClassOfNonImm(splObj(SchedulerAssociation)); while (1) { if (classLookupKey == GIV(nilObj)) { - goto l36; + goto l33; } if (((assert(addressCouldBeClassObj(classLookupKey)), (((longAt((classLookupKey + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1))) == (KeyIndex + 1)) break; @@ -71249,12 +71248,12 @@ printLikelyImplementorsOfSelector(sqInt selector) classLookupKey = objOop; } if (classLookupKey == GIV(nilObj)) { - goto l34; + goto l31; } theClass1 = classOop; while (1) { if (theClass1 == classLookupKey) { - goto l35; + goto l32; } if (!(theClass1 != GIV(nilObj))) break; /* begin followField:ofObject: */ @@ -71265,7 +71264,7 @@ printLikelyImplementorsOfSelector(sqInt selector) } theClass1 = objOop1; } - l35: ; + l32: ; /* begin space */ putchar(' '); printOopShort(longAt((oop + BaseHeaderSize) + (((int)((usqInt)(KeyIndex) << (shiftForWord())))))); @@ -71273,9 +71272,9 @@ printLikelyImplementorsOfSelector(sqInt selector) /* begin printHexnp: */ n2 = longAt((oop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); printf("0x%lx", ((unsigned long) n2)); - l34: ; + l31: ; } - l36: /* end printOopShortInner: */; + l33: /* end printOopShortInner: */; /* begin cr */ printf("\n"); } @@ -71290,8 +71289,7 @@ printLikelyImplementorsOfSelector(sqInt selector) ? longAt(objOop11 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -71299,14 +71297,14 @@ printLikelyImplementorsOfSelector(sqInt selector) followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop11 = GIV(endOfMemory); - goto l27; + goto l20; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l27: /* end objectAfter:limit: */; + l20: /* end objectAfter:limit: */; } } @@ -72611,11 +72609,13 @@ reestablishContextPriorToCallback(sqInt callbackContext) assert(thePage != GIV(stackPage)); GIV(stackPointer) = (findSPOfon(theFP, thePage)) - BytesPerWord; GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { thePage = makeBaseFrameFor(calloutContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -72759,7 +72759,7 @@ retryPrimitiveOnFailure(void) } else { assert(GIV(argumentCount) == (argumentCountOf(GIV(newMethod)))); - /* begin primitiveIndexOf: */ + /* begin primitiveIndexOfMethod:header: */ assert(isCompiledMethod(GIV(newMethod))); header = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); if ((header & 1)) { @@ -72870,14 +72870,23 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac sqInt valuePointer11; sqInt valuePointer2; + assert(GIV(primFailCode) == 0); + assert((returnTypeOop & 1)); + assert(!(isImmediate(vmCallbackContext))); + assert((addressCouldBeObj(callbackMethodContext)) + && (isContext(callbackMethodContext))); + assert(((debugCallbackPath = 0)) == 0); if (!(((returnTypeOop & 1)) && (isLiveContext(callbackMethodContext)))) { + assert(((debugCallbackPath = 1)) == 1); return 0; } calloutMethodContext = externalInstVarofContext(SenderIndex, callbackMethodContext); if (!(isLiveContext(calloutMethodContext))) { + assert(((debugCallbackPath = 2)) == 2); return 0; } + assert(((debugCallbackReturns += 1)) > 0); /* begin push: */ longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); GIV(stackPointer) = sp; @@ -72894,6 +72903,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac (GIV(stackPage)->headSP = GIV(stackPointer)); assert(pageListIsWellFormed()); if (isSingleContext(callbackMethodContext)) { + assert(((debugCallbackPath = debugCallbackPath | 4)) > 0); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); /* begin storePointerUnchecked:ofObject:withValue: */ @@ -72906,21 +72916,25 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac longAtput((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); } else { + assert(((debugCallbackPath = debugCallbackPath | 8)) > 0); /* begin frameOfMarriedContext: */ senderOop = longAt((callbackMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop & 1)); theFP = pointerForOop(senderOop - 1); + assert((frameReceiver(theFP)) == (splObj(ClassAlien))); if (GIV(framePointer) == theFP) { /* common case */ + assert(((debugCallbackPath = debugCallbackPath | 16)) > 0); if (!((longAt(theFP + FoxSavedFP)) == 0)) { /* calloutMethodContext is immediately below on the same page. Make it current. */ - GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(GIV(framePointer) + FoxCallerSavedIP)))); - GIV(stackPointer) = (GIV(framePointer) + (frameStackedReceiverOffset(GIV(framePointer)))) + BytesPerWord; + assert(((debugCallbackPath = debugCallbackPath | 32)) > 0); + GIV(instructionPointer) = ((usqInt)(pointerForOop(longAt(theFP + FoxCallerSavedIP)))); + GIV(stackPointer) = (theFP + (frameStackedReceiverOffset(theFP))) + BytesPerWord; /* begin frameCallerFP: */ - GIV(framePointer) = pointerForOop(longAt(GIV(framePointer) + FoxSavedFP)); + GIV(framePointer) = pointerForOop(longAt(theFP + FoxSavedFP)); /* begin setMethod: */ aMethodObj = ((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory()) ? ((mframeHomeMethod(GIV(framePointer)))->methodObject) @@ -72936,12 +72950,15 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + /* begin assertValidExecutionPointe:r:s: */ + assertValidExecutionPointersimbarline(GIV(instructionPointer), GIV(framePointer), GIV(stackPointer), !((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())), __LINE__); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } freeStackPage(GIV(stackPage)); } else { + assert(((debugCallbackPath = debugCallbackPath | 64)) > 0); externalDivorceFrameandContext(theFP, callbackMethodContext); /* begin markContextAsDead: */ assert(isContext(callbackMethodContext)); @@ -72957,6 +72974,7 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac } if ((((longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) && (!(isWidowedContext(calloutMethodContext)))) { + assert(((debugCallbackPath = debugCallbackPath | 128)) > 0); /* begin frameOfMarriedContext: */ senderOop1 = longAt((calloutMethodContext + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); assert((senderOop1 & 1)); @@ -72970,11 +72988,14 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac ? (thePage->headSP) : (findSPOfon(theFP, thePage)) - BytesPerWord); GIV(framePointer) = theFP; + assert(GIV(stackPointer) < GIV(framePointer)); } else { + assert(((debugCallbackPath = debugCallbackPath | 256)) > 0); thePage = makeBaseFrameFor(calloutMethodContext); - GIV(framePointer) = (thePage->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (thePage->headSP); + GIV(framePointer) = (thePage->headFP); } /* begin popStack */ top = longAt(GIV(stackPointer)); @@ -73000,6 +73021,10 @@ returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbac setCStackPointer((vmCallbackContext->savedCStackPointer)); setCFramePointer((vmCallbackContext->savedCFramePointer)); memcpy(reenterInterpreter, ((void *)((vmCallbackContext->savedReenterInterpreter))), sizeof(jmp_buf)); + + /* N.B. siglongjmp is defined as _longjmp on non-win32 platforms. + This matches the use of _setjmp in ia32abicc.c. */ + primitiveFunctionPointer = (vmCallbackContext->savedPrimFunctionPointer); siglongjmp((vmCallbackContext->trampoline), (returnTypeOop >> 1)); return 1; } @@ -74402,7 +74427,7 @@ stackPointerIndexForFrame(char *theFP) usqIntptr_t stackPositiveMachineIntegerValue(sqInt offset) { DECL_MAYBE_SQ_GLOBAL_STRUCT - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt integerPointer; @@ -74517,7 +74542,7 @@ stObjectat(sqInt array, sqInt index) usqLong fmt; sqLong hdr; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -75639,8 +75664,8 @@ primitiveContextAt(void) sqInt index; unsigned int integerValue; unsigned int integerValue1; - sqInt newLargeInteger; - sqInt newLargeInteger1; + usqInt newLargeInteger; + usqInt newLargeInteger1; usqInt newObj; usqInt newObj1; usqInt numBytes; @@ -77761,7 +77786,7 @@ primitiveInstVarAt(void) sqLong hdr; sqInt index; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; usqInt numSlots; @@ -78118,7 +78143,7 @@ primitiveLongRunningPrimitive(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT usqLong gcms; sqInt lrpcm; - usqLong primms; + sqLong primms; sqInt result; char *sp; @@ -78155,7 +78180,7 @@ primitiveLongRunningPrimitive(void) longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), lrpcm); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), ((primms << 1) | 1)); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)primms << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), ((gcms << 1) | 1)); @@ -78458,7 +78483,7 @@ primitiveSetGCSemaphore(void) static void primitiveSignalAtMilliseconds(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT - sqInt deltaMsecs; + usqLong deltaMsecs; usqInt msecs; sqInt msecsObj; sqInt sema; @@ -78610,7 +78635,7 @@ primitiveSlotAt(void) sqInt integerVal; sqInt integerVal1; unsigned int integerValue; - sqInt newLargeInteger; + usqInt newLargeInteger; usqInt newObj; usqInt numBytes; sqInt numLiveSlots; @@ -78814,7 +78839,7 @@ static void primitiveSlotAtPut(void) { DECL_MAYBE_SQ_GLOBAL_STRUCT sqInt badRcvr; - usqInt bs; + sqInt bs; sqInt ccIndex; sqInt fmt; sqInt fmt1; @@ -79106,8 +79131,9 @@ primitiveStoreStackp(void) } externalDivorceFrameandContext(theFP, ctxt); if (onCurrentPage) { - GIV(framePointer) = (GIV(stackPage)->headFP); + /* begin setStackPointersFromPage: */ GIV(stackPointer) = (GIV(stackPage)->headSP); + GIV(framePointer) = (GIV(stackPage)->headFP); } else { assert(GIV(stackPage) == (stackPageFor(GIV(framePointer)))); @@ -79157,8 +79183,10 @@ primitiveStoreStackp(void) 10 total milliseconds in incremental GCs (SqueakV3) or scavenges (Spur) since startup (read-only) 11 tenures of surving objects since startup (read-only) - 12-20 were specific to ikp's JITTER VM, now 12-17 are open for use - 18 total milliseconds in compaction phase of full GC since start-up (Spur + 12-20 were specific to ikp's JITTER VM, now 12-16 are open for use + 17 fraction of the code zone to use (Sista only; used to control code zone + use to preserve sendAndBranchData on counter tripped callback) + 18 total milliseconds in compaction phase of full GC since start-up (Spur only) 19 scavenge threshold, the effective size of eden. When eden fills to the threshold a scavenge is scheduled. Newer Spur VMs only. 20 utc microseconds at VM start-up (actually at time initialization, which @@ -79295,6 +79323,7 @@ primitiveVMParameter(void) sqInt valuePointer51; sqInt valuePointer52; sqInt valuePointer53; + sqInt valuePointer54; sqInt valuePointer6; sqInt valuePointer7; sqInt valuePointer8; @@ -79304,165 +79333,134 @@ primitiveVMParameter(void) paramsArraySize = 71; if (GIV(argumentCount) == 0) { result = instantiateClassindexableSize(splObj(ClassArray), paramsArraySize); - /* begin storePointer:ofObject:withValue: */ - valuePointer44 = positiveMachineIntegerFor(totalBytesInSegments()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer44 & (tagMask())) == 0) - && (oopisLessThan(valuePointer44, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer44); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer5 = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + valuePointer7 = positiveMachineIntegerFor(totalBytesInSegments()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer5); - /* begin storePointer:ofObject:withValue: */ - valuePointer45 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer45 & (tagMask())) == 0) - && (oopisLessThan(valuePointer45, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer45); + longAtput((result + BaseHeaderSize) + (0U << (shiftForWord())), valuePointer7); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer8 = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (1U << (shiftForWord())), valuePointer8); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer6 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); + valuePointer9 = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer6); + longAtput((result + BaseHeaderSize) + (2U << (shiftForWord())), valuePointer9); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer7 = (((usqInt)GIV(statFullGCs) << 1) | 1); + valuePointer10 = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer7); + longAtput((result + BaseHeaderSize) + (5U << (shiftForWord())), valuePointer10); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer8 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + valuePointer11 = (((usqInt)GIV(statFullGCs) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer8); + longAtput((result + BaseHeaderSize) + (6U << (shiftForWord())), valuePointer11); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer9 = (((usqInt)((/* begin statScavenges */ + valuePointer12 = ((((GIV(statFullGCUsecs) + 500) / 1000) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (7U << (shiftForWord())), valuePointer12); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer13 = (((usqInt)((/* begin statScavenges */ GIV(statScavenges))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer9); + longAtput((result + BaseHeaderSize) + (8U << (shiftForWord())), valuePointer13); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer10 = ((((((/* begin statScavengeGCUsecs */ + valuePointer14 = ((((((/* begin statScavengeGCUsecs */ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer10); + longAtput((result + BaseHeaderSize) + (9U << (shiftForWord())), valuePointer14); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer11 = (((usqInt)GIV(statTenures) << 1) | 1); + valuePointer15 = (((usqInt)GIV(statTenures) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer11); + longAtput((result + BaseHeaderSize) + (10U << (shiftForWord())), valuePointer15); for (i = 11; i <= 18; i += 1) { /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), ConstZero); } /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); + valuePointer = floatObjectOf(getCogCodeZoneThreshold()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer); + longAtput((result + BaseHeaderSize) + (16U << (shiftForWord())), valuePointer); + /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer1 = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + valuePointer1 = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer1); - - /* begin storePointer:ofObject:withValue: */ - valuePointer46 = positive64BitIntegerFor(ioUTCStartMicroseconds()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (17U << (shiftForWord())), valuePointer1); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer2 = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (18U << (shiftForWord())), valuePointer2); - /* most stores into young objects */ - if (((valuePointer46 & (tagMask())) == 0) - && (oopisLessThan(valuePointer46, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer46); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer12 = (((usqInt)(rootTableCount()) << 1) | 1); + valuePointer16 = positive64BitIntegerFor(ioUTCStartMicroseconds()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (19U << (shiftForWord())), valuePointer16); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer17 = (((usqInt)(rootTableCount()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer12); + longAtput((result + BaseHeaderSize) + (20U << (shiftForWord())), valuePointer17); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer13 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); + valuePointer18 = (((usqInt)GIV(statRootTableOverflows) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer13); + longAtput((result + BaseHeaderSize) + (21U << (shiftForWord())), valuePointer18); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (22U << (shiftForWord())), (((usqInt)extraVMMemory << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer14 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); + valuePointer19 = (((usqInt)GIV(shrinkThreshold) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer14); + longAtput((result + BaseHeaderSize) + (23U << (shiftForWord())), valuePointer19); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer15 = (((usqInt)GIV(growHeadroom) << 1) | 1); + valuePointer20 = (((usqInt)GIV(growHeadroom) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer15); + longAtput((result + BaseHeaderSize) + (24U << (shiftForWord())), valuePointer20); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer16 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + valuePointer21 = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer16); + longAtput((result + BaseHeaderSize) + (25U << (shiftForWord())), valuePointer21); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer17 = (((usqInt)GIV(statMarkCount) << 1) | 1); + valuePointer22 = (((usqInt)GIV(statMarkCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer17); + longAtput((result + BaseHeaderSize) + (26U << (shiftForWord())), valuePointer22); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer18 = (((usqInt)0 << 1) | 1); + valuePointer23 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer18); + longAtput((result + BaseHeaderSize) + (27U << (shiftForWord())), valuePointer23); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer19 = (((usqInt)0 << 1) | 1); + valuePointer24 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer19); + longAtput((result + BaseHeaderSize) + (28U << (shiftForWord())), valuePointer24); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer20 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); + valuePointer25 = (((usqInt)GIV(statCompactPassCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer20); + longAtput((result + BaseHeaderSize) + (29U << (shiftForWord())), valuePointer25); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer21 = (((usqInt)GIV(statGrowMemory) << 1) | 1); + valuePointer26 = (((usqInt)GIV(statGrowMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer21); + longAtput((result + BaseHeaderSize) + (30U << (shiftForWord())), valuePointer26); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer22 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); + valuePointer27 = (((usqInt)GIV(statShrinkMemory) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer22); + longAtput((result + BaseHeaderSize) + (0x1FU << (shiftForWord())), valuePointer27); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer23 = (((usqInt)GIV(statRootTableCount) << 1) | 1); + valuePointer28 = (((usqInt)GIV(statRootTableCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer23); + longAtput((result + BaseHeaderSize) + (32U << (shiftForWord())), valuePointer28); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer24 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); + valuePointer29 = (((usqInt)GIV(statSurvivorCount) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer24); + longAtput((result + BaseHeaderSize) + (34U << (shiftForWord())), valuePointer29); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer25 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); + valuePointer30 = ((((GIV(statGCEndUsecs) / 1000) & MillisecondClockMask) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer25); + longAtput((result + BaseHeaderSize) + (35U << (shiftForWord())), valuePointer30); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer26 = (((usqInt)0 << 1) | 1); + valuePointer31 = (((usqInt)0 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer26); + longAtput((result + BaseHeaderSize) + (36U << (shiftForWord())), valuePointer31); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer27 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); + valuePointer32 = ((((GIV(statIGCDeltaUsecs) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer27); + longAtput((result + BaseHeaderSize) + (37U << (shiftForWord())), valuePointer32); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (38U << (shiftForWord())), (((usqInt)GIV(statPendingFinalizationSignals) << 1) | 1)); @@ -79470,9 +79468,9 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (39U << (shiftForWord())), (((usqInt)BytesPerWord << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer28 = (((usqInt)6521 << 1) | 1); + valuePointer33 = (((usqInt)6521 << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer28); + longAtput((result + BaseHeaderSize) + (40U << (shiftForWord())), valuePointer33); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (41U << (shiftForWord())), (((usqInt)GIV(numStackPages) << 1) | 1)); @@ -79480,22 +79478,22 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (42U << (shiftForWord())), (((usqInt)desiredNumStackPages << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer29 = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + valuePointer34 = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer29); + longAtput((result + BaseHeaderSize) + (43U << (shiftForWord())), valuePointer34); /* begin storePointerUnchecked:ofObject:withValue: */ assert(!(isOopForwarded(result))); longAtput((result + BaseHeaderSize) + (44U << (shiftForWord())), (((usqInt)desiredEdenBytes << 1) | 1)); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer30 = getCogCodeSize(); + valuePointer35 = getCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer30); + longAtput((result + BaseHeaderSize) + (45U << (shiftForWord())), valuePointer35); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer31 = getDesiredCogCodeSize(); + valuePointer36 = getDesiredCogCodeSize(); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer31); + longAtput((result + BaseHeaderSize) + (46U << (shiftForWord())), valuePointer36); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer32 = (((usqInt)(((((GIV(flagInterpretedMethods) + valuePointer37 = (((usqInt)(((((GIV(flagInterpretedMethods) ? 2 : 0)) + ((GIV(preemptionYields) ? 0 @@ -79503,192 +79501,97 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); ? 16 : 0))) + ((((((usqInt) GIV(imageHeaderFlags)) >> 2) | ((2 + 4) + 16)) - ((2 + 4) + 16)))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer32); + longAtput((result + BaseHeaderSize) + (47U << (shiftForWord())), valuePointer37); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer33 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); + valuePointer38 = (((usqInt)(ioGetMaxExtSemTableSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer33); + longAtput((result + BaseHeaderSize) + (48U << (shiftForWord())), valuePointer38); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer34 = (((usqInt)(rootTableCapacity()) << 1) | 1); + valuePointer39 = (((usqInt)(rootTableCapacity()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer34); + longAtput((result + BaseHeaderSize) + (51U << (shiftForWord())), valuePointer39); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer2 = (((usqInt)(numSegments()) << 1) | 1); + valuePointer3 = (((usqInt)(numSegments()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer2); + longAtput((result + BaseHeaderSize) + (52U << (shiftForWord())), valuePointer3); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer3 = ((GIV(totalFreeOldSpace) << 1) | 1); + valuePointer4 = ((GIV(totalFreeOldSpace) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer3); - /* begin storePointer:ofObject:withValue: */ - valuePointer43 = floatObjectOf(getHeapGrowthToSizeGCRatio()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer43 & (tagMask())) == 0) - && (oopisLessThan(valuePointer43, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer43); - - /* begin storePointer:ofObject:withValue: */ - valuePointer47 = positive64BitIntegerFor(GIV(statProcessSwitch)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer47 & (tagMask())) == 0) - && (oopisLessThan(valuePointer47, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer47); - /* begin storePointer:ofObject:withValue: */ - valuePointer48 = positive64BitIntegerFor(GIV(statIOProcessEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer48 & (tagMask())) == 0) - && (oopisLessThan(valuePointer48, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer48); - /* begin storePointer:ofObject:withValue: */ - valuePointer49 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer49 & (tagMask())) == 0) - && (oopisLessThan(valuePointer49, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer49); - /* begin storePointer:ofObject:withValue: */ - valuePointer50 = positive64BitIntegerFor(GIV(statCheckForEvents)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer50 & (tagMask())) == 0) - && (oopisLessThan(valuePointer50, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer50); - /* begin storePointer:ofObject:withValue: */ - valuePointer51 = positive64BitIntegerFor(GIV(statStackOverflow)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { - - /* most stores into young objects */ - if (((valuePointer51 & (tagMask())) == 0) - && (oopisLessThan(valuePointer51, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer51); - /* begin storePointer:ofObject:withValue: */ - valuePointer52 = positive64BitIntegerFor(GIV(statStackPageDivorce)); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (53U << (shiftForWord())), valuePointer4); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer5 = floatObjectOf(getHeapGrowthToSizeGCRatio()); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (54U << (shiftForWord())), valuePointer5); - /* most stores into young objects */ - if (((valuePointer52 & (tagMask())) == 0) - && (oopisLessThan(valuePointer52, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer35 = getCodeCompactionCount(); + valuePointer40 = positive64BitIntegerFor(GIV(statProcessSwitch)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (55U << (shiftForWord())), valuePointer40); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer41 = positive64BitIntegerFor(GIV(statIOProcessEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer35); + longAtput((result + BaseHeaderSize) + (56U << (shiftForWord())), valuePointer41); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer36 = getCodeCompactionMSecs(); + valuePointer42 = positive64BitIntegerFor(GIV(statForceInterruptCheck)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer36); + longAtput((result + BaseHeaderSize) + (57U << (shiftForWord())), valuePointer42); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer37 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + valuePointer43 = positive64BitIntegerFor(GIV(statCheckForEvents)); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer37); + longAtput((result + BaseHeaderSize) + (58U << (shiftForWord())), valuePointer43); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer38 = (((usqInt)((1) + ((IMMUTABILITY + valuePointer44 = positive64BitIntegerFor(GIV(statStackOverflow)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (59U << (shiftForWord())), valuePointer44); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer45 = positive64BitIntegerFor(GIV(statStackPageDivorce)); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (60U << (shiftForWord())), valuePointer45); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer46 = getCodeCompactionCount(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (61U << (shiftForWord())), valuePointer46); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer47 = getCodeCompactionMSecs(); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3EU << (shiftForWord())), valuePointer47); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer48 = (((usqInt)(numMethodsOfType(CMMethod)) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (0x3FU << (shiftForWord())), valuePointer48); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer49 = (((usqInt)((1) + ((IMMUTABILITY ? 2 : 0))) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer38); + longAtput((result + BaseHeaderSize) + (64U << (shiftForWord())), valuePointer49); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer39 = (((usqInt)(stackPageByteSize()) << 1) | 1); + valuePointer50 = (((usqInt)(stackPageByteSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer39); + longAtput((result + BaseHeaderSize) + (65U << (shiftForWord())), valuePointer50); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer4 = (((maxOldSpaceSize()) << 1) | 1); + valuePointer6 = (((maxOldSpaceSize()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer4); - - /* begin storePointer:ofObject:withValue: */ - valuePointer53 = floatObjectOf(statAverageLivePagesWhenMapping()); - assert(!(isForwarded(result))); - if ((assert(isNonImmediate(result)), - oopisGreaterThanOrEqualTo(result, GIV(oldSpaceStart)))) { + longAtput((result + BaseHeaderSize) + (66U << (shiftForWord())), valuePointer6); - /* most stores into young objects */ - if (((valuePointer53 & (tagMask())) == 0) - && (oopisLessThan(valuePointer53, GIV(newSpaceLimit)))) { - /* begin possibleRootStoreInto: */ - if (!(((((usqInt) (longAt(result))) >> (rememberedBitShift())) & 1) != 0)) { - remember(result); - } - } - } - longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer53); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer40 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); + valuePointer51 = floatObjectOf(statAverageLivePagesWhenMapping()); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer40); + longAtput((result + BaseHeaderSize) + (67U << (shiftForWord())), valuePointer51); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer41 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); + valuePointer52 = (((usqInt)(statMaxPageCountWhenMapping()) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer41); + longAtput((result + BaseHeaderSize) + (68U << (shiftForWord())), valuePointer52); /* begin storePointerUnchecked:ofObject:withValue: */ - valuePointer42 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + valuePointer53 = (((usqInt)(VM_PROXY_MAJOR) << 1) | 1); assert(!(isOopForwarded(result))); - longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer42); + longAtput((result + BaseHeaderSize) + (69U << (shiftForWord())), valuePointer53); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer54 = (((usqInt)(VM_PROXY_MINOR) << 1) | 1); + assert(!(isOopForwarded(result))); + longAtput((result + BaseHeaderSize) + (70U << (shiftForWord())), valuePointer54); assert(paramsArraySize == 71); + beRootIfOld(result); /* begin pop:thenPush: */ longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), result); GIV(stackPointer) = sp; @@ -79717,7 +79620,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = positiveMachineIntegerFor(totalBytesInSegments()); } if (arg == 2) { - result = ((((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); + result = (((usqInt)((GIV(freeStart) - (((eden()).start))) + (GIV(pastSpaceStart) - (((pastSpace()).start)))) << 1) | 1); } if (arg == 3) { result = positiveMachineIntegerFor((newSpaceCapacity()) + (totalBytesInSegments())); @@ -79750,14 +79653,17 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (arg == 11) { result = (((usqInt)GIV(statTenures) << 1) | 1); } - if (((arg >= 12) && (arg <= 17))) { + if (((arg >= 12) && (arg <= 16))) { result = ConstZero; } + if (arg == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + } if (arg == 18) { result = ((((GIV(statCompactionUsecs) + 500) / 1000) << 1) | 1); } if (arg == 19) { - result = (((GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); + result = (((usqInt)(GIV(scavengeThreshold) - (((eden()).start))) << 1) | 1); } if (arg == 20) { result = positive64BitIntegerFor(ioUTCStartMicroseconds()); @@ -79833,7 +79739,7 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); result = (((usqInt)desiredNumStackPages << 1) | 1); } if (arg == 44) { - result = (((((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); + result = (((usqInt)(((GIV(eden).limit)) - ((GIV(eden).start))) << 1) | 1); } if (arg == 45) { result = (((usqInt)desiredEdenBytes << 1) | 1); @@ -79947,47 +79853,41 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); (GIV(primFailCode) = PrimErrBadIndex); return; } - if ((arg & 1)) { - arg = (arg >> 1); - } - else { - if (!((index == 55) - && (((arg & (tagMask())) == 0) - && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex)))) { + if ((index == 17) + || (index == 55)) { + if (!(((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex))) { /* begin primitiveFailFor: */ (GIV(primFailCode) = PrimErrBadArgument); return; } } - /* begin success: */ - - /* Don't overwrite an error code that has already been set. */ - if (!GIV(primFailCode)) { - GIV(primFailCode) = 1; - } - - if (index == 5) { - - /* Was: - result := allocationsBetweenGCs. - allocationsBetweenGCs := arg. */ - /* Ignore for now, because old images won't start up otherwise. - See 44 & 45 for eden size setting. */ - /* begin nilObject */ - result = GIV(nilObj); - /* begin initPrimCall */ - GIV(primFailCode) = 0; + else { + if ((arg & 1)) { + arg = (arg >> 1); + } } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; if (index == 6) { result = (((usqInt)(((sqInt)(((scavengerTenuringThreshold()) * (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start)))) / (8 * BytesPerOop)))) << 1) | 1); /* begin tenuringThreshold: */ + if (arg < 0) { + GIV(primFailCode) = PrimErrBadArgument; + goto l85; + } + /* begin scavengerTenuringThreshold: */ aProportion = (((double) (arg * (8 * BytesPerOop)) )) / (((double) (((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) )); GIV(tenuringProportion) = aProportion; GIV(tenureThreshold) = (aProportion == 0.0 ? 0 : (round(((((GIV(pastSpace).limit)) - ((GIV(pastSpace).start))) * (1.0 - aProportion)))) + ((GIV(pastSpace).start))); - /* begin initPrimCall */ GIV(primFailCode) = 0; + l85: /* end tenuringThreshold: */; + } + if (index == 17) { + result = floatObjectOf(getCogCodeZoneThreshold()); + GIV(primFailCode) = setCogCodeZoneThreshold(floatValueOf(arg)); } if (index == 23) { result = (((usqInt)extraVMMemory << 1) | 1); @@ -80042,7 +79942,8 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); } if ((index == 47) && (1)) { - if (arg >= 0) { + if ((arg >= 0) + && (arg <= (maxCogCodeSize()))) { result = (((usqInt)(getDesiredCogCodeSize()) << 1) | 1); /* begin setDesiredCogCodeSize: */ desiredCogCodeSize = arg; @@ -80064,12 +79965,12 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); /* begin setCogVMFlags: */ if ((((usqInt)arg)) > 0x1F) { GIV(primFailCode) = PrimErrUnsupported; - goto l66; + goto l78; } GIV(flagInterpretedMethods) = (arg & 2) != 0; GIV(preemptionYields) = (arg & 4) == 0; GIV(newFinalization) = (arg & 16) != 0; - l66: /* end setCogVMFlags: */; + l78: /* end setCogVMFlags: */; } } if (index == 49) { @@ -80092,14 +79993,14 @@ GIV(statScavengeGCUsecs))) + 500) / 1000) << 1) | 1); if (isFloat) { fetchFloatAtinto(arg + BaseHeaderSize, result1); aDouble = result1; - goto l83; + goto l86; } /* begin primitiveFail */ if (!GIV(primFailCode)) { GIV(primFailCode) = 1; } aDouble = 0.0; - l83: /* end floatValueOf: */; + l86: /* end floatValueOf: */; GIV(heapGrowthToSizeGCRatio) = aDouble; GIV(primFailCode) = 0; } @@ -80310,8 +80211,7 @@ unmarkAfterPathTo(void) ? longAt(objOop1 - BaseHeaderSize) : numSlots12); if (numSlots5 == 0) { - /* begin allocationUnit */ - slotBytes2 = ((sqInt) 8); + slotBytes2 = 8; } else { slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); @@ -80319,14 +80219,14 @@ unmarkAfterPathTo(void) followingWordAddress2 = (objOop1 + BaseHeaderSize) + slotBytes2; if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { objOop1 = GIV(endOfMemory); - goto l13; + goto l10; } flag("endianness"); followingWord2 = longAt(followingWordAddress2 + 4); objOop1 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress2 + BaseHeaderSize : followingWordAddress2); - l13: /* end objectAfter:limit: */; + l10: /* end objectAfter:limit: */; } /* begin allNewSpaceEntitiesDo: */ @@ -80361,8 +80261,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots1); if (numSlots == 0) { - /* begin allocationUnit */ - slotBytes = ((sqInt) 8); + slotBytes = 8; } else { slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); @@ -80370,14 +80269,14 @@ unmarkAfterPathTo(void) followingWordAddress = (objOop + BaseHeaderSize) + slotBytes; if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { objOop = limit; - goto l4; + goto l3; } flag("endianness"); followingWord = longAt(followingWordAddress + 4); objOop = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress + BaseHeaderSize : followingWordAddress); - l4: /* end objectAfter:limit: */; + l3: /* end objectAfter:limit: */; } /* begin objectStartingAt: */ address1 = ((eden()).start); @@ -80405,8 +80304,7 @@ unmarkAfterPathTo(void) ? longAt(objOop - BaseHeaderSize) : numSlots11); if (numSlots2 == 0) { - /* begin allocationUnit */ - slotBytes1 = ((sqInt) 8); + slotBytes1 = 8; } else { slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); @@ -80414,14 +80312,14 @@ unmarkAfterPathTo(void) followingWordAddress1 = (objOop + BaseHeaderSize) + slotBytes1; if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { objOop = GIV(freeStart); - goto l8; + goto l6; } flag("endianness"); followingWord1 = longAt(followingWordAddress1 + 4); objOop = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) ? followingWordAddress1 + BaseHeaderSize : followingWordAddress1); - l8: /* end objectAfter:limit: */; + l6: /* end objectAfter:limit: */; } } @@ -80447,6 +80345,7 @@ void* vm_exports[][3] = { {(void*)_m, "primitiveDivLargeIntegers\000\377", (void*)primitiveDivLargeIntegers}, {(void*)_m, "primitiveEqualLargeIntegers\000\377", (void*)primitiveEqualLargeIntegers}, {(void*)_m, "primitiveEventProcessingControl\000\377", (void*)primitiveEventProcessingControl}, + {(void*)_m, "primitiveGetenv\000\377", (void*)primitiveGetenv}, {(void*)_m, "primitiveGetLogDirectory\000\377", (void*)primitiveGetLogDirectory}, {(void*)_m, "primitiveGetWindowLabel\000\377", (void*)primitiveGetWindowLabel}, {(void*)_m, "primitiveGetWindowSize\000\377", (void*)primitiveGetWindowSize}, @@ -80496,6 +80395,7 @@ void* vm_exports[][3] = { {(void*)_m, "setInterruptCheckChain", (void*)setInterruptCheckChain}, {(void*)_m, "shortPrintFramesInPage", (void*)shortPrintFramesInPage}, {(void*)_m, "shortPrintFramesOnStackPageListInUse\000\377", (void*)shortPrintFramesOnStackPageListInUse}, + {(void*)_m, "statNumGCs\000\377", (void*)statNumGCs}, {NULL, NULL, NULL} }; diff --git a/spursistasrc/vm/interp.h b/spursistasrc/vm/interp.h index e80791f1f..9f7e97027 100644 --- a/spursistasrc/vm/interp.h +++ b/spursistasrc/vm/interp.h @@ -1,9 +1,9 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-rsf.2072 uuid: a71106f7-964a-4165-bd14-cd8b52ca1acf + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2156 uuid: 840c2330-3e44-4ee7-9b64-8804529f1020 */ #define VM_PROXY_MAJOR 1 -#define VM_PROXY_MINOR 13 +#define VM_PROXY_MINOR 14 #define SQ_VI_BYTES_PER_WORD 4 @@ -28,6 +28,9 @@ #define PrimErrLimitExceeded 15 #define PrimErrObjectIsPinned 16 #define PrimErrWritePastObject 17 +#define PrimErrObjectMoved 18 +#define PrimErrObjectNotPinned 19 +#define PrimErrCallbackError 20 #define MinSmallInteger -1073741824 #define MaxSmallInteger 1073741823 diff --git a/spursistasrc/vm/vmCallback.h b/spursistasrc/vm/vmCallback.h index b22e91d48..3bf23acc7 100644 --- a/spursistasrc/vm/vmCallback.h +++ b/spursistasrc/vm/vmCallback.h @@ -1,5 +1,5 @@ /* Automatically generated by - CCodeGeneratorGlobalStructure VMMaker.oscog-rsf.2072 uuid: a71106f7-964a-4165-bd14-cd8b52ca1acf + CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2158 uuid: 6b2d46a5-e210-42d1-bbba-b3211c7d8a55 */ #define VM_CALLBACK_INC 1 @@ -12,12 +12,13 @@ typedef struct _VMCallbackContext { void *savedCStackPointer; void *savedCFramePointer; union { - sqIntptr_t valword; - struct { int low, high; } valleint64; - struct { int high, low; } valbeint64; - double valflt64; - struct { void *addr; sqIntptr_t size; } valstruct; - } rvs; + sqIntptr_t valword; + struct { int low, high; } valleint64; + struct { int high, low; } valbeint64; + double valflt64; + struct { void *addr; sqIntptr_t size; } valstruct; + } rvs; + void *savedPrimFunctionPointer; jmp_buf trampoline; jmp_buf savedReenterInterpreter; } VMCallbackContext; diff --git a/spursistastacksrc/examplePlugins.ext b/spursistastacksrc/examplePlugins.ext new file mode 100644 index 000000000..699ebbf2f --- /dev/null +++ b/spursistastacksrc/examplePlugins.ext @@ -0,0 +1,2 @@ +# Automatically generated makefile include for external plugins +EXTERNAL_PLUGINS = diff --git a/spursistastacksrc/examplePlugins.int b/spursistastacksrc/examplePlugins.int new file mode 100644 index 000000000..318fde7b5 --- /dev/null +++ b/spursistastacksrc/examplePlugins.int @@ -0,0 +1,2 @@ +# Automatically generated makefile include for internal plugins +INTERNAL_PLUGINS = diff --git a/spursistastacksrc/vm/exampleSqNamedPrims.h b/spursistastacksrc/vm/exampleSqNamedPrims.h new file mode 100644 index 000000000..1101dca5c --- /dev/null +++ b/spursistastacksrc/vm/exampleSqNamedPrims.h @@ -0,0 +1,12 @@ +/* This is an automatically generated table of all builtin modules in the VM + StackInterpreterPrimitives * VMMaker.oscog-dtl.2147 + */ + +extern sqExport vm_exports[]; +extern sqExport os_exports[]; + +sqExport *pluginExports[] = { + vm_exports, + os_exports, + NULL +}; diff --git a/spursistastacksrc/vm/gcc3x-interp.c b/spursistastacksrc/vm/gcc3x-interp.c new file mode 100644 index 000000000..86a00b4b1 --- /dev/null +++ b/spursistastacksrc/vm/gcc3x-interp.c @@ -0,0 +1,72718 @@ +/* This file has been post-processed for GNU C */ + + +/* Automatically generated by + CCodeGeneratorGlobalStructure * VMMaker.oscog-dtl.2147 uuid: 8204a87f-f5aa-40a9-a9a6-532993ed89cb + from + StackInterpreter * VMMaker.oscog-dtl.2147 uuid: 8204a87f-f5aa-40a9-a9a6-532993ed89cb + */ +static char __buildInfo[] = "StackInterpreter * VMMaker.oscog-dtl.2147 uuid: 8204a87f-f5aa-40a9-a9a6-532993ed89cb " __DATE__ ; +char *__interpBuildInfo = __buildInfo; + + + +#if USE_GLOBAL_STRUCT +# define SQ_USE_GLOBAL_STRUCT 1 +#else +# define SQ_USE_GLOBAL_STRUCT 0 +#endif +#if USE_GLOBAL_STRUCT_REG +# define SQ_USE_GLOBAL_STRUCT_REG 1 +#else +# define SQ_USE_GLOBAL_STRUCT_REG 0 +#endif + +#include /* for e.g. alloca */ +#include +#include /* for wint_t */ +#include "sqGnu.h" +#include "vmCallback.h" +#include "sqMemoryFence.h" +#include "dispdbg.h" + + +/* StackInterpreter class>>preambleCCode */ +/* Disable Intel compiler inlining of warning which is used for breakpoints */ +#pragma auto_inline(off) +sqInt warnpid, erroronwarn; +void +warning(char *s) { /* Print an error message but don't necessarily exit. */ + if (erroronwarn) error(s); + if (warnpid) + printf("\n%s pid %ld\n", s, (long)warnpid); + else + printf("\n%s\n", s); +} +void +warningat(char *s, int l) { /* ditto with line number. */ + /* use alloca to call warning so one does not have to remember to set two breakpoints... */ + char *sl = alloca(strlen(s) + 16); + sprintf(sl, "%s %d", s, l); + warning(sl); +} +#pragma auto_inline(on) + +void +invalidCompactClassError(char *s) { /* Print a (compact) class index error message and exit. */ +#if SPURVM + printf("\nClass %s does not have the required class index\n", s); +#else + printf("\nClass %s does not have the required compact class index\n", s); +#endif + exit(-1); +} + +/* + * Define sigsetjmp and siglongjmp to be the most minimal setjmp/longjmp available on the platform. + */ +#undef sigsetjmp +#undef siglongjmp +#if WIN32 +# define sigsetjmp(jb,ssmf) setjmp(jb) +# define siglongjmp(jb,v) longjmp(jb,v) +#else +# define sigsetjmp(jb,ssmf) _setjmp(jb) +# define siglongjmp(jb,v) _longjmp(jb,v) +#endif + +#define odd(v) ((int)(v)&1) +#define even(v) (!odd(v)) + +/* end StackInterpreter class>>preambleCCode */ + + +/*** Constants ***/ +#define ActiveProcessIndex 1 +#define AlternateHeaderHasPrimFlag 0x20000 +#define AlternateHeaderIsOptimizedFlag 0x10000 +#define AlternateHeaderNumLiteralsMask 0x7FFF +#define AltLongStoreBytecode 245 +#define AtCacheFixedFields 4 +#define AtCacheFmt 3 +#define AtCacheMask 0x1C +#define AtCacheOop 1 +#define AtCacheSize 2 +#define AtCacheTotalSize 64 +#define AtPutBase 32 +#define BecameActiveClassFlag 8 +#define BecameCompiledMethodFlag 2 +#define BecamePointerObjectFlag 1 +#define BytecodeSetHasDirectedSuperSend 1 +#define BytecodeSetHasExtensions 1 +#define CacheProbeMax 3 +#define CharacterTable null +#define CharacterValueIndex 0 +#define ClassAlien 52 +#define ClassArray 7 +#define ClassArrayCompactIndex 51 +#define ClassBitmap 4 +#define ClassBlockClosure 36 +#define ClassBlockClosureCompactIndex 37 +#define ClassByteArray 26 +#define ClassByteString 6 +#define ClassByteStringCompactIndex 52 +#define ClassCharacter 19 +#define ClassExternalAddress 43 +#define ClassExternalData 45 +#define ClassExternalFunction 46 +#define ClassExternalLibrary 47 +#define ClassExternalStructure 44 +#define ClassFloat 9 +#define ClassFloatCompactIndex 34 +#define ClassFullBlockClosure 37 +#define ClassFullBlockClosureCompactIndex 38 +#define ClassLargeNegativeInteger 42 +#define ClassLargeNegativeIntegerCompactIndex 32 +#define ClassLargePositiveInteger 13 +#define ClassLargePositiveIntegerCompactIndex 33 +#define ClassMessage 15 +#define ClassMessageCompactIndex 35 +#define ClassMethodContext 10 +#define ClassMethodContextCompactIndex 36 +#define ClassMutex 39 +#define ClassPoint 12 +#define ClassSemaphore 18 +#define ClassSmallInteger 5 +#define ClassUnsafeAlien 54 +#define ClosureFirstCopiedValueIndex 3 +#define ClosureIndex 4 +#define ClosureNumArgsIndex 2 +#define ClosureOuterContextIndex 0 +#define ClosureStartPCIndex 1 +#define ConstMinusOne 0xFFFFFFFFU +#define ConstOne 3 +#define ConstTwo 5 +#define ConstZero 1 +#define CrossedX 258 +#define CtxtTempFrameStart 6 +#define DumpStackOnLowSpace 0 +#define EndOfRun 0x101 +#define ExcessSignalsIndex 2 +#define ExternalObjectsArray 38 +#define ExtraRootsSize 2048 +#define FailImbalancedPrimitives 0 +#define FalseObject 1 +#define FirstLinkIndex 0 +#define FoxCallerContext 4 +#define FoxCallerSavedIP 4 +#define FoxFrameFlags -8 +#define FoxMethod -4 +#define FoxReceiver -16 +#define FoxSavedFP 0 +#define FoxThisContext -12 +#define FrameSlots 6 +#define FullClosureCompiledBlockIndex 1 +#define FullClosureFirstCopiedValueIndex 4 +#define FullClosureReceiverIndex 3 +#define GCCheckPrimCall 64 +#define GCModeBecome 8 +#define GCModeFreeSpace 32 +#define GCModeFull 1 +#define GCModeImageSegment 16 +#define GCModeIncremental 4 +#define GCModeNewSpace 2 +#define HeaderIndex 0 +#if !defined(IMMUTABILITY) /* Allow this to be overridden on the compiler command line */ +# define IMMUTABILITY 0 +#endif +#define InstanceSpecificationIndex 2 +#define InstructionPointerIndex 1 +#define KeyIndex 0 +#define LargeContextBit 0x40000 +#define LargeContextSlots 62 +#define LastLinkIndex 1 +#define LiteralStart 1 +#define LongStoreBytecode 129 +#define LowcodeVM 0 +#define MarkObjectsForEnumerationPrimitives 0 +#define MarkOnTenure 5 +#define MarkStackRootIndex 0x1000 +#define MaxExternalPrimitiveTableSize 4096 +#define MaxJumpBuf 32 +#define MaxPrimitiveIndex 575 +#define MaxQuickPrimitiveIndex 519 +#define MaxRTRefCount 7 +#define MessageArgumentsIndex 1 +#define MessageLookupClassIndex 2 +#define MessageSelectorIndex 0 +#define MethodArrayIndex 1 +#define MethodCacheClass 2 +#define MethodCacheEntries 0x400 +#define MethodCacheEntrySize 4 +#define MethodCacheMask 0xFFC +#define MethodCacheMethod 3 +#define MethodCachePrimFunction 4 +#define MethodCacheSelector 1 +#define MethodCacheSize 4096 +#define MethodDictionaryIndex 1 +#define MethodHeaderArgCountShift 25 +#define MethodHeaderTempCountShift 19 +#define MethodIndex 3 +#define MillisecondClockMask 0x1FFFFFFF +#define MournQueueRootIndex 4098 +#define MULTIPLEBYTECODESETS 1 +#define MyListIndex 3 +#define NewspeakVM 0 +#define NextLinkIndex 0 +#define NilObject 0 +#define NSMethodCacheSize 4096 +#define ObjStackFixedSlots 4 +#define ObjStackFreex 2 +#define ObjStackLimit 0xFF8 +#define ObjStackMyx 1 +#define ObjStackNextx 3 +#define ObjStackPageSlots 0xFFC +#define ObjStackTopx 0 +#define OldBecameNewFlag 4 +#define PrimErrBadArgument 3 +#define PrimErrBadIndex 4 +#define PrimErrBadMethod 12 +#define PrimErrBadNumArgs 5 +#define PrimErrBadReceiver 2 +#define PrimErrGenericFailure 1 +#define PrimErrInappropriate 6 +#define PrimErrLimitExceeded 15 +#define PrimErrNamedInternal 13 +#define PrimErrNoCMemory 10 +#define PrimErrNoMemory 9 +#define PrimErrNoModification 8 +#define PrimErrNotFound 11 +#define PrimErrObjectIsPinned 16 +#define PrimErrTableIndex 51 +#define PrimErrUnsupported 7 +#define PrimErrWritePastObject 17 +#define PrimitiveExternalCallIndex 117 +#define PrimNoErr 0 +#define PrimNumberDoExternalCall 218 +#define PrimNumberExternalCall 117 +#define PriorityIndex 2 +#define ProcessListsIndex 0 +#define ProcessSignalingLowSpace 22 +#define ReceiverIndex 5 +#define RemapBufferSize 25 +#define RememberedSetRootIndex 4099 +#define ScavengeInProgress 1 +#define SchedulerAssociation 3 +#define SelectorAboutToReturn 48 +#define SelectorAttemptToAssign 50 +#define SelectorCannotInterpret 34 +#define SelectorCannotReturn 21 +#define SelectorDoesNotUnderstand 20 +#define SelectorInvokeCallback 53 +#define SelectorMustBeBoolean 25 +#define SelectorRunWithIn 49 +#define SelectorSistaTrap 59 +#define SelectorStart 2 +#define SelectorUnknownBytecode 57 +#define SenderIndex 0 +#define SistaVM 1 +#define SlidingCompactionInProgress 2 +#define SmallContextSlots 22 +#define SPURVM 1 +#define SpecialSelectors 23 +#define StackPageReachedButUntraced 1 +#define StackPageTraced 2 +#define StackPageTraceInvalid -1 +#define StackPageUnreached 0 +#define StackPointerIndex 2 +#define SuperclassIndex 0 +#define SuspendedContextIndex 1 +#define TenureByAge 1 +#define TenureByClass 2 +#define TenureToShrinkRT 3 +#define TheDisplay 14 +#define TheFinalizationSemaphore 41 +#define TheInputSemaphore null +#define TheInterruptSemaphore 30 +#define TheLowSpaceSemaphore 17 +#define TheTimerSemaphore 29 +#define TopHashBit 0x200000 +#define TopOopBit 0x80000000U +#define TrueObject 2 +#define V3PrimitiveBitsMask 0x200003FE +#define ValueIndex 1 +#if !defined(VMBIGENDIAN) /* Allow this to be overridden on the compiler command line */ +# define VMBIGENDIAN 0 +#endif +#define WeaklingStackRootIndex 0x1001 +#define XIndex 0 +#define YIndex 1 + +typedef struct { + usqInt segStart; + usqInt segSize; + sqInt swizzle; + usqInt containsPinned; + usqInt savedSegSize; + usqInt lastFreeObject; + } SpurSegmentInfo; + + +typedef struct { + usqInt start; + usqInt limit; + } SpurNewSpaceSpace; + + +typedef struct { + usqInt start; + usqInt limit; + usqInt top; + } SpurContiguousObjStack; + + +typedef struct _StackPage { + char *stackLimit; + char *headSP; + char *headFP; + char *baseFP; + char *baseAddress; + char *realStackLimit; + char *lastAddress; + int trace; + struct _StackPage *nextPage; + struct _StackPage *prevPage; + } StackPage; + +#define CogStackPage StackPage + + + +/*** Function Prototypes ***/ + + +#if !PRODUCTION && defined(PlatformNoDbgRegParms) +# define NoDbgRegParms PlatformNoDbgRegParms +#endif + +#if !defined(NoDbgRegParms) +# define NoDbgRegParms /*empty*/ +#endif + + + +#if !defined(NeverInline) +# define NeverInline /*empty*/ +#endif + +extern sqInt interpret(void); +static sqInt NoDbgRegParms addressIsInPage(StackPage * self_in_addressIsInPage, char *address); +static sqInt NoDbgRegParms isFree(StackPage * self_in_isFree); +static void NoDbgRegParms freeStackPageNoAssert(StackPage *aPage); +static sqInt NoDbgRegParms freeStackPage(StackPage *aPage); +static void NoDbgRegParms markStackPageMostRecentlyUsed(StackPage *page); +static void NoDbgRegParms markStackPageNextMostRecentlyUsed(StackPage *page); +static StackPage * newStackPage(void); +static sqInt pageListIsWellFormed(void); +static StackPage * NoDbgRegParms stackPageAt(sqInt index); +static StackPage * NoDbgRegParms stackPageFor(void *pointer); +static double statAverageLivePagesWhenMapping(void); +#if IMMUTABILITY +static sqInt NoDbgRegParms canBeImmutable(sqInt oop); +#endif /* IMMUTABILITY */ +extern char * cStringOrNullFor(sqInt oop); +extern sqInt failed(void); +static sqInt NoDbgRegParms isNegativeIntegerValueOf(sqInt oop); +static sqInt NoDbgRegParms magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative); +static usqLong NoDbgRegParms magnitude64BitValueOf(sqInt oop); +static int NoDbgRegParms noInlineSigned32BitValueGutsOf(sqInt oop); +extern unsigned int positive32BitValueOf(sqInt oop); +extern usqLong positive64BitValueOf(sqInt oop); +extern usqIntptr_t positiveMachineIntegerValueOf(sqInt oop); +static void primitiveAdd(void); +EXPORT(void) primitiveAddLargeIntegers(void); +static void primitiveAdoptInstance(void); +EXPORT(void) primitiveAllInstances(void); +EXPORT(void) primitiveAllObjects(void); +static void primitiveArctan(void); +static void primitiveArrayBecome(void); +static void primitiveArrayBecomeOneWay(void); +static void primitiveArrayBecomeOneWayCopyHash(void); +static void primitiveAsCharacter(void); +static void primitiveAsFloat(void); +static void primitiveAt(void); +static void primitiveAtPut(void); +static void primitiveBeCursor(void); +static void primitiveBeDisplay(void); +static void primitiveBeep(void); +static void primitiveBehaviorHash(void); +static void primitiveBitAnd(void); +EXPORT(void) primitiveBitAndLargeIntegers(void); +static void primitiveBitOr(void); +EXPORT(void) primitiveBitOrLargeIntegers(void); +static void primitiveBitShift(void); +EXPORT(void) primitiveBitShiftLargeIntegers(void); +static void primitiveBitXor(void); +EXPORT(void) primitiveBitXorLargeIntegers(void); +static void primitiveBytesLeft(void); +static void primitiveCalloutToFFI(void); +static void primitiveChangeClass(void); +static void primitiveClass(void); +static void primitiveClearVMProfile(void); +static void primitiveClipboardText(void); +EXPORT(sqInt) primitiveClockLogAddresses(void); +static void primitiveClosureValue(void); +extern void primitiveClosureValueNoContextSwitch(void); +static void primitiveClosureValueWithArgs(void); +EXPORT(void) primitiveCompareBytes(void); +static void primitiveConstantFill(void); +static void primitiveControlVMProfiling(void); +static void primitiveCopyObject(void); +EXPORT(sqInt) primitiveCrashVM(void); +EXPORT(sqInt) primitiveDisablePowerManager(void); +static void primitiveDiv(void); +static void primitiveDivide(void); +EXPORT(void) primitiveDivideLargeIntegers(void); +EXPORT(void) primitiveDivLargeIntegers(void); +static void primitiveEnterCriticalSection(void); +static void primitiveEqual(void); +EXPORT(void) primitiveEqualLargeIntegers(void); +static void primitiveExitCriticalSection(void); +static void primitiveExitToDebugger(void); +static void primitiveExp(void); +static void primitiveExponent(void); +extern sqInt primitiveFail(void); +extern sqInt primitiveFailFor(sqInt reasonCode); +extern sqInt primitiveFailureCode(void); +static void primitiveFetchNextMourner(void); +static void primitiveFloatAdd(void); +static void primitiveFloatAt(void); +static void primitiveFloatAtPut(void); +static void primitiveFloatDivide(void); +static void primitiveFloatEqual(void); +static void primitiveFloatGreaterOrEqual(void); +static void primitiveFloatGreaterThan(void); +static void primitiveFloatLessOrEqual(void); +static void primitiveFloatLessThan(void); +static void primitiveFloatMultiply(void); +static void primitiveFloatNotEqual(void); +static void primitiveFloatSubtract(void); +static void primitiveFlushCache(void); +static void primitiveFlushExternalPrimitives(void); +static void primitiveForceDisplayUpdate(void); +static void primitiveFormPrint(void); +static void primitiveFractionalPart(void); +static void primitiveFullClosureValue(void); +extern void primitiveFullClosureValueNoContextSwitch(void); +static void primitiveFullClosureValueWithArgs(void); +static void primitiveGetAttribute(void); +#if IMMUTABILITY +static void primitiveGetImmutability(void); +#else +# define primitiveGetImmutability (void (*)(void))0 +#endif /* IMMUTABILITY */ +EXPORT(sqInt) primitiveGetLogDirectory(void); +static void primitiveGetNextEvent(void); +EXPORT(sqInt) primitiveGetWindowLabel(void); +EXPORT(sqInt) primitiveGetWindowSize(void); +static void primitiveGreaterOrEqual(void); +EXPORT(void) primitiveGreaterOrEqualLargeIntegers(void); +static void primitiveGreaterThan(void); +EXPORT(void) primitiveGreaterThanLargeIntegers(void); +static void primitiveGrowMemoryByAtLeast(void); +EXPORT(sqInt) primitiveHeartbeatFrequency(void); +EXPORT(sqInt) primitiveHighResClock(void); +static void primitiveIdentical(void); +static void primitiveIdentityHash(void); +EXPORT(sqInt) primitiveImageFormatVersion(void); +static void primitiveImageName(void); +static void primitiveImmediateAsInteger(void); +static void primitiveInputSemaphore(void); +static void primitiveInputWord(void); +static void primitiveIntegerAt(void); +static void primitiveIntegerAtPut(void); +EXPORT(sqInt) primitiveInterruptChecksPerMSec(void); +static void primitiveInterruptSemaphore(void); +static void primitiveInvokeObjectAsMethod(void); +EXPORT(sqInt) primitiveIsBigEnder(void); +static void primitiveIsPinned(void); +EXPORT(sqInt) primitiveIsWindowObscured(void); +static void primitiveKbdNext(void); +static void primitiveKbdPeek(void); +static void primitiveLessOrEqual(void); +EXPORT(void) primitiveLessOrEqualLargeIntegers(void); +static void primitiveLessThan(void); +EXPORT(void) primitiveLessThanLargeIntegers(void); +static void primitiveListBuiltinModule(void); +static void primitiveListExternalModule(void); +static void primitiveLoadImageSegment(void); +static void primitiveLocalMicrosecondClock(void); +static void primitiveLogN(void); +static void primitiveLowSpaceSemaphore(void); +static void primitiveMakePoint(void); +static void primitiveMaxIdentityHash(void); +extern usqInt primitiveMethod(void); +static void primitiveMillisecondClock(void); +EXPORT(sqInt) primitiveMillisecondClockMask(void); +static void primitiveMod(void); +EXPORT(void) primitiveModLargeIntegers(void); +static void primitiveMouseButtons(void); +static void primitiveMousePoint(void); +static void primitiveMultiply(void); +EXPORT(void) primitiveMultiplyLargeIntegers(void); +static void primitiveNew(void); +static void primitiveNewMethod(void); +static void primitiveNewWithArg(void); +static void primitiveNextInstance(void); +static void primitiveNextObject(void); +static void primitiveNoop(void); +static void primitiveNotEqual(void); +EXPORT(void) primitiveNotEqualLargeIntegers(void); +static void primitiveNotIdentical(void); +static void primitiveObjectAt(void); +static void primitiveObjectAtPut(void); +EXPORT(sqInt) primitivePathToUsing(void); +static void primitivePerformInSuperclass(void); +static void primitivePerformWithArgs(void); +EXPORT(sqInt) primitiveProfilePrimitive(void); +EXPORT(sqInt) primitiveProfileSample(void); +EXPORT(sqInt) primitiveProfileSemaphore(void); +EXPORT(sqInt) primitiveProfileStart(void); +static void primitiveQuit(void); +static void primitiveQuo(void); +EXPORT(void) primitiveQuoLargeIntegers(void); +static void primitiveRelinquishProcessor(void); +EXPORT(void) primitiveRemLargeIntegers(void); +static void primitiveResume(void); +static void primitiveScanCharacters(void); +EXPORT(sqInt) primitiveScreenDepth(void); +EXPORT(sqInt) primitiveScreenScaleFactor(void); +static void primitiveScreenSize(void); +static void primitiveSecondsClock(void); +static void primitiveSetDisplayMode(void); +static void primitiveSetFullScreen(void); +#if IMMUTABILITY +static void primitiveSetImmutability(void); +#else +# define primitiveSetImmutability (void (*)(void))0 +#endif /* IMMUTABILITY */ +static void primitiveSetInterruptKey(void); +EXPORT(sqInt) primitiveSetLogDirectory(void); +static void primitiveSetOrHasIdentityHash(void); +EXPORT(sqInt) primitiveSetWindowLabel(void); +EXPORT(sqInt) primitiveSetWindowSize(void); +static void primitiveShortAt(void); +static void primitiveShortAtPut(void); +static void primitiveShowDisplayRect(void); +static void primitiveSignal(void); +static void primitiveSignalAtBytesLeft(void); +static void primitiveSine(void); +static void primitiveSize(void); +static void primitiveSizeInBytes(void); +static void primitiveSizeInBytesOfInstance(void); +static void primitiveSnapshot(void); +static void primitiveSnapshotEmbedded(void); +static void primitiveSomeInstance(void); +static void primitiveSomeObject(void); +static void primitiveSpecialObjectsOop(void); +static void primitiveSquareRoot(void); +static void primitiveStoreImageSegment(void); +static void primitiveStringAt(void); +static void primitiveStringAtPut(void); +static void primitiveStringReplace(void); +static void primitiveSubtract(void); +EXPORT(void) primitiveSubtractLargeIntegers(void); +static void primitiveSuspend(void); +static void primitiveTestAndSetOwnershipOfCriticalSection(void); +static void primitiveTestDisplayDepth(void); +static void primitiveTimesTwoPower(void); +static void primitiveTruncated(void); +static void primitiveUnloadModule(void); +static void primitiveUpdateTimezone(void); +static void primitiveUTCMicrosecondClock(void); +static void primitiveUtcAndTimezoneOffset(void); +EXPORT(sqInt) primitiveUtcWithOffset(void); +static void primitiveVMPath(void); +static void primitiveVMProfileSamplesInto(void); +static void primitiveWait(void); +static void primitiveYield(void); +extern sqInt signalNoResume(sqInt aSemaphore); +extern int signed32BitValueOf(sqInt oop); +extern sqLong signed64BitValueOf(sqInt oop); +extern sqIntptr_t signedMachineIntegerValueOf(sqInt oop); +extern usqInt sizeOfAlienData(sqInt oop); +extern void * startOfAlienData(sqInt oop); +extern sqInt success(sqInt successBoolean); +static sqInt NoDbgRegParms initializeStacknumSlotspageSize(char *theStackPages, sqInt stackSlots, sqInt slotsPerPage); +static sqInt NoDbgRegParms pageIndexFor(void *pointer); +static usqInt NoDbgRegParms addressAfter(sqInt objOop); +static sqInt NoDbgRegParms allocateSlotsForPinningInOldSpacebytesformatclassIndex(sqInt numSlots, usqInt totalBytes, sqInt formatField, sqInt classIndex); +static sqInt NoDbgRegParms allocateSlotsInOldSpacebytesformatclassIndex(sqInt numSlots, usqInt totalBytes, sqInt formatField, sqInt classIndex); +extern sqInt byteSwapped(sqInt w); +static usqInt NoDbgRegParms bytesInObject(sqInt objOop); +static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass); +static double NoDbgRegParms dbgFloatValueOf(sqInt oop); +static sqInt defaultEdenBytes(void); +extern sqInt fetchClassTagOf(sqInt oop); +extern sqInt floatObjectOf(double aFloat); +extern double floatValueOf(sqInt oop); +static sqInt hasSixtyFourBitImmediates(void); +extern sqInt headerIndicatesAlternateBytecodeSet(sqInt methodHeader); +static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address); +static void NoDbgRegParms initSegmentBridgeWithBytesat(usqLong numBytes, sqInt address); +extern sqInt instantiateClassindexableSize(sqInt classObj, usqInt nElements); +extern sqInt integerObjectOf(sqInt value); +extern sqInt integerValueOf(sqInt oop); +extern sqInt isIntegerObject(sqInt oop); +extern sqInt isIntegerValue(sqInt intValue); +extern sqInt isMarked(sqInt objOop); +static sqInt NoDbgRegParms lengthOfformat(sqInt objOop, sqInt fmt); +static sqInt maxSlotsForAlloc(void); +static sqInt numFreeLists(void); +static void NoDbgRegParms setIsMarkedOfto(sqInt objOop, sqInt aBoolean); +extern usqInt smallObjectBytesForSlots(sqInt numSlots); +static sqInt wordIndexableFormat(void); +static void NoDbgRegParms NeverInline addToEphemeronList(sqInt ephemeronCorpse); +static void NoDbgRegParms NeverInline addToWeakList(sqInt weakCorpse); +static sqInt allNewSpaceObjectsHaveZeroRTRefCount(void); +static sqInt allWeakSurvivorsOnWeakList(void); +static void NeverInline computeRefCountToShrinkRT(void); +static sqInt NoDbgRegParms copyAndForwardMourner(sqInt mourner); +static sqInt NoDbgRegParms copyAndForward(sqInt survivor); +static sqInt NoDbgRegParms NeverInline copyToOldSpacebytesformat(sqInt survivor, sqInt bytesInObject, sqInt formatOfSurvivor); +static void fireEphemeronsInRememberedSet(void); +static void fireEphemeronsOnEphemeronList(void); +static usqInt NoDbgRegParms firstCorpse(sqInt headOfCorpseList); +static void growRememberedSet(void); +static sqInt NoDbgRegParms isInRememberedSet(sqInt objOop); +static sqInt NoDbgRegParms isMaybeOldScavengeSurvivor(sqInt oop); +static sqInt NoDbgRegParms isScavengeSurvivor(sqInt oop); +static sqInt NoDbgRegParms isonWeaklingList(sqInt oop, sqInt listHead); +static usqInt newSpaceCapacity(void); +static sqInt noUnfiredEphemeronsAtEndOfRememberedSet(void); +extern void printRememberedSet(void); +static void processEphemerons(void); +static void processWeaklings(void); +static sqInt NoDbgRegParms processWeakSurvivor(sqInt weakObj); +extern sqInt remember(sqInt objOop); +static void NoDbgRegParms scavengeFutureSurvivorSpaceStartingAt(sqInt initialAddress); +static void scavengeLoop(void); +static sqInt NoDbgRegParms scavengeReferentsOf(sqInt referrer); +static void NoDbgRegParms scavengeRememberedSetStartingAt(sqInt n); +static float scavengerTenuringThreshold(void); +static sqInt scavengeUnfiredEphemeronsOnEphemeronList(void); +static sqInt NoDbgRegParms accessibleObjectAfter(sqInt objOop); +static sqInt NoDbgRegParms NeverInline activeAndDeferredScan(sqInt anEphemeron); +static void NoDbgRegParms addFreeSubTree(sqInt freeTree); +extern sqInt addGCRoot(sqInt *varLoc); +extern sqInt addressCouldBeObj(sqInt address); +extern sqInt addressCouldBeOop(sqInt address); +static sqInt NoDbgRegParms addToFreeListbytes(sqInt freeChunk, sqInt chunkBytes); +static sqInt NoDbgRegParms addToFreeTreebytes(sqInt freeChunk, sqInt chunkBytes); +static sqInt NoDbgRegParms allInstancesOf(sqInt aClass); +static sqInt allObjects(void); +static sqInt allObjectsUnmarked(void); +static sqInt allOldMarkedWeakObjectsOnWeaklingStack(void); +static sqInt allocateLargestFreeChunk(void); +static sqInt NoDbgRegParms allocateNewSpaceSlotsformatclassIndex(sqInt numSlots, sqInt formatField, sqInt classIndex); +static sqInt NoDbgRegParms allocateOldSpaceChunkOfBytes(usqInt chunkBytes); +extern sqInt allocatePinnedSlots(sqInt nSlots); +static sqInt allocationUnit(void); +static sqInt NoDbgRegParms allStrongSlotsOfWeaklingAreMarked(sqInt aWeakling); +static sqInt allUnscannedEphemeronsAreActive(void); +extern sqInt arrayFormat(void); +static sqInt NoDbgRegParms becomeEffectFlagsFor(sqInt objOop); +extern sqInt becomewith(sqInt array1, sqInt array2); +static sqInt NoDbgRegParms becomewithtwoWaycopyHash(sqInt array1, sqInt array2, sqInt twoWayFlag, sqInt copyHashFlag); +extern void beRootIfOld(sqInt oop); +static sqInt bitsSetInFreeSpaceMaskForAllFreeLists(void); +static sqInt bridgeSize(void); +static sqInt byteFormatMask(void); +extern sqInt byteSizeOf(sqInt oop); +extern sqInt characterObjectOf(sqInt characterCode); +extern void characterTable(void); +extern usqInt characterValueOf(sqInt oop); +extern sqInt checkedLongAt(sqInt byteAddress); +static sqInt checkHeapFreeSpaceIntegrity(void); +static sqInt NoDbgRegParms checkHeapIntegrityclassIndicesShouldBeValid(sqInt excludeUnmarkedObjs, sqInt classIndicesShouldBeValid); +extern sqInt checkOkayOop(usqInt oop); +extern sqInt checkOopHasOkayClass(usqInt obj); +static sqInt NoDbgRegParms checkOopIntegritynamed(sqInt obj, char *name); +static sqInt NoDbgRegParms checkOopIntegritynamedindex(sqInt obj, char *name, sqInt i); +extern sqInt classAlien(void); +extern sqInt classArray(void); +extern sqInt classAtIndex(sqInt classIndex); +static sqInt NoDbgRegParms classAtIndexput(sqInt classIndex, sqInt objOop); +extern sqInt classBitmap(void); +extern sqInt classByteArray(void); +extern sqInt classCharacter(void); +extern sqInt classExternalAddress(void); +extern sqInt classExternalData(void); +extern sqInt classExternalFunction(void); +extern sqInt classExternalLibrary(void); +extern sqInt classExternalStructure(void); +extern sqInt classFloat(void); +static sqInt classIndexFieldWidth(void); +extern sqInt classIndexOf(sqInt objOop); +extern sqInt classLargeNegativeInteger(void); +extern sqInt classLargePositiveInteger(void); +extern sqInt classOrNilAtIndex(sqInt classIndex); +extern sqInt classPoint(void); +extern sqInt classSemaphore(void); +extern sqInt classSmallInteger(void); +extern sqInt classString(void); +extern sqInt classTableMinorIndexMask(void); +extern sqInt classTablePageSize(void); +extern sqInt classTableRootObj(void); +static sqInt classTableRootSlots(void); +extern sqInt classTagForClass(sqInt classObj); +extern sqInt classUnsafeAlien(void); +static void clearLeakMapAndMapAccessibleFreeSpace(void); +static void clearLeakMapAndMapAccessibleObjects(void); +static sqInt NoDbgRegParms cloneInOldSpaceForPinning(sqInt objOop); +extern sqInt clone(sqInt objOop); +extern sqInt compactClassIndexOf(sqInt objOop); +static sqInt NoDbgRegParms copyObjtoAddrstartAtstopAt(sqInt objOop, sqInt segAddr, sqInt segStart, sqInt endSeg); +extern void countMarkedAndUnmarkdObjects(sqInt printFlags); +static void NoDbgRegParms detachFreeObject(sqInt freeChunk); +extern sqInt displayObject(void); +static void NoDbgRegParms doScavenge(sqInt tenuringCriterion); +extern sqInt eeInstantiateClassIndexformatnumSlots(sqInt knownClassIndex, sqInt objFormat, sqInt numSlots); +static void NoDbgRegParms emptyObjStack(sqInt objStack); +static sqInt NoDbgRegParms ensureRoomOnObjStackAt(sqInt objStackRootIndex); +static sqInt NoDbgRegParms enterIntoClassTable(sqInt aBehavior); +static sqInt ephemeronFormat(void); +static sqInt NoDbgRegParms existInstancesInNewSpaceOf(sqInt classObj); +static void NoDbgRegParms expungeFromClassTable(sqInt aBehavior); +extern sqInt falseObject(void); +extern sqInt fetchByteofObject(sqInt byteIndex, sqInt objOop); +static sqInt NoDbgRegParms NeverInline fetchClassOfNonImm(sqInt objOop); +extern sqInt fetchClassOf(sqInt oop); +static sqInt NoDbgRegParms fetchClassTagOfNonImm(sqInt obj); +extern sqInt fetchLong32ofObject(sqInt fieldIndex, sqInt oop); +static sqInt NoDbgRegParms fetchPointerofFreeChunk(sqInt fieldIndex, sqInt objOop); +extern sqInt fetchPointerofObject(sqInt fieldIndex, sqInt objOop); +static sqInt findLargestFreeChunk(void); +extern void findStringBeginningWith(char *aCString); +extern void findString(char *aCString); +static void fireAllUnscannedEphemerons(void); +static sqInt firstAccessibleObject(void); +static void * NoDbgRegParms firstFixedFieldOfMaybeImmediate(sqInt oop); +extern void * firstFixedField(sqInt objOop); +extern void * firstIndexableField(sqInt objOop); +static sqInt firstStringyFakeFormat(void); +extern sqInt fixedFieldsOfClassFormatMask(void); +extern sqInt fixedFieldsOfClassFormat(sqInt classFormat); +static sqInt NoDbgRegParms fixedFieldsOfClass(sqInt objOop); +static sqInt NoDbgRegParms fixedFieldsOfformatlength(sqInt objOop, sqInt fmt, sqInt wordLength); +static sqInt NoDbgRegParms NeverInline fixFollowedFieldofObjectwithInitialValue(sqInt fieldIndex, sqInt anObject, sqInt initialValue); +static sqInt NoDbgRegParms followFieldofObject(sqInt fieldIndex, sqInt anObject); +extern sqInt followForwardedObjectFieldstoDepth(sqInt objOop, sqInt depth); +extern sqInt followForwarded(sqInt objOop); +static sqInt NoDbgRegParms followObjFieldofObject(sqInt fieldIndex, sqInt anObject); +extern sqInt formatOfClass(sqInt classPointer); +static sqInt NoDbgRegParms formatOf(sqInt objOop); +static sqInt forwardedFormat(void); +static sqInt freeChunkNextIndex(void); +static sqInt freeChunkParentIndex(void); +static sqInt NoDbgRegParms freeChunkWithBytesat(sqInt bytes, sqInt address); +extern sqInt freeObject(sqInt objOop); +extern usqLong NeverInline fullGC(void); +static float getHeapGrowthToSizeGCRatio(void); +static sqInt NoDbgRegParms goodContextSize(sqInt oop); +static sqInt NoDbgRegParms growOldSpaceByAtLeast(sqInt minAmmount); +extern usqLong headerForSlotsformatclassIndex(sqInt numSlots, sqInt formatField, sqInt classIndex); +static usqLong NoDbgRegParms headerForSlotshashformatclassIndex(sqInt numSlots, sqInt hash, sqInt formatField, sqInt classIndex); +static sqInt hiddenRootSlots(void); +static sqInt hiddenRootsObject(void); +static usqInt imageSegmentVersion(void); +#if IMMUTABILITY +extern sqInt immutableBitMask(void); +#endif /* IMMUTABILITY */ +extern void incrementalGC(void); +static void NoDbgRegParms inFreeTreeReplacewith(sqInt treeNode, sqInt newNode); +static sqInt NoDbgRegParms initialInstanceOf(sqInt classObj); +static void NeverInline initializeNewSpaceVariables(void); +static void NoDbgRegParms initializeObjectMemory(sqInt bytesToShift); +extern void inOrderPrintFreeTreeprintList(sqInt freeChunk, sqInt printNextList); +static void NoDbgRegParms NeverInline inPlaceBecomeandcopyHashFlag(sqInt obj1, sqInt obj2, sqInt copyHashFlag); +extern sqInt instanceSizeOf(sqInt classObj); +extern sqInt instSpecOfClassFormat(sqInt classFormat); +static sqInt NoDbgRegParms instSpecOfClass(sqInt classPointer); +static sqInt NoDbgRegParms isAnyPointerFormat(sqInt format); +extern sqInt isArrayNonImm(sqInt oop); +extern sqInt isArray(sqInt oop); +extern sqInt isBytes(sqInt oop); +extern sqInt isCharacterObject(sqInt oop); +extern sqInt isCharacterValue(sqInt anInteger); +static sqInt NoDbgRegParms isClassAtUniqueIndex(sqInt aClass); +static sqInt NoDbgRegParms isCompiledMethodFormat(sqInt format); +extern sqInt isCompiledMethod(sqInt objOop); +static sqInt NoDbgRegParms isContextHeader(sqInt aHeader); +static sqInt NoDbgRegParms isContextNonImm(sqInt oop); +static sqInt NoDbgRegParms isContext(sqInt oop); +static sqInt NoDbgRegParms isEmptyObjStack(sqInt objStack); +static sqInt NoDbgRegParms isEnumerableObjectNoAssert(sqInt objOop); +static sqInt NoDbgRegParms isEnumerableObject(sqInt objOop); +static sqInt NoDbgRegParms isEphemeronFormat(sqInt format); +static sqInt NoDbgRegParms isEphemeron(sqInt objOop); +extern sqInt isFixedSizePointerFormat(sqInt format); +static sqInt NoDbgRegParms isForwardedClassTag(sqInt classIndex); +extern sqInt isForwarded(sqInt objOop); +static sqInt NoDbgRegParms isFreeObject(sqInt objOop); +extern sqInt isImmediate(sqInt oop); +static sqInt NoDbgRegParms isInClassTable(sqInt objOop); +extern sqInt isIndexable(sqInt objOop); +static sqInt NoDbgRegParms isInEden(sqInt objOop); +static sqInt NoDbgRegParms isInFutureSpace(sqInt address); +extern sqInt isInMemory(sqInt address); +static sqInt NoDbgRegParms isInNewSpace(sqInt objOop); +extern sqInt isInOldSpace(sqInt address); +static sqInt NoDbgRegParms isInPastSpace(sqInt address); +static sqInt NoDbgRegParms isMaybeFiredEphemeron(sqInt objOop); +extern sqInt isNonImmediate(sqInt oop); +static sqInt NoDbgRegParms isObjEphemeron(sqInt objOop); +static sqInt NoDbgRegParms isObjImmutable(sqInt anOop); +extern sqInt isOldObject(sqInt objOop); +extern sqInt isOopCompiledMethod(sqInt oop); +extern sqInt isOopForwarded(sqInt oop); +extern sqInt isOopImmutable(sqInt oop); +extern sqInt isOopMutable(sqInt oop); +extern sqInt isPinned(sqInt objOop); +extern sqInt isPointers(sqInt oop); +static sqInt NoDbgRegParms isPureBitsFormat(sqInt format); +extern sqInt isReallyYoungObject(sqInt obj); +extern sqInt isReallyYoung(sqInt oop); +static sqInt NoDbgRegParms isRemembered(sqInt objOop); +static sqInt NoDbgRegParms isSegmentBridge(sqInt objOop); +extern sqInt isUnambiguouslyForwarder(sqInt objOop); +extern sqInt isUnmarked(sqInt objOop); +extern sqInt isValidClassTag(sqInt classIndex); +static sqInt NoDbgRegParms isValidFreeObject(sqInt objOop); +static sqInt NoDbgRegParms isValidObjStackAt(sqInt objStackRootIndex); +static sqInt NoDbgRegParms isValidObjStackPagemyIndex(sqInt objStackPage, sqInt myx); +static sqInt NoDbgRegParms isValidObjStackPagemyIndexfirstPage(sqInt objStackPage, sqInt myx, sqInt isFirstPage); +static sqInt NoDbgRegParms isValidObjStack(sqInt objStack); +static sqInt NoDbgRegParms isWeakFormat(sqInt format); +static sqInt NoDbgRegParms isWeakNonImm(sqInt objOop); +extern sqInt isWeak(sqInt oop); +extern sqInt isWordsOrBytes(sqInt oop); +extern sqInt isWords(sqInt oop); +extern sqInt isYoungObject(sqInt objOop); +extern sqInt isYoung(sqInt oop); +static sqInt NoDbgRegParms isinstanceOfcompactClassIndex(sqInt oop, sqInt classOop, sqInt compactClassIndex); +static sqInt NoDbgRegParms isonObjStack(sqInt oop, sqInt objStack); +static sqInt NoDbgRegParms keyOfEphemeron(sqInt objOop); +static sqInt NoDbgRegParms knownClassAtIndex(sqInt classIndex); +extern sqInt lastPointerOfWhileSwizzling(sqInt objOop); +extern sqInt lastPointerOf(sqInt objOop); +extern sqInt leakCheckBecome(void); +extern sqInt leakCheckFullGC(void); +extern sqInt leakCheckIncremental(void); +extern sqInt leakCheckNewSpaceGC(void); +static sqInt NoDbgRegParms lengthOfMaybeImmediate(sqInt oop); +extern sqInt lengthOf(sqInt objOop); +extern sqInt literalCountOfMethodHeader(sqInt header); +extern sqInt literalCountOf(sqInt methodPointer); +static sqInt NoDbgRegParms loadImageSegmentFromoutPointers(sqInt segmentWordArray, sqInt outPointerArray); +extern void longPrintInstancesOf(sqInt aClassOop); +extern void longPrintInstancesWithClassIndex(sqInt classIndex); +extern void longPrintReferencesTo(sqInt anOop); +static void mapExtraRoots(void); +static void NeverInline mapMournQueue(void); +static sqInt NoDbgRegParms mapOopsFromtooutPointersoutHashes(sqInt segStart, sqInt segAddr, sqInt outPointerArray, sqInt savedOutHashes); +static void NoDbgRegParms markAndTraceClassOf(sqInt objOop); +static void NoDbgRegParms markAndTraceObjStackandContents(sqInt stackOrNil, sqInt markAndTraceContents); +extern void NeverInline markAndTrace(sqInt objOop); +static sqInt markInactiveEphemerons(void); +static void NoDbgRegParms markLoopFrom(sqInt objOop); +static void NoDbgRegParms NeverInline markObjects(sqInt objectsShouldBeUnmarkedAndUnmarkedClassesShouldBeExpunged); +static void markWeaklingsAndMarkAndFireEphemerons(void); +extern sqInt maybeSplObj(sqInt index); +static sqInt NoDbgRegParms methodHeaderOf(sqInt methodObj); +static sqInt newObjectHash(void); +static sqInt newSpaceIsEmpty(void); +extern sqInt nilObject(void); +static void NeverInline nilUnmarkedWeaklingSlots(void); +static sqInt NoDbgRegParms noCheckClassAtIndex(sqInt classIndex); +static sqInt NoDbgRegParms noCheckPushonObjStack(sqInt objOop, sqInt objStack); +static sqInt NoDbgRegParms noFixupFollowFieldofObject(sqInt fieldIndex, sqInt anObject); +static sqInt NoDbgRegParms noInlineObjectAfterlimit(sqInt objOop, sqInt limit); +extern sqInt nonIndexablePointerFormat(void); +static sqInt noUnscannedEphemerons(void); +static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); +extern sqInt numBytesOf(sqInt objOop); +extern sqInt numPointerSlotsOf(sqInt objOop); +static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); +extern usqInt numSlotsOf(sqInt objOop); +static sqInt NoDbgRegParms numStrongSlotsOfInephemeral(sqInt objOop); +extern sqInt numStrongSlotsOfWeakling(sqInt objOop); +extern sqInt objectAfter(sqInt objOop); +extern sqInt objectBefore(sqInt objOop); +static sqInt NoDbgRegParms objectStartingAt(sqInt address); +static sqInt NoDbgRegParms objectsReachableFromRoots(sqInt arrayOfRoots); +extern sqInt obsoleteDontUseThisFetchWordofObject(sqInt fieldIndex, sqInt oop); +static sqInt NoDbgRegParms okayOop(sqInt signedOop); +extern sqInt oldSpaceObjectAfter(sqInt objOop); +static void NoDbgRegParms NeverInline outOfPlaceBecomeandcopyHashFlag(sqInt obj1, sqInt obj2, sqInt copyHashFlag); +extern sqInt pinObject(sqInt objOop); +static sqInt NoDbgRegParms popObjStack(sqInt objStack); +extern sqInt popRemappableOop(void); +static void NoDbgRegParms postBecomeScanClassTable(sqInt effectsFlags); +extern sqInt primitiveErrorTable(void); +extern void printActivationsOf(sqInt aMethodObj); +extern void printBogons(void); +extern void printContextReferencesTo(sqInt anOop); +extern void printEntity(sqInt oop); +extern void printForwarders(void); +extern void printFreeChunks(void); +extern void printFreeChunk(sqInt freeChunk); +static void NoDbgRegParms printFreeChunkprintAsTreeNode(sqInt freeChunk, sqInt printAsTreeNode); +extern void printFreeListHeads(void); +extern sqInt printFreeList(sqInt chunkOrIndex); +extern void printFreeTree(void); +static void NoDbgRegParms printFreeTreeChunk(sqInt chunkOrZero); +extern void printHeaderOf(sqInt objOop); +static void NoDbgRegParms printHeaderTypeOf(sqInt objOop); +extern void printInstancesOf(sqInt aClassOop); +extern void printInstancesWithClassIndex(sqInt classIndex); +extern void printInvalidClassTableEntries(void); +extern void printMethodImplementorsOf(sqInt anOop); +extern void printMethodReferencesTo(sqInt anOop); +extern void printObjectsFromto(sqInt startAddress, sqInt endAddress); +extern void printObjectsWithHash(sqInt hash); +static void NoDbgRegParms printObjStackPagemyIndexpageType(sqInt objStackPage, sqInt myx, sqInt pageType); +static void NoDbgRegParms printObjStackPagemyIndextag(sqInt objStackPage, sqInt myx, char *pageType); +extern void printObjStack(sqInt objStack); +extern void printOopsFromto(sqInt startAddress, sqInt endAddress); +extern void printOopsSuchThat(sqInt (*function)(sqInt)); +extern void printReferencesTo(sqInt anOop); +static sqInt NoDbgRegParms pushOnUnscannedEphemeronsStack(sqInt anEphemeron); +extern void pushRemappableOop(sqInt oop); +static sqInt NoDbgRegParms pushonObjStack(sqInt objOop, sqInt objStack); +static void NoDbgRegParms queueMourner(sqInt anEphemeronOrWeakArray); +static sqInt NoDbgRegParms rawClassTagForClass(sqInt classObj); +extern sqInt rawHashBitsOf(sqInt objOop); +static sqInt NoDbgRegParms relocateObjStackForPlanningCompactor(sqInt objStack); +extern sqInt removeGCRoot(sqInt *varLoc); +static void NoDbgRegParms restoreObjectsInsavedHashes(sqInt objArray, sqInt savedHashes); +static void NoDbgRegParms runLeakCheckerForFreeSpace(sqInt gcModes); +static void NoDbgRegParms runLeakCheckerFor(sqInt gcModes); +static void NoDbgRegParms runLeakCheckerForexcludeUnmarkedObjsclassIndicesShouldBeValid(sqInt gcModes, sqInt excludeUnmarkedObjs, sqInt classIndicesShouldBeValid); +static void NoDbgRegParms scavengingGCTenuringIf(sqInt tenuringCriterion); +static sqInt NoDbgRegParms NeverInline setHeapBasememoryLimitendOfMemory(sqInt baseOfHeap, sqInt memLimit, sqInt memEnd); +static sqInt NoDbgRegParms shortentoIndexableSize(sqInt objOop, sqInt indexableSize); +extern void shortPrintObjectsFromto(sqInt startAddress, sqInt endAddress); +extern sqInt shouldRemapOop(sqInt oop); +static sqInt NoDbgRegParms sizeOfObjStack(sqInt objStack); +static sqInt slidingCompactionInProgress(void); +extern sqInt slotSizeOf(sqInt oop); +extern sqInt splObj(sqInt index); +static usqInt NoDbgRegParms startOfObject(sqInt objOop); +extern usqInt storeCheckBoundary(void); +static sqInt NoDbgRegParms storeImageSegmentIntooutPointersroots(sqInt segmentWordArray, sqInt outPointerArray, sqInt arrayOfRoots); +extern sqInt storePointerUncheckedofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); +extern sqInt storePointerofObjectwithValue(sqInt fieldIndex, sqInt objOop, sqInt valuePointer); +extern sqInt stringForCString(const char *aCString); +static sqInt NoDbgRegParms sufficientSpaceAfterGC(sqInt numBytes); +static sqInt NoDbgRegParms swizzleObjStackAt(sqInt objStackRootIndex); +extern void tenuringIncrementalGC(void); +static sqInt NoDbgRegParms topOfObjStack(sqInt objStack); +extern sqInt topRemappableOop(void); +static sqInt totalFreeListBytes(void); +extern sqInt trueObject(void); +static void NoDbgRegParms unlinkFreeChunk(sqInt freeChunk); +static void NoDbgRegParms unlinkSolitaryFreeTreeNode(sqInt freeTreeNode); +extern sqInt unpinObject(sqInt objOop); +static sqInt validClassTableHashes(void); +static sqInt validClassTableRootPages(void); +extern sqInt validFreeTree(void); +static const char * NoDbgRegParms validFreeTreeChunkparent(sqInt chunk, sqInt parent); +static sqInt validObjStacks(void); +extern sqInt vmEndianness(void); +static void NeverInline compact(void); +static sqInt NeverInline copyAndUnmarkMobileObjects(void); +static void NoDbgRegParms NeverInline copyAndUnmark(sqInt firstPass); +static void NoDbgRegParms freeFromupTonextObject(usqInt initialToFinger, usqInt limit, sqInt nextObject); +static sqInt initializeScanCheckingForFullyCompactedHeap(void); +static sqInt NoDbgRegParms isMobile(sqInt obj); +static sqInt NoDbgRegParms isPostMobile(sqInt obj); +static sqInt NeverInline planCompactSavingForwarders(void); +static void NoDbgRegParms reinitializeScanFrom(sqInt initialObject); +extern sqInt remapObj(sqInt objOop); +static sqInt savedFirstFieldsSpaceWasAllocated(void); +static sqInt NoDbgRegParms scanForFirstFreeAndFirstMobileObjectFrom(sqInt initialObject); +extern sqInt shouldRemapObj(sqInt objOop); +static void NeverInline updatePointers(void); +static void NoDbgRegParms updatePointersInsavedFirstFieldPointer(sqInt obj, sqInt firstFieldPtr); +static sqInt NoDbgRegParms useSegmentForSavedFirstFieldsSpace(sqInt spaceEstimate); +static sqInt NoDbgRegParms validRelocationPlanInPass(sqInt onePass); +static usqInt NoDbgRegParms segLimit(SpurSegmentInfo * self_in_segLimit); +static SpurSegmentInfo * NoDbgRegParms addSegmentOfSize(sqInt ammount); +static void NoDbgRegParms adjustSegmentSwizzlesBy(sqInt firstSegmentShift); +static sqInt allBridgesMarked(void); +static void allocateOrExtendSegmentInfos(void); +static sqInt NoDbgRegParms bridgeAt(sqInt segIndex); +static sqInt NoDbgRegParms bridgeFor(SpurSegmentInfo *aSegment); +static void NoDbgRegParms bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil); +static void checkSegments(void); +static void collapseSegmentsPostSwizzle(void); +static void * NoDbgRegParms firstGapOfSizeAtLeast(sqInt size); +static sqInt NoDbgRegParms isEmptySegment(SpurSegmentInfo *seg); +static sqInt NoDbgRegParms isInSegments(usqInt address); +static sqInt NoDbgRegParms isValidSegmentBridge(sqInt objOop); +static SpurSegmentInfo * NoDbgRegParms nextNonEmptySegmentAfter(sqInt i); +static void postSnapshot(void); +static void NeverInline prepareForSnapshot(void); +static sqInt NoDbgRegParms readHeapFromImageFiledataBytes(sqImageFile f, sqInt numBytes); +EXPORT(SpurSegmentInfo *) segmentContainingObj(sqInt objOop); +static sqInt NoDbgRegParms shrinkObjectMemory(usqInt delta); +static sqInt someSegmentContainsPinned(void); +static sqInt NoDbgRegParms swizzleObj(sqInt objOop); +static usqInt totalBytesInSegments(void); +static sqInt NoDbgRegParms writeImageSegmentsToFile(sqImageFile aBinaryStream); +static sqInt NoDbgRegParms writeSegmentnextSegmenttoFile(SpurSegmentInfo *segment, SpurSegmentInfo *nextSegment, sqImageFile aBinaryStream); +extern sqInt activeProcess(void); +static void NoDbgRegParms addLastLinktoList(sqInt proc, sqInt aList); +static void NoDbgRegParms addNewMethodToCache(sqInt classObj); +static sqInt NoDbgRegParms addressCouldBeClassObj(sqInt maybeClassObj); +static char * allOnesAsCharStar(void); +extern sqInt argumentCountOfClosure(sqInt closurePointer); +extern sqInt argumentCountOfMethodHeader(sqInt header); +extern sqInt argumentCountOf(sqInt methodPointer); +extern void * arrayValueOf(sqInt arrayOop); +static sqInt NoDbgRegParms asciiOfCharacter(sqInt characterObj); +extern void assertValidExecutionPointers(usqInt lip, char *lifp, char *lisp); +static void NoDbgRegParms assertValidExecutionPointersimbarline(usqInt lip, char *lfp, char *lsp, sqInt inInterpreter, sqInt ln); +extern sqInt booleanValueOf(sqInt obj); +EXPORT(sqInt) callbackEnter(sqInt *callbackID); +EXPORT(sqInt) callbackLeave(sqInt cbID); +extern sqInt canContextSwitchIfActivatingheader(sqInt theMethod, sqInt methodHeader); +extern sqInt characterForAscii(sqInt ascii); +extern sqInt checkAllAccessibleObjectsOkay(void); +static sqInt NoDbgRegParms checkCodeIntegrity(sqInt fullGCFlag); +static sqInt checkDeliveryOfLongRunningPrimitiveSignal(void); +extern sqInt checkedIntegerValueOf(sqInt intOop); +static sqInt NoDbgRegParms checkForEventsMayContextSwitch(sqInt mayContextSwitch); +static sqInt NoDbgRegParms checkImageVersionFromstartingAt(sqImageFile f, squeakFileOffsetType imageOffset); +static sqInt checkInterpreterIntegrity(void); +static sqInt NoDbgRegParms checkIsStillMarriedContextcurrentFP(sqInt aContext, char *currentFP); +static sqInt NoDbgRegParms checkOkayFields(sqInt oop); +extern sqInt checkOkayInterpreterObjects(sqInt writeBack); +static sqInt NoDbgRegParms checkOkayStackPage(StackPage *thePage); +static sqInt NoDbgRegParms checkOkayStackZone(sqInt writeBack); +static void NoDbgRegParms checkProfileTick(sqInt aPrimitiveMethod); +static sqInt checkStackIntegrity(void); +static sqInt NoDbgRegParms checkStackPointerForMaybeMarriedContext(sqInt aContext); +static sqInt NoDbgRegParms checkStackPointerIndexForFrame(char *theFP); +static sqInt NoDbgRegParms classNameOfIs(sqInt aClass, char *className); +static sqInt NoDbgRegParms contexthasSender(sqInt thisCntx, sqInt aContext); +static sqInt NoDbgRegParms contexthasValidInversePCMappingOfin(sqInt aContext, sqInt theIP, char *theFP); +extern sqInt copiedValueCountOfClosure(sqInt closurePointer); +extern sqInt copiedValueCountOfFullClosure(sqInt closurePointer); +extern sqInt copyBits(void); +extern sqInt copyBitsFromtoat(sqInt x0, sqInt x1, sqInt y); +static sqInt NoDbgRegParms NeverInline couldBeProcess(sqInt oop); +static void cr(void); +static void NoDbgRegParms createActualMessageTo(sqInt lookupClass); +static sqInt defaultNumStackPages(void); +extern sqInt disownVM(sqInt flags); +static sqInt NoDbgRegParms displayBitsOfLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); +static sqInt divorceAllFrames(void); +static void NoDbgRegParms divorceFramesIn(StackPage *aStackPage); +static sqInt NoDbgRegParms doPrimitiveDivby(sqInt rcvr, sqInt arg); +static sqInt NoDbgRegParms doPrimitiveModby(sqInt rcvr, sqInt arg); +extern sqInt doSignalSemaphoreWithIndex(sqInt index); +static void dummyReferToProxy(void); +extern void dumpPrimTraceLog(void); +static sqInt NoDbgRegParms ensureCallerContext(char *theFP); +static void NoDbgRegParms ensureImageFormatIsUpToDate(sqInt swapBytes); +static void NoDbgRegParms externalDivorceFrameandContext(char *theFP, sqInt ctxt); +static char * NoDbgRegParms externalEnsureIsBaseFrame(char *aFramePtr); +static sqInt NoDbgRegParms externalInstVarofContext(sqInt offset, sqInt aContext); +static sqInt NoDbgRegParms externalInstVarofContextput(sqInt index, sqInt maybeMarriedContext, sqInt anOop); +static sqInt externalQuickPrimitiveResponse(void); +static void failUnbalancedPrimitive(void); +extern void * fetchArrayofObject(sqInt fieldIndex, sqInt objectPointer); +extern double fetchFloatofObject(sqInt fieldIndex, sqInt objectPointer); +extern sqInt fetchIntegerofObject(sqInt fieldIndex, sqInt objectPointer); +static sqInt NoDbgRegParms fetchPointerofMarriedContext(sqInt offset, sqInt aContext); +static sqInt NoDbgRegParms fetchStackPointerOf(sqInt aContext); +static sqInt NoDbgRegParms findClassContainingMethodstartingAt(sqInt meth, sqInt classObj); +extern sqInt findClassOfMethodforReceiver(sqInt meth, sqInt rcvr); +static char * NoDbgRegParms findFrameAboveinPage(char *theFP, StackPage *thePage); +static sqInt NoDbgRegParms findHomeForContext(sqInt aContext); +static sqInt NoDbgRegParms findMethodWithPrimitiveFromContextUpToContext(sqInt primitive, sqInt senderContext, sqInt homeContext); +static sqInt NoDbgRegParms findNewMethodInClassTag(sqInt classTagArg); +extern sqInt findSelectorOfMethod(sqInt meth); +static char * NoDbgRegParms findSPOfon(char *theFP, StackPage *thePage); +static void NoDbgRegParms fireEphemeron(sqInt ephemeron); +static void NoDbgRegParms fireFinalization(sqInt weakling); +extern double floatArg(sqInt index); +static sqInt NoDbgRegParms flushExternalPrimitiveOf(sqInt methodObj); +static void flushMethodCache(void); +static void NoDbgRegParms followForwardedFrameContentsstackPointer(char *theFP, char *theSP); +static void NoDbgRegParms followForwardingPointersInStackZone(sqInt theBecomeEffectsFlags); +extern sqInt forceInterruptCheck(void); +extern void forceInterruptCheckFromHeartbeat(void); +static sqInt NoDbgRegParms frameCallerContext(char *theFP); +static sqInt NoDbgRegParms frameContext(char *theFP); +static sqInt NoDbgRegParms frameHasContext(char *theFP); +static sqInt NoDbgRegParms frameIsBlockActivation(char *theFP); +static sqInt NoDbgRegParms frameMethodObject(char *theFP); +static sqInt NoDbgRegParms frameMethod(char *theFP); +static sqInt NoDbgRegParms frameNumArgs(char *theFP); +static char * NoDbgRegParms frameOfMarriedContext(sqInt aContext); +static sqInt NoDbgRegParms frameReceiver(char *theFP); +static sqInt NoDbgRegParms frameStackedReceiverOffset(char *theFP); +static void freeUntracedStackPages(void); +extern sqInt fullDisplayUpdate(void); +extern void (*functionPointerForinClass(sqInt primIdx,sqInt theClass))(void) ; +extern sqInt getCurrentBytecode(void); +static sqInt getDesiredCogCodeSize(void); +extern sqInt getFullScreenFlag(void); +extern sqInt getInterruptKeycode(void); +extern sqInt getInterruptPending(void); +extern usqLong getNextWakeupUsecs(void); +extern sqInt getSavedWindowSize(void); +extern sqInt * getStackPointer(void); +extern sqInt getThisSessionID(void); +static sqInt NoDbgRegParms getWord32FromFileswap(sqImageFile aFile, sqInt swapFlag); +static sqInt NoDbgRegParms handleForwardedSelectorFaultFor(sqInt selectorOop); +static sqInt NoDbgRegParms handleForwardedSendFaultForTag(sqInt classTag); +static sqInt NoDbgRegParms handleSpecialSelectorSendFaultForfpsp(sqInt obj, char *theFP, char *theSP); +static void NeverInline handleStackOverflow(void); +static sqInt NoDbgRegParms handleStackOverflowOrEventAllowContextSwitch(sqInt mayContextSwitch); +extern usqInt highBit(usqInt anUnsignedValue); +static sqInt NoDbgRegParms ifCurrentStackPageHasValidHeadPointers(StackPage *thePage); +static usqInt NoDbgRegParms iframeMethod(char *theFP); +extern void ifValidWriteBackStackPointersSaveTo(void *theCFP, void *theCSP, char **savedFPP, char **savedSPP); +extern sqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperclass); +static sqInt NoDbgRegParms instructionPointerForFramecurrentFPcurrentIP(char *spouseFP, char *currentFP, sqInt instrPtr); +extern sqInt integerArg(sqInt index); +static sqInt NeverInline interpreterAllocationReserveBytes(void); +extern void ioFilenamefromStringofLengthresolveAliases(char *aCharBuffer, char *aFilenameString, sqInt filenameLength, sqInt aBoolean); +static sqInt NoDbgRegParms isBaseFrame(char *theFP); +extern sqInt isFloatObject(sqInt oop); +static sqInt NoDbgRegParms isFrameonPage(char *aFrame, StackPage *aPage); +extern sqInt isKindOfInteger(sqInt oop); +extern sqInt isLargeIntegerObject(sqInt oop); +extern sqInt isLargeNegativeIntegerObject(sqInt oop); +extern sqInt isLargePositiveIntegerObject(sqInt oop); +static sqInt NoDbgRegParms isLiveContext(sqInt oop); +static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext); +extern sqInt isOptimizedMethod(sqInt methodObj); +static sqInt isPrimitiveFunctionPointerAnIndex(void); +extern sqInt isQuickPrimitiveIndex(sqInt anInteger); +extern sqInt isReadMediatedContextInstVarIndex(sqInt index); +static sqInt NoDbgRegParms isSingleContext(sqInt aContext); +static sqInt NoDbgRegParms isWidowedContextDuringGC(sqInt aOnceMarriedContext); +static sqInt NoDbgRegParms isWidowedContext(sqInt aOnceMarriedContext); +extern sqInt isWriteMediatedContextInstVarIndex(sqInt index); +extern sqInt isKindOfClass(sqInt oop, sqInt aClass); +extern sqInt isKindOf(sqInt oop, char *className); +extern sqInt isMemberOf(sqInt oop, char *className); +static sqInt NoDbgRegParms lengthOfNameOfClass(sqInt classOop); +extern sqInt literalofMethod(sqInt offset, sqInt methodPointer); +extern sqInt loadBitBltFrom(sqInt bb); +extern void loadInitialContext(void); +extern void longPrintOop(sqInt oop); +extern sqInt longStoreBytecodeForHeader(sqInt methodHeader); +static sqInt NoDbgRegParms lookupInMethodCacheSelclassTag(sqInt selector, sqInt classTag); +static sqInt NoDbgRegParms lookupMethodInClass(sqInt class); +static sqInt NoDbgRegParms lookupOrdinaryNoMNUEtcInClass(sqInt class); +extern sqInt lookupSelectorinClass(sqInt selector, sqInt class); +static StackPage * NoDbgRegParms makeBaseFrameFor(sqInt aContext); +static void NoDbgRegParms makeContextSnapshotSafe(sqInt ctxt); +extern sqInt makePointwithxValueyValue(sqInt xValue, sqInt yValue); +static void mapInterpreterOops(void); +static void NeverInline mapStackPages(void); +static sqInt NoDbgRegParms markAndTraceStackPages(sqInt fullGCFlag); +static void NoDbgRegParms markAndTraceStackPage(StackPage *thePage); +static void markAndTraceUntracedReachableStackPages(void); +static sqInt NoDbgRegParms marriedContextpointsTostackDeltaForCurrentFrame(sqInt spouseContext, sqInt anOop, sqInt stackDeltaForCurrentFrame); +static void NoDbgRegParms marryContextInNewStackPageAndInitializeInterpreterRegisters(sqInt aContext); +static sqInt NoDbgRegParms marryFrameSP(char *theFP, char *theSP); +static sqInt NoDbgRegParms maybeLeakCheckExternalPrimCall(sqInt aMethodObj); +static sqInt NoDbgRegParms maybeSelectorOfMethod(sqInt methodObj); +extern sqInt methodArgumentCount(void); +extern sqInt methodArg(sqInt index); +extern sqInt methodClassAssociationOf(sqInt methodPointer); +extern sqInt methodClassOf(sqInt methodPointer); +static sqInt NoDbgRegParms methodHeaderIndicatesLargeFrame(sqInt methodHeader); +extern sqInt methodPrimitiveIndex(void); +extern sqInt methodReturnValue(sqInt oop); +extern sqInt methodUsesAlternateBytecodeSet(sqInt aMethodObj); +EXPORT(void) moduleUnloaded(char *aModuleName); +static char * NoDbgRegParms moveFramesInthroughtoPage(StackPage *oldPage, char *theFP, StackPage *newPage); +static char * NoDbgRegParms nameOfClass(sqInt classOop); +static sqInt NoDbgRegParms NeverInline noInlineSigned32BitIntegerGutsFor(sqInt integerValue); +static sqInt NoDbgRegParms noInlineTemporaryin(sqInt offset, char *theFP); +static sqInt NoDbgRegParms noInlineTemporaryinput(sqInt offset, char *theFP, sqInt valueOop); +static sqInt NoDbgRegParms noMarkedContextsOnPage(StackPage *thePage); +static sqInt NoDbgRegParms numSlotsOfMarriedContext(sqInt aContext); +static sqInt numStkPages(void); +extern sqInt objCouldBeClassObj(sqInt objOop); +extern sqInt objectArg(sqInt index); +extern sqInt ownVM(sqInt threadIndexAndFlags); +extern sqInt penultimateLiteralOf(sqInt aMethodOop); +extern sqInt popStack(void); +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(usqIntptr_t value); +EXPORT(void) primitiveEventProcessingControl(void); +extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader); +extern sqInt primitiveIndexOf(sqInt methodPointer); +static void NoDbgRegParms printActivationNameForSelectorstartClass(sqInt aSelector, sqInt startClass); +static void NoDbgRegParms printActivationNameForreceiverisBlockfirstTemporary(sqInt aMethod, sqInt anObject, sqInt isBlock, sqInt maybeMessage); +extern void printAllStacks(void); +extern void printCallStack(void); +static sqInt NoDbgRegParms printCallStackFP(char *theFP); +extern sqInt printCallStackOf(sqInt aContextOrProcessOrFrame); +static sqInt NoDbgRegParms printCallStackOfcurrentFP(sqInt aContext, char *currFP); +extern void printChar(sqInt aByte); +static sqInt NoDbgRegParms printContextCallStackOf(sqInt aContext); +extern void printContext(sqInt aContext); +extern void printExternalHeadFrame(void); +static sqInt NoDbgRegParms printFrameAndCallersSPshort(char *theFP, char *theSP, sqInt printShort); +static void NoDbgRegParms printFrameFlagsForFP(char *theFP); +static void NoDbgRegParms printFrameOopat(char *name, char *address); +EXPORT(void) printFramesInPage(StackPage *thePage); +EXPORT(void) printFramesOnStackPageListInUse(void); +static void NoDbgRegParms printFrameThingandFrameat(char *name, char *theFP, char *address); +static void NoDbgRegParms printFrameThingat(char *name, char *address); +extern sqInt printFrame(char *theFP); +extern sqInt printFrameWithSP(char *theFP, char *theSP); +extern void printHexnp(sqInt n); +extern void printHex(sqInt n); +extern void printLikelyImplementorsOfSelector(sqInt selector); +extern void printMethodCache(void); +extern void printMethodCacheFor(sqInt thing); +extern void printMethodDictionaryOf(sqInt behavior); +extern void printMethodDictionary(sqInt dictionary); +static void NoDbgRegParms printNameOfClasscount(sqInt classOop, sqInt cnt); +static void NoDbgRegParms printNum(sqInt n); +static void NoDbgRegParms printOopShort(sqInt oop); +extern sqInt printOop(sqInt oop); +extern void printProcessStack(sqInt aProcess); +extern sqInt printProcsOnList(sqInt procList); +extern sqInt printStackCallStackOf(sqInt aContextOrProcessOrFrame); +extern void printStackPageList(void); +extern void printStackPageListInUse(void); +extern void printStackPages(void); +extern void printStackPagesInUse(void); +static void NoDbgRegParms printStackPageuseCount(StackPage *page, sqInt n); +extern void printStackReferencesTo(sqInt oop); +static void NoDbgRegParms printStringOf(sqInt oop); +extern void print(char *s); +extern void pushBool(sqInt trueOrFalse); +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(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); +static sqInt NoDbgRegParms quickFetchIntegerofObject(sqInt fieldIndex, sqInt objectPointer); +extern sqInt readableFormat(sqInt imageVersion); +extern size_t readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset); +EXPORT(sqInt) reestablishContextPriorToCallback(sqInt callbackContext); +static sqInt NoDbgRegParms removeFirstLinkOfList(sqInt aList); +static sqInt NoDbgRegParms resumepreemptedYieldingIf(sqInt aProcess, sqInt yieldImplicitly); +static sqInt retryPrimitiveOnFailure(void); +EXPORT(sqInt) returnAsThroughCallbackContext(sqInt returnTypeOop, VMCallbackContext *vmCallbackContext, sqInt callbackMethodContext); +static sqInt NoDbgRegParms reverseDisplayFromto(sqInt startIndex, sqInt endIndex); +static void NoDbgRegParms rewriteMethodCacheEntryForExternalPrimitiveToFunction(void (*localPrimAddress)(void)); +static sqInt NoDbgRegParms roomToPushNArgs(sqInt n); +static sqInt NoDbgRegParms safeMethodClassOf(sqInt methodPointer); +static sqInt NoDbgRegParms saneFunctionPointerForFailureOfPrimIndex(sqInt primIndex); +static sqInt schedulerPointer(void); +EXPORT(sqInt) sendInvokeCallbackContext(VMCallbackContext *vmCallbackContext); +EXPORT(sqInt) sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtr, sqInt stackPtr, sqInt regsPtr, sqInt jmpBufPtr); +extern void setBreakMNUSelector(char *aString); +extern void setBreakSelector(char *aString); +extern void setFullScreenFlag(sqInt value); +EXPORT(void (*setInterruptCheckChain(void (*aFunction)(void)))()) ; +extern void setInterruptKeycode(sqInt value); +extern void setInterruptPending(sqInt value); +extern void setNextWakeupUsecs(usqLong value); +extern void setSavedWindowSize(sqInt value); +static void setSignalLowSpaceFlagAndSaveProcess(void); +static void NoDbgRegParms setTraceFlagOnContextsFramesPageIfNeeded(sqInt aContext); +static sqInt NoDbgRegParms shortPrintContext(sqInt aContext); +static sqInt NoDbgRegParms shortPrintFrameAndCallers(char *theFP); +EXPORT(void) shortPrintFramesInPage(StackPage *thePage); +EXPORT(void) shortPrintFramesOnStackPageListInUse(void); +static sqInt NoDbgRegParms shortPrintFrame(char *theFP); +extern void shortPrintFrameAndNCallers(char *theFP, sqInt n); +static sqInt NoDbgRegParms shortPrintOop(sqInt oop); +static sqInt NoDbgRegParms shortReversePrintFrameAndCallers(char *aFramePointer); +extern sqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b); +static sqInt signalExternalSemaphores(void); +extern sqInt signed32BitIntegerFor(sqInt integerValue); +extern sqInt signed64BitIntegerFor(sqLong integerValue); +extern sqInt sizeOfCallPrimitiveBytecode(sqInt methodHeader); +extern sqInt sizeOfLongStoreTempBytecode(sqInt methodHeader); +extern sqInt sizeOfSTArrayFromCPrimitive(void *cPtr); +static sqInt NoDbgRegParms snapshot(sqInt embedded); +static void space(void); +extern sqInt specialSelector(sqInt index); +static void NoDbgRegParms spurPostBecomeAction(sqInt theBecomeEffectsFlags); +extern double stackFloatValue(sqInt offset); +extern sqInt stackIntegerValue(sqInt offset); +static sqInt stackLimitBytes(void); +static sqInt stackLimitOffset(void); +extern sqInt stackObjectValue(sqInt offset); +static sqInt stackPageByteSize(void); +static sqInt stackPageHeadroom(void); +static sqInt NoDbgRegParms stackPointerForMaybeMarriedContext(sqInt aContext); +static sqInt NoDbgRegParms stackPointerIndexForFrame(char *theFP); +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); +extern sqInt stObjectat(sqInt array, sqInt index); +extern sqInt stObjectatput(sqInt array, sqInt index, sqInt value); +extern sqInt storeIntegerofObjectwithValue(sqInt fieldIndex, sqInt objectPointer, sqInt integerValue); +static char * NoDbgRegParms storeSenderOfFramewithValue(char *theFP, sqInt anOop); +extern sqInt stSizeOf(sqInt oop); +extern sqInt superclassOf(sqInt classPointer); +static sqInt NoDbgRegParms synchronousSignal(sqInt aSemaphore); +extern sqInt tempCountOf(sqInt methodPointer); +extern sqInt temporaryCountOfMethodHeader(sqInt header); +static void NoDbgRegParms transferTo(sqInt newProc); +extern sqInt ultimateLiteralOf(sqInt aMethodOop); +static sqInt NoDbgRegParms NeverInline unfollowatIndex(sqInt litVar, sqInt literalIndex); +static void NoDbgRegParms updateStateOfSpouseContextForFrameWithSP(char *theFP, char *theSP); +static sqInt NoDbgRegParms validInstructionPointerinFrame(usqInt anInstrPointer, char *fp); +extern sqInt validInstructionPointerinMethodframePointer(usqInt theInstrPointer, usqInt aMethod, char *fp); +static sqInt validStackPageBaseFrames(void); +static sqInt NoDbgRegParms validStackPageBaseFrame(StackPage *aPage); +static void NoDbgRegParms voidLongRunningPrimitive(char *reason); +static sqInt NoDbgRegParms voidVMStateForSnapshotFlushingExternalPrimitivesIf(sqInt flushExtPrims); +static sqInt wakeHighestPriority(void); +extern char * whereIs(sqInt anOop); +static sqInt NeverInline writeImageFileIO(void); +static sqInt NoDbgRegParms cloneContext(sqInt aContext); +static sqInt NoDbgRegParms fieldOrSenderFPofContext(sqInt index, sqInt contextObj); +static sqInt NoDbgRegParms fieldofFrame(sqInt index, char *theFP); +static sqInt NoDbgRegParms isAppropriateForCopyObject(sqInt oop); +static void primitiveClone(void); +static void primitiveClosureCopyWithCopiedValues(void); +static void primitiveContextAt(void); +static void primitiveContextAtPut(void); +static void primitiveContextSize(void); +static void primitiveContextXray(void); +static void primitiveDeferDisplayUpdates(void); +static void primitiveDoNamedPrimitiveWithArgs(void); +static void primitiveDoPrimitiveWithArgs(void); +static void primitiveExecuteMethod(void); +static void primitiveExecuteMethodArgsArray(void); +static void primitiveExternalCall(void); +static void primitiveFindHandlerContext(void); +static void primitiveFindNextUnwindContext(void); +static void primitiveFlushCacheByMethod(void); +static void primitiveFlushCacheBySelector(void); +static void primitiveFullGC(void); +static void primitiveIncrementalGC(void); +static void primitiveInstVarAt(void); +static void primitiveInstVarAtPut(void); +EXPORT(sqInt) primitiveLongRunningPrimitive(void); +EXPORT(sqInt) primitiveLongRunningPrimitiveSemaphore(void); +static void primitiveObjectPointsTo(void); +static void primitivePerform(void); +static void primitivePin(void); +EXPORT(void) primitiveSetGCSemaphore(void); +static void primitiveSignalAtMilliseconds(void); +static void primitiveSignalAtUTCMicroseconds(void); +static void primitiveSlotAt(void); +static void primitiveSlotAtPut(void); +static void primitiveStoreStackp(void); +static void primitiveTerminateTo(void); +static void primitiveVMParameter(void); +EXPORT(void) primitiveVoidReceiver(void); +static void primitiveVoidVMState(void); +static void NoDbgRegParms pruneStackstackp(sqInt stack, sqInt stackp); +static void unmarkAfterPathTo(void); +static void unmarkAllFrames(void); + +/*** Variables ***/ +#if SQ_USE_GLOBAL_STRUCT +# define _iss /* define in-struct static as void */ +static struct foo { +#else +# define _iss static +#endif +_iss char * stackPointer; +_iss sqInt primFailCode; +_iss usqInt method; +_iss usqInt freeStart; +_iss StackPage * stackPage; +_iss sqInt nilObj; +_iss sqInt bytecodeSetSelector; +_iss sqInt argumentCount; +_iss char * framePointer; +_iss sqInt specialObjectsOop; +_iss usqInt endOfMemory; +_iss usqInt newMethod; +_iss usqInt newSpaceLimit; +_iss sqInt messageSelector; +_iss usqInt oldSpaceStart; +_iss usqInt instructionPointer; +_iss sqInt needGCFlag; +_iss sqInt trueObj; +_iss sqInt falseObj; +_iss SpurSegmentInfo * segments; +_iss usqInt totalFreeOldSpace; +_iss usqInt scavengeThreshold; +_iss usqInt pastSpaceStart; +_iss sqInt hiddenRootsObj; +_iss StackPage * pages; +_iss sqInt numSegments; +_iss sqInt * freeLists; +_iss char * stackMemory; +_iss sqInt rememberedSetSize; +_iss char * stackLimit; +_iss sqInt bytesPerPage; +_iss usqInt freeListsMask; +_iss sqInt * rememberedSet; +_iss sqInt classTableFirstPage; +_iss usqInt firstFreeObject; +_iss StackPage * mostRecentlyUsedPage; +_iss SpurContiguousObjStack savedFirstFieldsSpace; +_iss sqInt remapBufferCount; +_iss sqInt markStack; +_iss SpurContiguousObjStack unscannedEphemerons; +_iss sqInt weaklingStack; +_iss sqInt tempOop; +_iss usqInt newSpaceStart; +_iss usqInt lastMobileObject; +_iss SpurNewSpaceSpace pastSpace; +_iss sqInt numStackPages; +_iss sqInt numClassTablePages; +_iss sqInt profileProcess; +_iss sqInt classTableIndex; +_iss sqInt futureSurvivorStart; +_iss sqInt numRememberedEphemerons; +_iss SpurNewSpaceSpace futureSpace; +_iss sqInt jmpDepth; +_iss sqInt mobileStart; +_iss sqInt profileMethod; +_iss sqInt mournQueue; +_iss sqLong nextProfileTick; +_iss SpurNewSpaceSpace eden; +_iss char * objStackInvalidBecause; +_iss sqInt sweepIndex; +_iss sqInt ephemeronList; +_iss sqInt longRunningPrimitiveCheckMethod; +_iss sqInt longRunningPrimitiveCheckSemaphore; +_iss sqInt profileSemaphore; +_iss sqInt tenureThreshold; +_iss sqInt becomeEffectsFlags; +_iss usqInt freeOldSpaceStart; +_iss sqInt growHeadroom; +_iss sqInt extraRootCount; +_iss sqInt invalidObjStackPage; +_iss usqInt objectAfterLastMobileObject; +_iss sqInt previousRememberedSetSize; +_iss sqInt tempOop2; +_iss sqInt tenureCriterion; +_iss sqInt classNameIndex; +_iss sqInt gcPhaseInProgress; +_iss sqInt lkupClass; +_iss sqInt tempOop3; +_iss sqInt metaclassNumSlots; +_iss sqInt numSegInfos; +_iss sqInt preemptionYields; +_iss usqInt firstMobileObject; +_iss usqLong nextWakeupUsecs; +_iss sqInt savedFirstFieldsSpaceNotInOldSpace; +_iss usqLong statGCEndUsecs; +_iss sqInt highestRunnableProcessPriority; +_iss usqLong longRunningPrimitiveStartUsecs; +_iss usqLong longRunningPrimitiveStopUsecs; +_iss usqLong statCheckForEvents; +_iss sqInt weakList; +_iss sqInt externalPrimitiveTableFirstFreeIndex; +_iss sqInt marking; +_iss sqInt newFinalization; +_iss sqInt statSurvivorCount; +_iss sqInt thisClassIndex; +_iss sqInt firstFieldOfRememberedSet; +_iss sqInt firstSegmentSize; +_iss usqLong gcStartUsecs; +_iss usqInt lowSpaceThreshold; +_iss sqInt pendingFinalizationSignals; +_iss sqInt rememberedSetLimit; +_iss sqInt shrinkThreshold; +_iss usqLong statIOProcessEvents; +_iss sqInt biasForGC; +_iss sqInt edenBytes; +_iss sqInt imageHeaderFlags; +_iss sqInt lastHash; +_iss sqInt lastMethodCacheProbeWrite; +_iss sqInt longRunningPrimitiveCheckSequenceNumber; +_iss usqInt memory; +_iss sqInt anomaly; +_iss sqInt bogon; +_iss sqInt fullScreenFlag; +_iss float heapGrowthToSizeGCRatio; +_iss usqInt heapSizeAtPreviousGC; +_iss sqInt interruptKeycode; +_iss sqInt interruptPending; +_iss usqLong nextPollUsecs; +_iss sqInt rememberedSetRedZone; +_iss sqInt savedWindowSize; +_iss usqLong statCompactionUsecs; +_iss usqLong statForceInterruptCheck; +_iss usqLong statFullGCUsecs; +_iss sqInt statFullGCs; +_iss sqInt statGrowMemory; +_iss usqLong statProcessSwitch; +_iss usqLong statScavengeGCUsecs; +_iss sqInt statScavenges; +_iss sqInt statShrinkMemory; +_iss usqLong statStackOverflow; +_iss usqLong statStackPageDivorce; +_iss sqInt statTenures; +_iss sqInt canSwizzle; +_iss sqInt extraFramesToMoveOnOverflow; +_iss sqInt gcSemaphoreIndex; +_iss sqInt globalSessionID; +_iss sqInt imageFloatsBigEndian; +_iss sqInt longRunningPrimitiveSignalUndelivered; +_iss sqInt maxExtSemTabSizeSet; +_iss sqInt methodDictLinearSearchLimit; +_iss sqInt signalLowSpace; +_iss sqInt statMarkCount; +_iss sqInt statMaxPageCountWhenMapping; +_iss sqInt statNumMaps; +_iss sqInt statPageCountWhenMappingSum; +_iss sqInt statRootTableCount; +_iss double tenuringProportion; +_iss sqInt classByteArrayCompactIndex; +_iss usqLong longRunningPrimitiveGCUsecs; +_iss sqInt overflowLimit; +_iss StackPage * overflowedPage; +_iss sqInt refCountToShrinkRT; +_iss sqInt statCompactPassCount; +_iss usqLong statIGCDeltaUsecs; +_iss sqInt statPendingFinalizationSignals; +_iss sqInt statRootTableOverflows; +_iss usqLong statSGCDeltaUsecs; +_iss sqInt tenuringClassIndex; +_iss sqInt the2ndUnknownShort; +_iss sqInt theUnknownShort; +_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 usqInt byteCount; +_iss usqInt firstFreeChunk; +_iss usqInt lastFreeChunk; +_iss sqInt lowcodeCalloutState; +_iss char * nativeFramePointer; +_iss char * nativeSP; +_iss char * nativeStackPointer; +_iss sqInt nsMethodCache; +_iss sqInt preferredPinningSegment; +_iss char * shadowCallStack; +_iss sqInt shadowCallStackPointer; +_iss sqInt statCoalesces; +_iss usqLong statFGCDeltaUsecs; +_iss usqLong statIncrGCUsecs; +_iss sqInt statIncrGCs; +#undef _iss +#if SQ_USE_GLOBAL_STRUCT + } fum; + #if SQ_USE_GLOBAL_STRUCT_REG +# define DECL_MAYBE_SQ_GLOBAL_STRUCT /* using a global reg pointer */ +# define DECL_MAYBE_VOLATILE_SQ_GLOBAL_STRUCT /* using a global reg pointer */ +#else +# define DECL_MAYBE_SQ_GLOBAL_STRUCT register struct foo * foo = &fum; +# define DECL_MAYBE_VOLATILE_SQ_GLOBAL_STRUCT volatile register struct foo * foo = &fum; +#endif +# define GIV(interpreterInstVar) (foo->interpreterInstVar) +#else +# define DECL_MAYBE_SQ_GLOBAL_STRUCT /* oh, no mr bill! */ +# define DECL_MAYBE_VOLATILE_SQ_GLOBAL_STRUCT /* oh no, mr bill! */ +# define GIV(interpreterInstVar) interpreterInstVar +#endif +#if SQ_USE_GLOBAL_STRUCT +#if SQ_USE_GLOBAL_STRUCT_REG +#define fooxstr(s) foostr(s) +#define foostr(s) #s +register struct foo * foo asm(fooxstr(USE_GLOBAL_STRUCT_REG)); +#else +static struct foo * foo = &fum; +#endif +#endif +static void (*primitiveFunctionPointer)(); +sqInt checkForLeaks; +sqInt debugCallbackPath; +sqInt checkAllocFiller; +sqInt desiredEdenBytes; +sqInt desiredNumStackPages; +sqInt extraVMMemory; +usqInt maxOldSpaceSize; +sqInt breakSelectorLength = MinSmallInteger; +sqInt inIOProcessEvents; +void * showSurfaceFn; +sqInt deferDisplayUpdates; +struct VirtualMachine* interpreterProxy; +static void (*interruptCheckChain)(void) = 0; +char * breakSelector; +sqInt debugCallbackInvokes; +sqInt debugCallbackReturns; +static void (*externalPrimitiveTable[MaxExternalPrimitiveTableSize + 1 /* 4097 */])(void); +static void (*primitiveTable[MaxPrimitiveIndex + 2 /* 577 */])(void) = { + /* 0 */ (void (*)(void))0, + /* 1 */ primitiveAdd, + /* 2 */ primitiveSubtract, + /* 3 */ primitiveLessThan, + /* 4 */ primitiveGreaterThan, + /* 5 */ primitiveLessOrEqual, + /* 6 */ primitiveGreaterOrEqual, + /* 7 */ primitiveEqual, + /* 8 */ primitiveNotEqual, + /* 9 */ primitiveMultiply, + /* 10 */ primitiveDivide, + /* 11 */ primitiveMod, + /* 12 */ primitiveDiv, + /* 13 */ primitiveQuo, + /* 14 */ primitiveBitAnd, + /* 15 */ primitiveBitOr, + /* 16 */ primitiveBitXor, + /* 17 */ primitiveBitShift, + /* 18 */ primitiveMakePoint, + /* 19 */ (void (*)(void))0, + /* 20 */ primitiveRemLargeIntegers, + /* 21 */ primitiveAddLargeIntegers, + /* 22 */ primitiveSubtractLargeIntegers, + /* 23 */ primitiveLessThanLargeIntegers, + /* 24 */ primitiveGreaterThanLargeIntegers, + /* 25 */ primitiveLessOrEqualLargeIntegers, + /* 26 */ primitiveGreaterOrEqualLargeIntegers, + /* 27 */ primitiveEqualLargeIntegers, + /* 28 */ primitiveNotEqualLargeIntegers, + /* 29 */ primitiveMultiplyLargeIntegers, + /* 30 */ primitiveDivideLargeIntegers, + /* 31 */ primitiveModLargeIntegers, + /* 32 */ primitiveDivLargeIntegers, + /* 33 */ primitiveQuoLargeIntegers, + /* 34 */ primitiveBitAndLargeIntegers, + /* 35 */ primitiveBitOrLargeIntegers, + /* 36 */ primitiveBitXorLargeIntegers, + /* 37 */ primitiveBitShiftLargeIntegers, + /* 38 */ primitiveFloatAt, + /* 39 */ primitiveFloatAtPut, + /* 40 */ primitiveAsFloat, + /* 41 */ primitiveFloatAdd, + /* 42 */ primitiveFloatSubtract, + /* 43 */ primitiveFloatLessThan, + /* 44 */ primitiveFloatGreaterThan, + /* 45 */ primitiveFloatLessOrEqual, + /* 46 */ primitiveFloatGreaterOrEqual, + /* 47 */ primitiveFloatEqual, + /* 48 */ primitiveFloatNotEqual, + /* 49 */ primitiveFloatMultiply, + /* 50 */ primitiveFloatDivide, + /* 51 */ primitiveTruncated, + /* 52 */ primitiveFractionalPart, + /* 53 */ primitiveExponent, + /* 54 */ primitiveTimesTwoPower, + /* 55 */ primitiveSquareRoot, + /* 56 */ primitiveSine, + /* 57 */ primitiveArctan, + /* 58 */ primitiveLogN, + /* 59 */ primitiveExp, + /* 60 */ primitiveAt, + /* 61 */ primitiveAtPut, + /* 62 */ primitiveSize, + /* 63 */ primitiveStringAt, + /* 64 */ primitiveStringAtPut, + /* 65 */ (void (*)(void))0, + /* 66 */ (void (*)(void))0, + /* 67 */ (void (*)(void))0, + /* 68 */ primitiveObjectAt, + /* 69 */ primitiveObjectAtPut, + /* 70 */ primitiveNew, + /* 71 */ primitiveNewWithArg, + /* 72 */ primitiveArrayBecomeOneWay, + /* 73 */ primitiveInstVarAt, + /* 74 */ primitiveInstVarAtPut, + /* 75 */ primitiveIdentityHash, + /* 76 */ primitiveStoreStackp, + /* 77 */ primitiveSomeInstance, + /* 78 */ primitiveNextInstance, + /* 79 */ primitiveNewMethod, + /* 80 */ (void (*)(void))0, + /* 81 */ (void (*)(void))0, + /* 82 */ (void (*)(void))0, + /* 83 */ primitivePerform, + /* 84 */ primitivePerformWithArgs, + /* 85 */ primitiveSignal, + /* 86 */ primitiveWait, + /* 87 */ primitiveResume, + /* 88 */ primitiveSuspend, + /* 89 */ primitiveFlushCache, + /* 90 */ primitiveMousePoint, + /* 91 */ primitiveTestDisplayDepth, + /* 92 */ primitiveSetDisplayMode, + /* 93 */ primitiveInputSemaphore, + /* 94 */ primitiveGetNextEvent, + /* 95 */ primitiveInputWord, + /* 96 */ (void (*)(void))0, + /* 97 */ primitiveSnapshot, + /* 98 */ primitiveStoreImageSegment, + /* 99 */ primitiveLoadImageSegment, + /* 100 */ primitivePerformInSuperclass, + /* 101 */ primitiveBeCursor, + /* 102 */ primitiveBeDisplay, + /* 103 */ primitiveScanCharacters, + /* 104 */ (void (*)(void))0, + /* 105 */ primitiveStringReplace, + /* 106 */ primitiveScreenSize, + /* 107 */ primitiveMouseButtons, + /* 108 */ primitiveKbdNext, + /* 109 */ primitiveKbdPeek, + /* 110 */ primitiveIdentical, + /* 111 */ primitiveClass, + /* 112 */ primitiveBytesLeft, + /* 113 */ primitiveQuit, + /* 114 */ primitiveExitToDebugger, + /* 115 */ primitiveChangeClass, + /* 116 */ primitiveFlushCacheByMethod, + /* 117 */ primitiveExternalCall, + /* 118 */ primitiveDoPrimitiveWithArgs, + /* 119 */ primitiveFlushCacheBySelector, + /* 120 */ primitiveCalloutToFFI, + /* 121 */ primitiveImageName, + /* 122 */ primitiveNoop, + /* 123 */ (void (*)(void))0, + /* 124 */ primitiveLowSpaceSemaphore, + /* 125 */ primitiveSignalAtBytesLeft, + /* 126 */ primitiveDeferDisplayUpdates, + /* 127 */ primitiveShowDisplayRect, + /* 128 */ primitiveArrayBecome, + /* 129 */ primitiveSpecialObjectsOop, + /* 130 */ primitiveFullGC, + /* 131 */ primitiveIncrementalGC, + /* 132 */ primitiveObjectPointsTo, + /* 133 */ primitiveSetInterruptKey, + /* 134 */ primitiveInterruptSemaphore, + /* 135 */ primitiveMillisecondClock, + /* 136 */ primitiveSignalAtMilliseconds, + /* 137 */ primitiveSecondsClock, + /* 138 */ primitiveSomeObject, + /* 139 */ primitiveNextObject, + /* 140 */ primitiveBeep, + /* 141 */ primitiveClipboardText, + /* 142 */ primitiveVMPath, + /* 143 */ primitiveShortAt, + /* 144 */ primitiveShortAtPut, + /* 145 */ primitiveConstantFill, + /* 146 */ (void (*)(void))0, + /* 147 */ (void (*)(void))0, + /* 148 */ primitiveClone, + /* 149 */ primitiveGetAttribute, + /* 150 */ (void (*)(void))0, + /* 151 */ (void (*)(void))0, + /* 152 */ (void (*)(void))0, + /* 153 */ (void (*)(void))0, + /* 154 */ (void (*)(void))0, + /* 155 */ (void (*)(void))0, + /* 156 */ (void (*)(void))0, + /* 157 */ (void (*)(void))0, + /* 158 */ (void (*)(void))0, + /* 159 */ (void (*)(void))0, + /* 160 */ primitiveAdoptInstance, + /* 161 */ primitiveSetOrHasIdentityHash, + /* 162 */ (void (*)(void))0, + /* 163 */ primitiveGetImmutability, + /* 164 */ primitiveSetImmutability, + /* 165 */ primitiveIntegerAt, + /* 166 */ primitiveIntegerAtPut, + /* 167 */ primitiveYield, + /* 168 */ primitiveCopyObject, + /* 169 */ primitiveNotIdentical, + /* 170 */ primitiveAsCharacter, + /* 171 */ primitiveImmediateAsInteger, + /* 172 */ primitiveFetchNextMourner, + /* 173 */ primitiveSlotAt, + /* 174 */ primitiveSlotAtPut, + /* 175 */ primitiveBehaviorHash, + /* 176 */ primitiveMaxIdentityHash, + /* 177 */ primitiveAllInstances, + /* 178 */ primitiveAllObjects, + /* 179 */ (void (*)(void))0, + /* 180 */ primitiveGrowMemoryByAtLeast, + /* 181 */ primitiveSizeInBytesOfInstance, + /* 182 */ primitiveSizeInBytes, + /* 183 */ primitiveIsPinned, + /* 184 */ primitivePin, + /* 185 */ primitiveExitCriticalSection, + /* 186 */ primitiveEnterCriticalSection, + /* 187 */ primitiveTestAndSetOwnershipOfCriticalSection, + /* 188 */ primitiveExecuteMethodArgsArray, + /* 189 */ primitiveExecuteMethod, + /* 190 */ (void (*)(void))0, + /* 191 */ (void (*)(void))0, + /* 192 */ (void (*)(void))0, + /* 193 */ (void (*)(void))0, + /* 194 */ (void (*)(void))0, + /* 195 */ primitiveFindNextUnwindContext, + /* 196 */ primitiveTerminateTo, + /* 197 */ primitiveFindHandlerContext, + /* 198 */ (void (*)(void))0, + /* 199 */ (void (*)(void))0, + /* 200 */ primitiveClosureCopyWithCopiedValues, + /* 201 */ primitiveClosureValue, + /* 202 */ primitiveClosureValue, + /* 203 */ primitiveClosureValue, + /* 204 */ primitiveClosureValue, + /* 205 */ primitiveClosureValue, + /* 206 */ primitiveClosureValueWithArgs, + /* 207 */ primitiveFullClosureValue, + /* 208 */ primitiveFullClosureValueWithArgs, + /* 209 */ primitiveFullClosureValueNoContextSwitch, + /* 210 */ primitiveContextAt, + /* 211 */ primitiveContextAtPut, + /* 212 */ primitiveContextSize, + /* 213 */ primitiveContextXray, + /* 214 */ primitiveVoidVMState, + /* 215 */ primitiveFlushCacheByMethod, + /* 216 */ (void (*)(void))0, + /* 217 */ (void (*)(void))0, + /* 218 */ primitiveDoNamedPrimitiveWithArgs, + /* 219 */ (void (*)(void))0, + /* 220 */ (void (*)(void))0, + /* 221 */ primitiveClosureValueNoContextSwitch, + /* 222 */ primitiveClosureValueNoContextSwitch, + /* 223 */ (void (*)(void))0, + /* 224 */ (void (*)(void))0, + /* 225 */ (void (*)(void))0, + /* 226 */ (void (*)(void))0, + /* 227 */ (void (*)(void))0, + /* 228 */ (void (*)(void))0, + /* 229 */ (void (*)(void))0, + /* 230 */ primitiveRelinquishProcessor, + /* 231 */ primitiveForceDisplayUpdate, + /* 232 */ primitiveFormPrint, + /* 233 */ primitiveSetFullScreen, + /* 234 */ (void (*)(void))0, + /* 235 */ (void (*)(void))0, + /* 236 */ (void (*)(void))0, + /* 237 */ (void (*)(void))0, + /* 238 */ (void (*)(void))0, + /* 239 */ (void (*)(void))0, + /* 240 */ primitiveUTCMicrosecondClock, + /* 241 */ primitiveLocalMicrosecondClock, + /* 242 */ primitiveSignalAtUTCMicroseconds, + /* 243 */ primitiveUpdateTimezone, + /* 244 */ primitiveUtcAndTimezoneOffset, + /* 245 */ (void (*)(void))0, + /* 246 */ (void (*)(void))0, + /* 247 */ primitiveSnapshotEmbedded, + /* 248 */ (void (*)(void))0, + /* 249 */ primitiveArrayBecomeOneWayCopyHash, + /* 250 */ primitiveClearVMProfile, + /* 251 */ primitiveControlVMProfiling, + /* 252 */ primitiveVMProfileSamplesInto, + /* 253 */ (void (*)(void))0, + /* 254 */ primitiveVMParameter, + /* 255 */ (void (*)(void))0, + /* 256 */ (void (*)(void))256, + /* 257 */ (void (*)(void))257, + /* 258 */ (void (*)(void))258, + /* 259 */ (void (*)(void))259, + /* 260 */ (void (*)(void))260, + /* 261 */ (void (*)(void))261, + /* 262 */ (void (*)(void))262, + /* 263 */ (void (*)(void))263, + /* 264 */ (void (*)(void))264, + /* 265 */ (void (*)(void))265, + /* 266 */ (void (*)(void))266, + /* 267 */ (void (*)(void))267, + /* 268 */ (void (*)(void))268, + /* 269 */ (void (*)(void))269, + /* 270 */ (void (*)(void))270, + /* 271 */ (void (*)(void))271, + /* 272 */ (void (*)(void))272, + /* 273 */ (void (*)(void))273, + /* 274 */ (void (*)(void))274, + /* 275 */ (void (*)(void))275, + /* 276 */ (void (*)(void))276, + /* 277 */ (void (*)(void))277, + /* 278 */ (void (*)(void))278, + /* 279 */ (void (*)(void))279, + /* 280 */ (void (*)(void))280, + /* 281 */ (void (*)(void))281, + /* 282 */ (void (*)(void))282, + /* 283 */ (void (*)(void))283, + /* 284 */ (void (*)(void))284, + /* 285 */ (void (*)(void))285, + /* 286 */ (void (*)(void))286, + /* 287 */ (void (*)(void))287, + /* 288 */ (void (*)(void))288, + /* 289 */ (void (*)(void))289, + /* 290 */ (void (*)(void))290, + /* 291 */ (void (*)(void))291, + /* 292 */ (void (*)(void))292, + /* 293 */ (void (*)(void))293, + /* 294 */ (void (*)(void))294, + /* 295 */ (void (*)(void))295, + /* 296 */ (void (*)(void))296, + /* 297 */ (void (*)(void))297, + /* 298 */ (void (*)(void))298, + /* 299 */ (void (*)(void))299, + /* 300 */ (void (*)(void))300, + /* 301 */ (void (*)(void))301, + /* 302 */ (void (*)(void))302, + /* 303 */ (void (*)(void))303, + /* 304 */ (void (*)(void))304, + /* 305 */ (void (*)(void))305, + /* 306 */ (void (*)(void))306, + /* 307 */ (void (*)(void))307, + /* 308 */ (void (*)(void))308, + /* 309 */ (void (*)(void))309, + /* 310 */ (void (*)(void))310, + /* 311 */ (void (*)(void))311, + /* 312 */ (void (*)(void))312, + /* 313 */ (void (*)(void))313, + /* 314 */ (void (*)(void))314, + /* 315 */ (void (*)(void))315, + /* 316 */ (void (*)(void))316, + /* 317 */ (void (*)(void))317, + /* 318 */ (void (*)(void))318, + /* 319 */ (void (*)(void))319, + /* 320 */ (void (*)(void))320, + /* 321 */ (void (*)(void))321, + /* 322 */ (void (*)(void))322, + /* 323 */ (void (*)(void))323, + /* 324 */ (void (*)(void))324, + /* 325 */ (void (*)(void))325, + /* 326 */ (void (*)(void))326, + /* 327 */ (void (*)(void))327, + /* 328 */ (void (*)(void))328, + /* 329 */ (void (*)(void))329, + /* 330 */ (void (*)(void))330, + /* 331 */ (void (*)(void))331, + /* 332 */ (void (*)(void))332, + /* 333 */ (void (*)(void))333, + /* 334 */ (void (*)(void))334, + /* 335 */ (void (*)(void))335, + /* 336 */ (void (*)(void))336, + /* 337 */ (void (*)(void))337, + /* 338 */ (void (*)(void))338, + /* 339 */ (void (*)(void))339, + /* 340 */ (void (*)(void))340, + /* 341 */ (void (*)(void))341, + /* 342 */ (void (*)(void))342, + /* 343 */ (void (*)(void))343, + /* 344 */ (void (*)(void))344, + /* 345 */ (void (*)(void))345, + /* 346 */ (void (*)(void))346, + /* 347 */ (void (*)(void))347, + /* 348 */ (void (*)(void))348, + /* 349 */ (void (*)(void))349, + /* 350 */ (void (*)(void))350, + /* 351 */ (void (*)(void))351, + /* 352 */ (void (*)(void))352, + /* 353 */ (void (*)(void))353, + /* 354 */ (void (*)(void))354, + /* 355 */ (void (*)(void))355, + /* 356 */ (void (*)(void))356, + /* 357 */ (void (*)(void))357, + /* 358 */ (void (*)(void))358, + /* 359 */ (void (*)(void))359, + /* 360 */ (void (*)(void))360, + /* 361 */ (void (*)(void))361, + /* 362 */ (void (*)(void))362, + /* 363 */ (void (*)(void))363, + /* 364 */ (void (*)(void))364, + /* 365 */ (void (*)(void))365, + /* 366 */ (void (*)(void))366, + /* 367 */ (void (*)(void))367, + /* 368 */ (void (*)(void))368, + /* 369 */ (void (*)(void))369, + /* 370 */ (void (*)(void))370, + /* 371 */ (void (*)(void))371, + /* 372 */ (void (*)(void))372, + /* 373 */ (void (*)(void))373, + /* 374 */ (void (*)(void))374, + /* 375 */ (void (*)(void))375, + /* 376 */ (void (*)(void))376, + /* 377 */ (void (*)(void))377, + /* 378 */ (void (*)(void))378, + /* 379 */ (void (*)(void))379, + /* 380 */ (void (*)(void))380, + /* 381 */ (void (*)(void))381, + /* 382 */ (void (*)(void))382, + /* 383 */ (void (*)(void))383, + /* 384 */ (void (*)(void))384, + /* 385 */ (void (*)(void))385, + /* 386 */ (void (*)(void))386, + /* 387 */ (void (*)(void))387, + /* 388 */ (void (*)(void))388, + /* 389 */ (void (*)(void))389, + /* 390 */ (void (*)(void))390, + /* 391 */ (void (*)(void))391, + /* 392 */ (void (*)(void))392, + /* 393 */ (void (*)(void))393, + /* 394 */ (void (*)(void))394, + /* 395 */ (void (*)(void))395, + /* 396 */ (void (*)(void))396, + /* 397 */ (void (*)(void))397, + /* 398 */ (void (*)(void))398, + /* 399 */ (void (*)(void))399, + /* 400 */ (void (*)(void))400, + /* 401 */ (void (*)(void))401, + /* 402 */ (void (*)(void))402, + /* 403 */ (void (*)(void))403, + /* 404 */ (void (*)(void))404, + /* 405 */ (void (*)(void))405, + /* 406 */ (void (*)(void))406, + /* 407 */ (void (*)(void))407, + /* 408 */ (void (*)(void))408, + /* 409 */ (void (*)(void))409, + /* 410 */ (void (*)(void))410, + /* 411 */ (void (*)(void))411, + /* 412 */ (void (*)(void))412, + /* 413 */ (void (*)(void))413, + /* 414 */ (void (*)(void))414, + /* 415 */ (void (*)(void))415, + /* 416 */ (void (*)(void))416, + /* 417 */ (void (*)(void))417, + /* 418 */ (void (*)(void))418, + /* 419 */ (void (*)(void))419, + /* 420 */ (void (*)(void))420, + /* 421 */ (void (*)(void))421, + /* 422 */ (void (*)(void))422, + /* 423 */ (void (*)(void))423, + /* 424 */ (void (*)(void))424, + /* 425 */ (void (*)(void))425, + /* 426 */ (void (*)(void))426, + /* 427 */ (void (*)(void))427, + /* 428 */ (void (*)(void))428, + /* 429 */ (void (*)(void))429, + /* 430 */ (void (*)(void))430, + /* 431 */ (void (*)(void))431, + /* 432 */ (void (*)(void))432, + /* 433 */ (void (*)(void))433, + /* 434 */ (void (*)(void))434, + /* 435 */ (void (*)(void))435, + /* 436 */ (void (*)(void))436, + /* 437 */ (void (*)(void))437, + /* 438 */ (void (*)(void))438, + /* 439 */ (void (*)(void))439, + /* 440 */ (void (*)(void))440, + /* 441 */ (void (*)(void))441, + /* 442 */ (void (*)(void))442, + /* 443 */ (void (*)(void))443, + /* 444 */ (void (*)(void))444, + /* 445 */ (void (*)(void))445, + /* 446 */ (void (*)(void))446, + /* 447 */ (void (*)(void))447, + /* 448 */ (void (*)(void))448, + /* 449 */ (void (*)(void))449, + /* 450 */ (void (*)(void))450, + /* 451 */ (void (*)(void))451, + /* 452 */ (void (*)(void))452, + /* 453 */ (void (*)(void))453, + /* 454 */ (void (*)(void))454, + /* 455 */ (void (*)(void))455, + /* 456 */ (void (*)(void))456, + /* 457 */ (void (*)(void))457, + /* 458 */ (void (*)(void))458, + /* 459 */ (void (*)(void))459, + /* 460 */ (void (*)(void))460, + /* 461 */ (void (*)(void))461, + /* 462 */ (void (*)(void))462, + /* 463 */ (void (*)(void))463, + /* 464 */ (void (*)(void))464, + /* 465 */ (void (*)(void))465, + /* 466 */ (void (*)(void))466, + /* 467 */ (void (*)(void))467, + /* 468 */ (void (*)(void))468, + /* 469 */ (void (*)(void))469, + /* 470 */ (void (*)(void))470, + /* 471 */ (void (*)(void))471, + /* 472 */ (void (*)(void))472, + /* 473 */ (void (*)(void))473, + /* 474 */ (void (*)(void))474, + /* 475 */ (void (*)(void))475, + /* 476 */ (void (*)(void))476, + /* 477 */ (void (*)(void))477, + /* 478 */ (void (*)(void))478, + /* 479 */ (void (*)(void))479, + /* 480 */ (void (*)(void))480, + /* 481 */ (void (*)(void))481, + /* 482 */ (void (*)(void))482, + /* 483 */ (void (*)(void))483, + /* 484 */ (void (*)(void))484, + /* 485 */ (void (*)(void))485, + /* 486 */ (void (*)(void))486, + /* 487 */ (void (*)(void))487, + /* 488 */ (void (*)(void))488, + /* 489 */ (void (*)(void))489, + /* 490 */ (void (*)(void))490, + /* 491 */ (void (*)(void))491, + /* 492 */ (void (*)(void))492, + /* 493 */ (void (*)(void))493, + /* 494 */ (void (*)(void))494, + /* 495 */ (void (*)(void))495, + /* 496 */ (void (*)(void))496, + /* 497 */ (void (*)(void))497, + /* 498 */ (void (*)(void))498, + /* 499 */ (void (*)(void))499, + /* 500 */ (void (*)(void))500, + /* 501 */ (void (*)(void))501, + /* 502 */ (void (*)(void))502, + /* 503 */ (void (*)(void))503, + /* 504 */ (void (*)(void))504, + /* 505 */ (void (*)(void))505, + /* 506 */ (void (*)(void))506, + /* 507 */ (void (*)(void))507, + /* 508 */ (void (*)(void))508, + /* 509 */ (void (*)(void))509, + /* 510 */ (void (*)(void))510, + /* 511 */ (void (*)(void))511, + /* 512 */ (void (*)(void))512, + /* 513 */ (void (*)(void))513, + /* 514 */ (void (*)(void))514, + /* 515 */ (void (*)(void))515, + /* 516 */ (void (*)(void))516, + /* 517 */ (void (*)(void))517, + /* 518 */ (void (*)(void))518, + /* 519 */ (void (*)(void))519, + /* 520 */ (void (*)(void))0, + /* 521 */ (void (*)(void))0, + /* 522 */ (void (*)(void))0, + /* 523 */ (void (*)(void))0, + /* 524 */ (void (*)(void))0, + /* 525 */ (void (*)(void))0, + /* 526 */ (void (*)(void))0, + /* 527 */ (void (*)(void))0, + /* 528 */ (void (*)(void))0, + /* 529 */ (void (*)(void))0, + /* 530 */ (void (*)(void))0, + /* 531 */ (void (*)(void))0, + /* 532 */ (void (*)(void))0, + /* 533 */ (void (*)(void))0, + /* 534 */ (void (*)(void))0, + /* 535 */ (void (*)(void))0, + /* 536 */ (void (*)(void))0, + /* 537 */ (void (*)(void))0, + /* 538 */ (void (*)(void))0, + /* 539 */ (void (*)(void))0, + /* 540 */ (void (*)(void))0, + /* 541 */ (void (*)(void))0, + /* 542 */ (void (*)(void))0, + /* 543 */ (void (*)(void))0, + /* 544 */ (void (*)(void))0, + /* 545 */ (void (*)(void))0, + /* 546 */ (void (*)(void))0, + /* 547 */ (void (*)(void))0, + /* 548 */ (void (*)(void))0, + /* 549 */ (void (*)(void))0, + /* 550 */ (void (*)(void))0, + /* 551 */ (void (*)(void))0, + /* 552 */ (void (*)(void))0, + /* 553 */ (void (*)(void))0, + /* 554 */ (void (*)(void))0, + /* 555 */ (void (*)(void))0, + /* 556 */ (void (*)(void))0, + /* 557 */ (void (*)(void))0, + /* 558 */ (void (*)(void))0, + /* 559 */ (void (*)(void))0, + /* 560 */ (void (*)(void))0, + /* 561 */ (void (*)(void))0, + /* 562 */ (void (*)(void))0, + /* 563 */ (void (*)(void))0, + /* 564 */ (void (*)(void))0, + /* 565 */ (void (*)(void))0, + /* 566 */ (void (*)(void))0, + /* 567 */ (void (*)(void))0, + /* 568 */ (void (*)(void))0, + /* 569 */ (void (*)(void))0, + /* 570 */ primitiveFlushExternalPrimitives, + /* 571 */ primitiveUnloadModule, + /* 572 */ primitiveListBuiltinModule, + /* 573 */ primitiveListExternalModule, + /* 574 */ (void (*)(void))0, + /* 575 */ (void (*)(void))0, + 0 }; +sqInt checkedPluginName; +char expensiveAsserts = 0; +const char *interpreterVersion = "Croquet Closure Stack VM [StackInterpreterPrimitives * VMMaker.oscog-dtl.2147]"; +volatile int sendTrace; +sqInt suppressHeartbeatFlag; + + +/*** Macros ***/ +#define mostRecentlyUsedPage() GIV(mostRecentlyUsedPage) +#define stackPageAtpages(index,pages) ((pages) + (index)) +#define statMaxPageCountWhenMapping() GIV(statMaxPageCountWhenMapping) +#define pageIndexForstackMemorybytesPerPage(pointer,stackmem,pageByteSize) (((char *)(pointer) - (stackmem) - 1) / (pageByteSize)) +#define numTagBits() 2 +#define shiftForWord() 2 +#define smallIntegerTag() 1 +#define tagMask() 0x3 +#define wordSize() 4 +#define eden() GIV(eden) +#define futureSpace() GIV(futureSpace) +#define futureSurvivorStart() GIV(futureSurvivorStart) +#define pastSpace() GIV(pastSpace) +#define rememberedSetLimit() GIV(rememberedSetLimit) +#define rememberedSetSize() GIV(rememberedSetSize) +#define arrayClassIndexPun() 16 +#define characterTag() 2 +#define classIndexMask() 0x3FFFFF +#define classIsItselfClassIndexPun() 31 +#define classTableFirstPage() classTableFirstPage +#define classTableMajorIndexShift() 10 +#define endOfMemory() GIV(endOfMemory) +#define firstByteFormat() 16 +#define firstClassIndexPun() 16 +#define firstCompiledMethodFormat() 24 +#define firstLongFormat() 10 +#define firstShortFormat() 12 +#define fixedFieldsFieldWidth() 16 +#define formatFieldWidthShift() 5 +#define formatMask() 0x1F +#define formatShift() 24 +#define freeStart() GIV(freeStart) +#define greyBitShift() 31 +#define identityHashFullWordShift() 32 +#define identityHashHalfWordMask() 0x3FFFFF +#define immutableBitShift() 23 +#define indexablePointersFormat() 3 +#define isForwardedObjectClassIndexPun() 8 +#define isFreeObjectClassIndexPun() 0 +#define lastClassIndexPun() 31 +#define markedBitFullShift() 55 +#define markedBitHalfShift() 23 +#define maxOldSpaceSize() maxOldSpaceSize +#define memory() GIV(memory) +#define newSpaceLimit() GIV(newSpaceLimit) +#define numSlotsFullShift() 56 +#define numSlotsHalfShift() 24 +#define numSlotsMask() 0xFF +#define oldSpaceStart() GIV(oldSpaceStart) +#define pinnedBitShift() 30 +#define remapBufferCount() GIV(remapBufferCount) +#define rememberedBitShift() 29 +#define rootTableCapacity() GIV(rememberedSetLimit) +#define rootTableCount() GIV(rememberedSetSize) +#define segmentBridgePun() 3 +#define sixtyFourBitIndexableFormat() 9 +#define sixtyFourBitLongsClassIndexPun() 19 +#define startOfMemory() GIV(memory) +#define thirtyTwoBitLongsClassIndexPun() 18 +#define weakArrayClassIndexPun() 17 +#define weakArrayFormat() 4 +#define numSegments() GIV(numSegments) +#define alternateHeaderNumLiteralsMask() 0x7FFF +#define checkAllocFiller() GIV(checkAllocFiller) +#define dispatchFunctionPointer(aFunctionPointer) (aFunctionPointer)() +#define flush() fflush(stdout) +#define printFloat(f) printf("%g", f) +#define remoteIsInstVarAccess() 128 +#define stackPageFrameBytes() (256 * BytesPerWord) +#define allocatype(numElements, elementType) alloca((numElements)*sizeof(elementType)) +#define numElementsIn(anArray) (sizeof(anArray)/sizeof(anArray[0])) +#define oopisGreaterThanOrEqualTo(anOop,otherOop) ((usqInt)(anOop) >= (usqInt)(otherOop)) +#define oopisGreaterThanOrEqualToandLessThanOrEqualTo(anOop,baseOop,limitOop) ((usqInt)(anOop) >= (usqInt)(baseOop) && (usqInt)(anOop) <= (usqInt)(limitOop)) +#define oopisGreaterThanOrEqualToandLessThan(anOop,baseOop,limitOop) ((usqInt)(anOop) >= (usqInt)(baseOop) && (usqInt)(anOop) < (usqInt)(limitOop)) +#define oopisGreaterThan(anOop,otherOop) ((usqInt)(anOop) > (usqInt)(otherOop)) +#define oopisGreaterThanandLessThan(anOop,baseOop,limitOop) ((usqInt)(anOop) > (usqInt)(baseOop) && (usqInt)(anOop) < (usqInt)(limitOop)) +#define oopisLessThanOrEqualTo(anOop,otherOop) ((usqInt)(anOop) <= (usqInt)(otherOop)) +#define oopisLessThan(anOop,otherOop) ((usqInt)(anOop) < (usqInt)(otherOop)) + + + +/* This is the main interpreter loop. It normally loops forever, fetching and + executing bytecodes. When running in the context of a browser plugin VM, + however, it must return control to the browser periodically. This should + done only when the state of the currently running Squeak thread is safely + stored in the object heap. Since this is the case at the moment that a + check for interrupts is performed, that is when we return to the browser + if it is time to do so. Interrupt checks happen quite frequently. + */ +/* If stacklimit is zero then the stack pages have not been initialized. */ + + /* StackInterpreter>>#interpret */ +sqInt +interpret(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + register sqInt currentBytecode CB_REG; + sqInt extA; + sqInt extB; + sqInt lkupClassTag; + register char* localFP FP_REG; + register char* localIP IP_REG; + sqInt localReturnValue; + register char* localSP SP_REG; + sqInt numExtB; + sqInt stackPageBytes; + usqIntptr_t stackPagesBytes; + void *theStackMemory; + JUMP_TABLE; + +#if MULTIPLEBYTECODESETS + if(!asserta((sizeof(jumpTable)/sizeof(jumpTable[0])) >= 512)) + error("bytecode jumpTable too small"); +#endif + + if (GIV(stackLimit) == 0) { + /* begin initStackPagesAndInterpret */ + stackPageBytes = stackPageByteSize(); + /* begin computeStackZoneSize */ + stackPagesBytes = (GIV(numStackPages) * ((sizeof(CogStackPage)) + (stackPageByteSize()))) + BytesPerWord; + theStackMemory = alloca(stackPagesBytes); + memset(theStackMemory, 0, stackPagesBytes); + initializeStacknumSlotspageSize(theStackMemory, stackPagesBytes / BytesPerWord, stackPageBytes / BytesPerWord); + loadInitialContext(); + ioInitHeartbeat(); + interpret(); + return null; + } + browserPluginInitialiseIfNeeded(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin initExtensions */ + extA = (numExtB = (extB = 0)); + + while (1) { + bytecodeDispatchDebugHook(); + + VM_LABEL(bytecodeDispatch); + switch (currentBytecode) { + CASE(0) + CASE(256) /*0*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize)); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(1) + CASE(257) /*1*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode1); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 4 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(2) + CASE(258) /*2*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode2); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 8 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(3) + CASE(259) /*3*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode3); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 12 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(4) + CASE(260) /*4*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode4); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 16 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(5) + CASE(261) /*5*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode5); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 20 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(6) + CASE(262) /*6*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode6); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 24 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(7) + CASE(263) /*7*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode7); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 28 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(8) + CASE(264) /*8*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode8); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 32 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(9) + CASE(265) /*9*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode9); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 36 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(10) + CASE(266) /*10*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode10); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 40 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(11) + CASE(267) /*11*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode11); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 44 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(12) + CASE(268) /*12*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode12); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 48 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(13) + CASE(269) /*13*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode13); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 52 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(14) + CASE(270) /*14*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode14); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 56 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(15) + CASE(271) /*15*/ + /* pushReceiverVariableBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverVariableBytecode15); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + 60 /* (currentBytecode bitAnd: 15) << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(16) + CASE(320) /*64*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (0 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(17) + CASE(321) /*65*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode1); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (1 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 1 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 1 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(18) + CASE(322) /*66*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode2); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (2 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 2 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 2 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(19) + CASE(323) /*67*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode3); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (3 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 3 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 3 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(20) + CASE(324) /*68*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode4); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (4 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 4 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 4 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(21) + CASE(325) /*69*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode5); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (5 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 5 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 5 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(22) + CASE(326) /*70*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode6); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (6 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 6 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 6 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(23) + CASE(327) /*71*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode7); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (7 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 7 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 7 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(24) + CASE(328) /*72*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode8); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (8 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 8 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 8 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(25) + CASE(329) /*73*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode9); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (9 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 9 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 9 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(26) + CASE(330) /*74*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode10); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (10 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 10 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 10 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(27) + CASE(331) /*75*/ + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode11); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (11 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 11 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 11 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(28) + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode12); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (12 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 12 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 12 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(29) + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode13); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (13 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 13 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 13 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(30) + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode14); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (14 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 14 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 14 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(31) + /* pushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt object; + + VM_LABEL(pushTemporaryVariableBytecode15); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushTemporaryVariable: */ + object = (15 /* currentBytecode bitAnd: 15 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - 15 /* currentBytecode bitAnd: 15 */) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 15 /* currentBytecode bitAnd: 15 */) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(32) + CASE(288) /*32*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 4 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(33) + CASE(289) /*33*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode1); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 8 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(34) + CASE(290) /*34*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode2); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 12 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(35) + CASE(291) /*35*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode3); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 16 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(36) + CASE(292) /*36*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode4); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 20 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(37) + CASE(293) /*37*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode5); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 24 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(38) + CASE(294) /*38*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode6); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 28 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(39) + CASE(295) /*39*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode7); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 32 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(40) + CASE(296) /*40*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode8); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 36 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(41) + CASE(297) /*41*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode9); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 40 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(42) + CASE(298) /*42*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode10); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 44 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(43) + CASE(299) /*43*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode11); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 48 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(44) + CASE(300) /*44*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode12); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 52 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(45) + CASE(301) /*45*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode13); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 56 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(46) + CASE(302) /*46*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode14); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 60 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(47) + CASE(303) /*47*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode15); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 64 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(48) + CASE(304) /*48*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode16); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 68 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(49) + CASE(305) /*49*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode17); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 72 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(50) + CASE(306) /*50*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode18); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 76 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(51) + CASE(307) /*51*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode19); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 80 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(52) + CASE(308) /*52*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode20); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 84 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(53) + CASE(309) /*53*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode21); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 88 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(54) + CASE(310) /*54*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode22); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 92 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(55) + CASE(311) /*55*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode23); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 96 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(56) + CASE(312) /*56*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode24); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 100 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(57) + CASE(313) /*57*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode25); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 104 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(58) + CASE(314) /*58*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode26); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 108 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(59) + CASE(315) /*59*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode27); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 112 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(60) + CASE(316) /*60*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode28); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 116 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(61) + CASE(317) /*61*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode29); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 120 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(62) + CASE(318) /*62*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode30); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 0x7C /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(63) + CASE(319) /*63*/ + /* pushLiteralConstantBytecode */ + { + sqInt object; + + VM_LABEL(pushLiteralConstantBytecode31); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + 128 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(64) + CASE(272) /*16*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 4 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 0 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(65) + CASE(273) /*17*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode1); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 8 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 1 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(66) + CASE(274) /*18*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode2); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 12 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 2 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(67) + CASE(275) /*19*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode3); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 16 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 3 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(68) + CASE(276) /*20*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode4); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 20 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 4 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(69) + CASE(277) /*21*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode5); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 24 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 5 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(70) + CASE(278) /*22*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode6); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 28 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 6 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(71) + CASE(279) /*23*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode7); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 32 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 7 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(72) + CASE(280) /*24*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode8); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 36 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 8 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(73) + CASE(281) /*25*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode9); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 40 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 9 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(74) + CASE(282) /*26*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode10); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 44 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 10 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(75) + CASE(283) /*27*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode11); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 48 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 11 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(76) + CASE(284) /*28*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode12); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 52 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 12 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(77) + CASE(285) /*29*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode13); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 56 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 13 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(78) + CASE(286) /*30*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode14); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 60 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 14 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(79) + CASE(287) /*31*/ + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode15); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 64 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 15 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(80) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode16); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 68 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 16 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(81) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode17); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 72 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 17 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(82) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode18); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 76 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 18 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(83) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode19); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 80 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 19 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(84) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode20); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 84 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 20 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(85) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode21); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 88 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 21 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(86) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode22); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 92 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 22 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(87) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode23); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 96 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 23 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(88) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode24); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 100 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 24 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(89) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode25); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 104 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 25 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(90) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode26); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 108 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 26 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(91) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode27); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 112 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 27 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(92) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode28); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 116 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 28 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(93) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode29); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 120 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 29 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(94) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode30); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 0x7C /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 30 /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(95) + /* pushLiteralVariableBytecode */ + { + sqInt litVar; + sqInt object; + + VM_LABEL(pushLiteralVariableBytecode31); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + 128 /* ((currentBytecode bitAnd: 31) + LiteralStart) << self shiftForWord */); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, 0x1F /* currentBytecode bitAnd: 31 */); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + 4 /* ValueIndex << self shiftForWord */); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(96) + CASE(97) + CASE(98) + CASE(99) + CASE(100) + CASE(101) + CASE(102) + CASE(103) + /* storeAndPopReceiverVariableBytecode */ + { + sqInt instVarIndex; + sqInt rcvr; + sqInt top; + + VM_LABEL(storeAndPopReceiverVariableBytecode); + /* begin receiver */ + rcvr = longAt(localFP + FoxReceiver); + /* begin internalStackTop */ + top = longAtPointer(localSP); + instVarIndex = currentBytecode & 7; + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(rcvr)))); + if (((((usqInt) (longAt(rcvr))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), rcvr); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), top); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l12; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rcvr))); + if ((assert(isNonImmediate(rcvr)), + oopisGreaterThanOrEqualTo(rcvr, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((top & (tagMask())) == 0) + && (oopisLessThan(top, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(rcvr))) >> (rememberedBitShift())) & 1) != 0)) { + remember(rcvr); + } + } + } + longAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(instVarIndex) << (shiftForWord())))), top); + l12: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(104) + CASE(464) /*208*/ + /* storeAndPopTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + + VM_LABEL(storeAndPopTemporaryVariableBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (0 /* currentBytecode bitAnd: 7 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs) * BytesPerWord), longAtPointer(localSP)); + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(105) + CASE(465) /*209*/ + /* storeAndPopTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + + VM_LABEL(storeAndPopTemporaryVariableBytecode1); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (1 /* currentBytecode bitAnd: 7 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - 1 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 1 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(106) + CASE(466) /*210*/ + /* storeAndPopTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + + VM_LABEL(storeAndPopTemporaryVariableBytecode2); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (2 /* currentBytecode bitAnd: 7 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - 2 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 2 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(107) + CASE(467) /*211*/ + /* storeAndPopTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + + VM_LABEL(storeAndPopTemporaryVariableBytecode3); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (3 /* currentBytecode bitAnd: 7 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - 3 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 3 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(108) + CASE(468) /*212*/ + /* storeAndPopTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + + VM_LABEL(storeAndPopTemporaryVariableBytecode4); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (4 /* currentBytecode bitAnd: 7 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - 4 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 4 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(109) + CASE(469) /*213*/ + /* storeAndPopTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + + VM_LABEL(storeAndPopTemporaryVariableBytecode5); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (5 /* currentBytecode bitAnd: 7 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - 5 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 5 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(110) + CASE(470) /*214*/ + /* storeAndPopTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + + VM_LABEL(storeAndPopTemporaryVariableBytecode6); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (6 /* currentBytecode bitAnd: 7 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - 6 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 6 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(111) + CASE(471) /*215*/ + /* storeAndPopTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + + VM_LABEL(storeAndPopTemporaryVariableBytecode7); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (7 /* currentBytecode bitAnd: 7 */ < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - 7 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - 7 /* currentBytecode bitAnd: 7 */) * BytesPerWord), longAtPointer(localSP)); + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(112) + CASE(332) /*76*/ + /* pushReceiverBytecode */ + { + sqInt object; + + VM_LABEL(pushReceiverBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + object = longAt(localFP + FoxReceiver); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(113) + CASE(333) /*77*/ + /* pushConstantTrueBytecode */ + { + sqInt object; + + VM_LABEL(pushConstantTrueBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + object = GIV(trueObj); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(114) + CASE(334) /*78*/ + /* pushConstantFalseBytecode */ + { + sqInt object; + + VM_LABEL(pushConstantFalseBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + object = GIV(falseObj); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(115) + CASE(335) /*79*/ + /* pushConstantNilBytecode */ + { + sqInt object; + + VM_LABEL(pushConstantNilBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + object = GIV(nilObj); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(116) + /* pushConstantMinusOneBytecode */ + { + VM_LABEL(pushConstantMinusOneBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ConstMinusOne); + } + BREAK; + CASE(117) + CASE(336) /*80*/ + /* pushConstantZeroBytecode */ + { + VM_LABEL(pushConstantZeroBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ConstZero); + } + BREAK; + CASE(118) + CASE(337) /*81*/ + /* pushConstantOneBytecode */ + { + VM_LABEL(pushConstantOneBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ConstOne); + } + BREAK; + CASE(119) + /* pushConstantTwoBytecode */ + { + VM_LABEL(pushConstantTwoBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ConstTwo); + } + BREAK; + CASE(120) + /* returnReceiver */ + { + VM_LABEL(returnReceiver); + /* begin receiver */ + localReturnValue = longAt(localFP + FoxReceiver); + /* goto commonReturn */ + } + + commonReturn: + /* commonReturn */ + { + char *callerFP; + sqInt closure; + sqInt contextToReturnTo; + sqInt ctxtOrNilOrZero; + sqInt currentCtx; + char *frameToReturnTo; + sqInt home; + sqInt index; + sqInt index1; + StackPage *newPage; + sqInt nextCntx; + sqInt objOop; + sqInt objOop1; + sqInt onSamePage; + sqInt ourContext; + sqInt ourContext1; + sqInt ourContext2; + sqInt senderContext; + sqInt senderOop; + sqInt senderOop1; + sqInt senderOop2; + char *theFP; + char *theFP1; + char *theFP2; + char *theFPAbove; + sqInt theMethod; + sqInt theMethod1; + StackPage *thePage; + StackPage *thePage1; + char *theSP; + sqInt unwindContextOrNilOrZero; + sqInt valuePointer; + sqInt valuePointer1; + + VM_LABEL(commonReturn); + + /* If this is a method simply return to the sender/caller. */ + frameToReturnTo = 0; + if (!((byteAt((localFP + FoxFrameFlags) + 3)) != 0)) { + goto commonCallerReturn; + goto l913; + } + closure = longAt(localFP + (frameStackedReceiverOffset(localFP))); + + /* Walk the closure's lexical chain to find the context or frame to return from (home). */ + home = null; + while (closure != GIV(nilObj)) { + /* begin followField:ofObject: */ + objOop = longAt((closure + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord()))))); + if (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop = fixFollowedFieldofObjectwithInitialValue(ClosureOuterContextIndex, closure, objOop); + } + home = objOop; + /* begin followField:ofObject: */ + objOop1 = longAt((home + BaseHeaderSize) + (((int)((usqInt)(ClosureIndex) << (shiftForWord()))))); + if (((objOop1 & (tagMask())) == 0) + && (((longAt(objOop1)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop1 = fixFollowedFieldofObjectwithInitialValue(ClosureIndex, home, objOop1); + } + closure = objOop1; + } + /* begin writeBackHeadFramePointers */ + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + /* begin setHeadFP:andSP:inPage: */ + assert(localSP < localFP); + assert((localSP < ((GIV(stackPage)->baseAddress))) + && (localSP > (((GIV(stackPage)->realStackLimit)) - (LargeContextSlots * BytesPerOop)))); + assert((localFP < ((GIV(stackPage)->baseAddress))) + && (localFP > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); + (GIV(stackPage)->headFP = localFP); + (GIV(stackPage)->headSP = localSP); + assert(pageListIsWellFormed()); + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin findUnwindThroughContext: */ + + /* Since nothing changes we don't need to internalize. */ + onSamePage = ((((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(home)))) + && ((pageIndexForstackMemorybytesPerPage(GIV(framePointer), GIV(stackMemory), GIV(bytesPerPage))) == (pageIndexFor(frameOfMarriedContext(home)))); + theFP2 = GIV(framePointer); + theFPAbove = GIV(framePointer); + do { + if (((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) + && (home == (longAt(theFP2 + FoxThisContext)))) { + ctxtOrNilOrZero = 0; + goto l920; + } + if (!((byteAt((theFP2 + FoxFrameFlags) + 3)) != 0)) { + theMethod1 = longAt(theFP2 + FoxMethod); + if ((primitiveIndexOfMethodheader(theMethod1, methodHeaderOf(theMethod1))) == 198) { + if (theFP2 == theFPAbove) { + theSP = findSPOfon(theFP2, stackPageFor(theFP2)); + } + else { + assert(!(isBaseFrame(theFPAbove))); + theSP = (theFPAbove + (frameStackedReceiverOffset(theFPAbove))) + BytesPerWord; + + } + /* begin ensureFrameIsMarried:SP: */ + if ((byteAt((theFP2 + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(theFP2))); + ctxtOrNilOrZero = longAt(theFP2 + FoxThisContext); + goto l920; + } + ctxtOrNilOrZero = marryFrameSP(theFP2, theSP); + goto l920; + } + } + theFPAbove = theFP2; + theFP2 = pointerForOop(longAt(theFP2 + FoxSavedFP)); + } while(theFP2 != 0); + senderContext = longAt(theFPAbove + FoxCallerContext); + if (!(((senderContext & (tagMask())) == 0) + && (((longAt(senderContext)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { + /* begin nilObject */ + ctxtOrNilOrZero = GIV(nilObj); + goto l920; + } + ctxtOrNilOrZero = findMethodWithPrimitiveFromContextUpToContext(198, senderContext, home); + l920: /* end findMethodWithPrimitive:FromFP:UpToContext: */; + assert(!((onSamePage + && (ctxtOrNilOrZero == (nilObject()))))); + if (ctxtOrNilOrZero == 0) { + /* begin fetchPointer:ofObject: */ + theMethod = longAt((home + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))); + if ((primitiveIndexOfMethodheader(theMethod, methodHeaderOf(theMethod))) == 198) { + unwindContextOrNilOrZero = home; + goto l940; + } + unwindContextOrNilOrZero = 0; + goto l940; + } + if (!(onSamePage + || (ctxtOrNilOrZero == GIV(nilObj)))) { + if ((findMethodWithPrimitiveFromContextUpToContext(0, ctxtOrNilOrZero, home)) == GIV(nilObj)) { + /* begin nilObject */ + unwindContextOrNilOrZero = GIV(nilObj); + goto l940; + } + } + unwindContextOrNilOrZero = ctxtOrNilOrZero; + l940: /* end findUnwindThroughContext: */; + if (unwindContextOrNilOrZero == GIV(nilObj)) { + + /* error: can't find home on chain; cannot return */ + /* begin internalCannotReturn: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + ourContext = longAt(localFP + FoxThisContext); + goto l941; + } + ourContext = marryFrameSP(localFP, localSP); + l941: /* end ensureFrameIsMarried:SP: */; + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ourContext); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), localReturnValue); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + /* return self */ + goto l913; + } + if (unwindContextOrNilOrZero != 0) { + /* begin internalAboutToReturn:through: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + ourContext1 = longAt(localFP + FoxThisContext); + goto l923; + } + ourContext1 = marryFrameSP(localFP, localSP); + l923: /* end ensureFrameIsMarried:SP: */; + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ourContext1); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), localReturnValue); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), unwindContextOrNilOrZero); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAboutToReturn) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + /* return self */ + goto l913; + } + contextToReturnTo = null; + if (((longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { + assert(checkIsStillMarriedContextcurrentFP(home, localFP)); + /* begin frameOfMarriedContext: */ + senderOop = longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + + if ((longAt(theFP + FoxSavedFP)) == 0) { + contextToReturnTo = longAt(theFP + FoxCallerContext); + } + else { + frameToReturnTo = pointerForOop(longAt(theFP + FoxSavedFP)); + } + } + else { + /* begin fetchPointer:ofObject: */ + contextToReturnTo = longAt((home + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + if ((((contextToReturnTo & (tagMask())) == 0) + && (((longAt(contextToReturnTo)) & (classIndexMask())) == ClassMethodContextCompactIndex)) + && (((longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1))) { + assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, localFP)); + /* begin frameOfMarriedContext: */ + senderOop1 = longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop1 & 1)); + frameToReturnTo = pointerForOop(senderOop1 - 1); + + contextToReturnTo = null; + } + } + if (contextToReturnTo != null) { + /* begin establishFrameForContextToReturnTo: */ + if (!(((contextToReturnTo & (tagMask())) == 0) + && (((longAt(contextToReturnTo)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { + frameToReturnTo = 0; + goto l927; + } + if (((longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { + if (isWidowedContext(contextToReturnTo)) { + + /* error: home's sender is dead; cannot return */ + frameToReturnTo = 0; + goto l927; + } + /* begin frameOfMarriedContext: */ + senderOop2 = longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop2 & 1)); + frameToReturnTo = pointerForOop(senderOop2 - 1); + + goto l927; + } + if (!(((longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))))) & 1))) { + frameToReturnTo = 0; + goto l927; + } + thePage1 = makeBaseFrameFor(contextToReturnTo); + markStackPageMostRecentlyUsed(thePage1); + frameToReturnTo = (thePage1->baseFP); + l927: /* end establishFrameForContextToReturnTo: */; + if (frameToReturnTo == 0) { + + /* error: home's sender is dead; cannot return */ + /* begin internalCannotReturn: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + ourContext2 = longAt(localFP + FoxThisContext); + goto l942; + } + ourContext2 = marryFrameSP(localFP, localSP); + l942: /* end ensureFrameIsMarried:SP: */; + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ourContext2); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), localReturnValue); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + /* return self */ + goto l913; + } + } + assert(pageListIsWellFormed()); + /* begin stackPageFor: */ + index1 = pageIndexForstackMemorybytesPerPage(frameToReturnTo, GIV(stackMemory), GIV(bytesPerPage)); + newPage = stackPageAtpages(index1, GIV(pages)); + if (newPage != GIV(stackPage)) { + currentCtx = longAt(((GIV(stackPage)->baseFP)) + FoxCallerContext); + freeStackPage(GIV(stackPage)); + while (1) { + assert(isContext(currentCtx)); + if ((((longAt((currentCtx + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && ((stackPageFor((theFP = frameOfMarriedContext(currentCtx)))) == newPage)) break; + if (((longAt((currentCtx + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) { + /* begin stackPageFor: */ + index = pageIndexForstackMemorybytesPerPage(theFP, GIV(stackMemory), GIV(bytesPerPage)); + thePage = stackPageAtpages(index, GIV(pages)); + if (theFP != ((thePage->headFP))) { + + /* Since we've just deallocated a page we know that newStackPage won't deallocate an existing one. */ + moveFramesInthroughtoPage(thePage, findFrameAboveinPage(theFP, thePage), newStackPage()); + } + /* begin frameCallerContext: */ + theFP1 = (thePage->baseFP); + currentCtx = longAt(theFP1 + FoxCallerContext); + freeStackPage(thePage); + } + else { + /* begin fetchPointer:ofObject: */ + nextCntx = longAt((currentCtx + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + /* begin markContextAsDead: */ + assert(isContext(currentCtx)); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer = GIV(nilObj); + assert(!(isOopForwarded(currentCtx))); + longAtput((currentCtx + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))), valuePointer); + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer1 = GIV(nilObj); + assert(!(isOopForwarded(currentCtx))); + longAtput((currentCtx + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))), valuePointer1); + currentCtx = nextCntx; + } + } + /* begin setStackPageAndLimit: */ + assert(newPage != 0); + GIV(stackPage) = newPage; + if (GIV(stackLimit) != (((char *) (((usqInt) -1))))) { + GIV(stackLimit) = (GIV(stackPage)->stackLimit); + } + markStackPageMostRecentlyUsed(newPage); + localSP = (GIV(stackPage)->headSP); + localFP = (GIV(stackPage)->headFP); + } + if (localFP == frameToReturnTo) { + + /* pop the saved IP, push the return value and continue. */ + localIP = pointerForOop(longAtPointer(localSP)); + } + else { + do { + callerFP = localFP; + localFP = pointerForOop(longAt(localFP + FoxSavedFP)); + } while(localFP != frameToReturnTo); + localIP = pointerForOop(longAt(callerFP + FoxCallerSavedIP)); + localSP = ((assert(!(isBaseFrame(callerFP))), +(callerFP + (frameStackedReceiverOffset(callerFP))) + BytesPerWord)) - BytesPerWord; + } + /* begin setMethod: */ + GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + GIV(bytecodeSetSelector) = (methodUsesAlternateBytecodeSet(GIV(method)) + ? 256 + : 0); + + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + longAtPointerput(localSP, localReturnValue); + } + l913: /* end case */; + BREAK; + CASE(121) + CASE(345) /*89*/ + /* returnTrue */ + { + VM_LABEL(returnTrue); + /* begin trueObject */ + localReturnValue = GIV(trueObj); + goto commonReturn; + } + BREAK; + CASE(122) + CASE(346) /*90*/ + /* returnFalse */ + { + VM_LABEL(returnFalse); + /* begin falseObject */ + localReturnValue = GIV(falseObj); + goto commonReturn; + } + BREAK; + CASE(123) + CASE(347) /*91*/ + /* returnNil */ + { + VM_LABEL(returnNil); + /* begin nilObject */ + localReturnValue = GIV(nilObj); + goto commonReturn; + } + BREAK; + CASE(124) + CASE(348) /*92*/ + /* returnTopFromMethod */ + { + VM_LABEL(returnTopFromMethod); + /* begin internalStackTop */ + localReturnValue = longAtPointer(localSP); + goto commonReturn; + } + BREAK; + CASE(125) + /* returnTopFromBlock */ + { + VM_LABEL(returnTopFromBlock); + /* begin internalStackTop */ + localReturnValue = longAtPointer(localSP); + /* goto commonCallerReturn */ + } + + commonCallerReturn: + /* commonCallerReturn */ + { + char *callerFP; + char *callersFPOrNull; + sqInt contextToReturnTo; + char *fp; + char *frameAbove; + sqInt index; + sqInt isAContext; + sqInt ourContext; + sqInt senderOop; + char *theFP; + StackPage *thePage; + char *theSP; + + VM_LABEL(commonCallerReturn); + + /* TODO: Store/restore the nativeSP more properly, when it exists */ + callersFPOrNull = pointerForOop(longAt(localFP + FoxSavedFP)); + if (callersFPOrNull == 0) { + + /* baseFrame */ + assert(localFP == ((GIV(stackPage)->baseFP))); + /* begin baseFrameReturn */ + contextToReturnTo = longAt(localFP + FoxCallerContext); + /* begin isContext: */ + isAContext = ((contextToReturnTo & (tagMask())) == 0) + && (((longAt(contextToReturnTo)) & (classIndexMask())) == ClassMethodContextCompactIndex); + if (isAContext + && ((((longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(contextToReturnTo))))) { + /* begin frameOfMarriedContext: */ + senderOop = longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + + /* begin stackPageFor: */ + index = pageIndexForstackMemorybytesPerPage(theFP, GIV(stackMemory), GIV(bytesPerPage)); + thePage = stackPageAtpages(index, GIV(pages)); + if (theFP == ((thePage->headFP))) { + theSP = (thePage->headSP); + freeStackPageNoAssert(GIV(stackPage)); + } + else { + + /* Returning to some interior frame, presumably because of a sender assignment. + Move the frames above to another page (they may be in use, e.g. via coroutining). + Make the interior frame the top frame. */ + /* begin findFrameAbove:inPage: */ + fp = (thePage->headFP); + if (fp == theFP) { + frameAbove = 0; + goto l954; + } + while (((callerFP = pointerForOop(longAt(fp + FoxSavedFP)))) != 0) { + if (callerFP == theFP) { + frameAbove = fp; + goto l954; + } + fp = callerFP; + } + error("did not find theFP in stack page"); + frameAbove = 0; + l954: /* end findFrameAbove:inPage: */; + moveFramesInthroughtoPage(thePage, frameAbove, GIV(stackPage)); + theFP = (thePage->headFP); + theSP = (thePage->headSP); + } + } + else { + if (!(isAContext + && (((longAt((contextToReturnTo + BaseHeaderSize) + (((int)((usqInt)(InstructionPointerIndex) << (shiftForWord())))))) & 1)))) { + /* begin internalCannotReturn: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + ourContext = longAt(localFP + FoxThisContext); + goto l945; + } + ourContext = marryFrameSP(localFP, localSP); + l945: /* end ensureFrameIsMarried:SP: */; + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ourContext); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), localReturnValue); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorCannotReturn) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + /* return self */ + goto l951; + } + thePage = makeBaseFrameFor(contextToReturnTo); + theFP = (thePage->headFP); + theSP = (thePage->headSP); + freeStackPageNoAssert(GIV(stackPage)); + } + /* begin setStackPageAndLimit: */ + assert(thePage != 0); + GIV(stackPage) = thePage; + if (GIV(stackLimit) != (((char *) (((usqInt) -1))))) { + GIV(stackLimit) = (GIV(stackPage)->stackLimit); + } + markStackPageMostRecentlyUsed(thePage); + assert((stackPageFor(theFP)) == GIV(stackPage)); + localSP = theSP; + localFP = theFP; + /* begin setMethod: */ + GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + GIV(bytecodeSetSelector) = (methodUsesAlternateBytecodeSet(GIV(method)) + ? 256 + : 0); + + localIP = pointerForOop(longAtPointer(localSP)); + longAtPointerput(localSP, localReturnValue); + assert(checkIsStillMarriedContextcurrentFP(contextToReturnTo, localFP)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* return self */ + l951: /* end baseFrameReturn */; + goto l944; + } + localIP = pointerForOop(longAt(localFP + FoxCallerSavedIP)); + localSP = localFP + ((FoxCallerSavedIP + BytesPerWord) + (((sqInt)((usqInt)((byteAt((localFP + FoxFrameFlags) + 1))) << (shiftForWord()))))); + localFP = callersFPOrNull; + /* begin setMethod: */ + GIV(method) = longAt(localFP + FoxMethod); + assert(isOopCompiledMethod(GIV(method))); + GIV(bytecodeSetSelector) = (methodUsesAlternateBytecodeSet(GIV(method)) + ? 256 + : 0); + + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + longAtPointerput(localSP, localReturnValue); + } + l944: /* end case */; + BREAK; + CASE(126) + CASE(127) + /* unknownBytecode */ + { + VM_LABEL(unknownBytecode); + /* goto respondToUnknownBytecode */ + } + + respondToUnknownBytecode: + /* respondToUnknownBytecode */ + { + sqInt ourContext; + + VM_LABEL(respondToUnknownBytecode); + GIV(messageSelector) = (SelectorUnknownBytecode < (numSlotsOf(GIV(specialObjectsOop))) + ? (/* begin fetchPointer:ofObject: */ + longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorUnknownBytecode) << (shiftForWord())))))) + : 0); + if ((GIV(messageSelector) == null) + || (GIV(messageSelector) == GIV(nilObj))) { + error("Unknown bytecode"); + } + /* begin ensureFrameIsMarried:SP: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + ourContext = longAt(localFP + FoxThisContext); + goto l956; + } + ourContext = marryFrameSP(localFP, localSP); + l956: /* end ensureFrameIsMarried:SP: */; + localIP -= 1; + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ourContext); + GIV(argumentCount) = 0; + goto normalSend; + } + BREAK; + CASE(128) + /* extendedPushBytecode */ + { + sqInt descriptor; + sqInt frameNumArgs; + sqInt litVar; + sqInt object; + sqInt object1; + sqInt object2; + sqInt object3; + sqInt variableIndex; + sqInt variableType; + + VM_LABEL(extendedPushBytecode); + descriptor = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + variableType = (((usqInt) descriptor) >> 6) & 3; + variableIndex = descriptor & 0x3F; + if (variableType == 0) { + /* begin pushReceiverVariable: */ + object = longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + (((sqInt)((usqInt)(variableIndex) << (shiftForWord()))))); + longAtPointerput((localSP -= BytesPerOop), object); + goto l33; + } + if (variableType == 1) { + /* begin pushTemporaryVariable: */ + object1 = (variableIndex < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - variableIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - variableIndex) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object1); + goto l33; + } + if (variableType == 2) { + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object2 = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((variableIndex + LiteralStart)) << (shiftForWord()))))); + + longAtPointerput((localSP -= BytesPerOop), object2); + goto l33; + } + if (variableType == 3) { + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((variableIndex + LiteralStart)) << (shiftForWord()))))); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, variableIndex); + } + /* begin internalPush: */ + object3 = longAt((litVar + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); + longAtPointerput((localSP -= BytesPerOop), object3); + + goto l33; + } + } + l33: /* end case */; + BREAK; + CASE(129) + /* extendedStoreBytecode */ + { + sqInt descriptor; + sqInt frameNumArgs; + sqInt litVar; + sqInt objOop; + sqInt referent; + sqInt value; + sqInt variableIndex; + sqInt variableType; + + VM_LABEL(extendedStoreBytecode); + /* begin extendedStoreBytecodePop: */ + descriptor = byteAtPointer(++localIP); + variableType = (((usqInt) descriptor) >> 6) & 3; + variableIndex = descriptor & 0x3F; + value = longAtPointer(localSP); + if (variableType == 0) { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + objOop = longAt(localFP + FoxReceiver); + +# if IMMUTABILITY + assert(!((isImmediate(objOop)))); + if (((((usqInt) (longAt(objOop))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), objOop); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), value); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l49; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(objOop))); + if ((assert(isNonImmediate(objOop)), + oopisGreaterThanOrEqualTo(objOop, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(objOop))) >> (rememberedBitShift())) & 1) != 0)) { + remember(objOop); + } + } + } + longAtput((objOop + BaseHeaderSize) + (((sqInt)((usqInt)(variableIndex) << (shiftForWord())))), value); + l49: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l43; + } + if (variableType == 1) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + if (variableIndex < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - variableIndex) * BytesPerWord), value); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - variableIndex) * BytesPerWord), value); + } + goto l43; + } + if (variableType == 3) { + /* begin storeLiteralVariable:withValue: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((variableIndex + LiteralStart)) << (shiftForWord()))))); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + /* begin followForwarded: */ + assert(isUnambiguouslyForwarder(litVar)); + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((litVar + BaseHeaderSize) + (0U << (shiftForWord()))); + while (((referent & (tagMask())) == 0) + && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((referent + BaseHeaderSize) + (0U << (shiftForWord()))); + } + litVar = referent; + } + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(litVar)))); + if (((((usqInt) (longAt(litVar))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), litVar); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), value); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l47; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(litVar))); + if ((assert(isNonImmediate(litVar)), + oopisGreaterThanOrEqualTo(litVar, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(litVar))) >> (rememberedBitShift())) & 1) != 0)) { + remember(litVar); + } + } + } + longAtput((litVar + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))), value); + l47: /* end storeLiteralVariable:withValue: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l43; + } + error("illegal store"); + l43: /* end extendedStoreBytecodePop: */; + } + BREAK; + CASE(130) + /* extendedStoreAndPopBytecode */ + { + sqInt descriptor; + sqInt frameNumArgs; + sqInt litVar; + sqInt objOop; + sqInt referent; + sqInt value; + sqInt variableIndex; + sqInt variableType; + + VM_LABEL(extendedStoreAndPopBytecode); + /* begin extendedStoreBytecodePop: */ + descriptor = byteAtPointer(++localIP); + variableType = (((usqInt) descriptor) >> 6) & 3; + variableIndex = descriptor & 0x3F; + value = longAtPointer(localSP); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + + if (variableType == 0) { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + objOop = longAt(localFP + FoxReceiver); + +# if IMMUTABILITY + assert(!((isImmediate(objOop)))); + if (((((usqInt) (longAt(objOop))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), objOop); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), value); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l61; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(objOop))); + if ((assert(isNonImmediate(objOop)), + oopisGreaterThanOrEqualTo(objOop, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(objOop))) >> (rememberedBitShift())) & 1) != 0)) { + remember(objOop); + } + } + } + longAtput((objOop + BaseHeaderSize) + (((sqInt)((usqInt)(variableIndex) << (shiftForWord())))), value); + l61: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l55; + } + if (variableType == 1) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + if (variableIndex < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - variableIndex) * BytesPerWord), value); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - variableIndex) * BytesPerWord), value); + } + goto l55; + } + if (variableType == 3) { + /* begin storeLiteralVariable:withValue: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((variableIndex + LiteralStart)) << (shiftForWord()))))); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + /* begin followForwarded: */ + assert(isUnambiguouslyForwarder(litVar)); + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((litVar + BaseHeaderSize) + (0U << (shiftForWord()))); + while (((referent & (tagMask())) == 0) + && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((referent + BaseHeaderSize) + (0U << (shiftForWord()))); + } + litVar = referent; + } + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(litVar)))); + if (((((usqInt) (longAt(litVar))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), litVar); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), value); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l59; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(litVar))); + if ((assert(isNonImmediate(litVar)), + oopisGreaterThanOrEqualTo(litVar, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(litVar))) >> (rememberedBitShift())) & 1) != 0)) { + remember(litVar); + } + } + } + longAtput((litVar + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))), value); + l59: /* end storeLiteralVariable:withValue: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l55; + } + error("illegal store"); + l55: /* end extendedStoreBytecodePop: */; + } + BREAK; + CASE(131) + /* singleExtendedSendBytecode */ + { + sqInt descriptor; + + VM_LABEL(singleExtendedSendBytecode); + /* begin fetchByte */ + descriptor = byteAtPointer(++localIP); + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(((descriptor & 0x1F) + LiteralStart)) << (shiftForWord()))))); + + GIV(argumentCount) = ((usqInt) descriptor) >> 5; + /* goto normalSend */ + } + + normalSend: + /* normalSend */ + { + sqInt rcvr; + sqInt tagBits; + + VM_LABEL(normalSend); + /* begin internalStackValue: */ + rcvr = longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop)); + lkupClassTag = (((tagBits = rcvr & (tagMask()))) != 0 + ? ((tagBits & 1) != 0 + ? 1 + : tagBits) + : (longAt(rcvr)) & (classIndexMask())); + assert(lkupClassTag != (nilObject())); + + commonSendOrdinary: + /* commonSendOrdinary */ + { + sqInt aValue; + sqInt classTablePage; + sqInt errorCode; + sqInt fieldIndex; + sqInt fieldIndex1; + sqInt hash1; + sqInt i; + sqInt localPrimIndex; + sqInt methodHeader; + sqInt numTemps; + sqInt object; + sqInt probe1; + sqInt rcvr; + sqInt succeeded; + sqInt table; + + VM_LABEL(commonSendOrdinary); + /* begin sendBreakpoint:receiver: */ + sendBreakpointreceiver(firstFixedFieldOfMaybeImmediate(GIV(messageSelector)), lengthOfMaybeImmediate(GIV(messageSelector)), longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop))); + /* begin internalFindNewMethodOrdinary */ + hash1 = GIV(messageSelector) ^ (((sqInt)((usqInt)(lkupClassTag) << 2))); + + /* first probe */ + probe1 = hash1 & MethodCacheMask; + if (((GIV(methodCache)[probe1 + MethodCacheSelector]) == GIV(messageSelector)) + && ((GIV(methodCache)[probe1 + MethodCacheClass]) == lkupClassTag)) { + GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; + primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); + goto l971; + } + + /* second probe */ + probe1 = (((usqInt) hash1) >> 1) & MethodCacheMask; + if (((GIV(methodCache)[probe1 + MethodCacheSelector]) == GIV(messageSelector)) + && ((GIV(methodCache)[probe1 + MethodCacheClass]) == lkupClassTag)) { + GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; + primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); + goto l971; + } + probe1 = (((usqInt) hash1) >> 2) & MethodCacheMask; + if (((GIV(methodCache)[probe1 + MethodCacheSelector]) == GIV(messageSelector)) + && ((GIV(methodCache)[probe1 + MethodCacheClass]) == lkupClassTag)) { + GIV(newMethod) = GIV(methodCache)[probe1 + MethodCacheMethod]; + primitiveFunctionPointer = ((void (*)()) (GIV(methodCache)[probe1 + MethodCachePrimFunction])); + goto l971; + } + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + if ((((GIV(messageSelector) & (tagMask())) == 0) + && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) + || (lkupClassTag == (isForwardedObjectClassIndexPun()))) { + if (((GIV(messageSelector) & (tagMask())) == 0) + && (((longAt(GIV(messageSelector))) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + GIV(messageSelector) = handleForwardedSelectorFaultFor(GIV(messageSelector)); + } + if (lkupClassTag == (isForwardedObjectClassIndexPun())) { + lkupClassTag = handleForwardedSendFaultForTag(lkupClassTag); + } + if (lookupInMethodCacheSelclassTag(GIV(messageSelector), lkupClassTag)) { + goto l962; + } + } + /* begin classForClassTag: */ + assert((lkupClassTag >= 0) + && ((lkupClassTag <= (tagMask())) + || ((lkupClassTag >= (arrayClassIndexPun())) + && (lkupClassTag <= (classIndexMask()))))); + /* begin fetchPointer:ofObject: */ + fieldIndex = ((usqInt) lkupClassTag) >> (classTableMajorIndexShift()); + classTablePage = longAt((GIV(hiddenRootsObj) + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); + if (classTablePage == GIV(nilObj)) { + GIV(lkupClass) = null; + goto l967; + } + /* begin fetchPointer:ofObject: */ + fieldIndex1 = lkupClassTag & ((1U << (classTableMajorIndexShift())) - 1); + GIV(lkupClass) = longAt((classTablePage + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << (shiftForWord()))))); + l967: /* end classForClassTag: */; + lookupMethodInClass(GIV(lkupClass)); + + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + addNewMethodToCache(GIV(lkupClass)); + l971: ; + l962: /* end internalFindNewMethodOrdinary */; + /* begin internalExecuteNewMethod */ + if (primitiveFunctionPointer != 0) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + /* begin internalQuickPrimitiveResponse */ + assert(isPrimitiveFunctionPointerAnIndex()); + localPrimIndex = ((sqInt) primitiveFunctionPointer); + assert((localPrimIndex > 0xFF) + && (localPrimIndex < 520)); + if (localPrimIndex >= 264) { + /* begin internalStackTopPut: */ + aValue = longAt(((longAtPointer(localSP)) + BaseHeaderSize) + (((sqInt)((usqInt)((localPrimIndex - 264)) << (shiftForWord()))))); + longAtPointerput(localSP, aValue); + goto l970; + } + if (localPrimIndex == 256) { + goto l970; + } + if (localPrimIndex == 257) { + /* begin internalStackTopPut: */ + longAtPointerput(localSP, GIV(trueObj)); + goto l970; + } + if (localPrimIndex == 258) { + /* begin internalStackTopPut: */ + longAtPointerput(localSP, GIV(falseObj)); + goto l970; + } + if (localPrimIndex == 259) { + /* begin internalStackTopPut: */ + longAtPointerput(localSP, GIV(nilObj)); + goto l970; + } + longAtPointerput(localSP, (((usqInt)(localPrimIndex - 261) << 1) | 1)); + goto l970; + } + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin slowPrimitiveResponse */ + assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); + assert((remapBufferCount()) == 0); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + dispatchFunctionPointer(primitiveFunctionPointer); + assert(maybeLeakCheckExternalPrimCall(GIV(newMethod))); + /* begin maybeRetryPrimitiveOnFailure */ + if (GIV(primFailCode)) { + retryPrimitiveOnFailure(); + } + /* begin maybeFailForLastObjectOverwrite */ + if (checkAllocFiller) { + if (((freeStart()) < GIV(scavengeThreshold)) + && ((longAt(freeStart())) != (freeStart()))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrWritePastObject; + } + } + if (GIV(nextProfileTick) > 0) { + checkProfileTick(GIV(newMethod)); + } + /* begin successful */ + succeeded = !GIV(primFailCode); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (succeeded) { + browserPluginReturnIfNeeded(); + goto l970; + } + } + /* begin internalActivateNewMethod */ + assert(isCompiledMethod(GIV(newMethod))); + /* begin fetchPointer:ofObject: */ + methodHeader = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); + numTemps = (((usqInt) methodHeader) >> MethodHeaderTempCountShift) & 0x3F; + assert(GIV(argumentCount) == (argumentCountOfMethodHeader(methodHeader))); + + /* could new rcvr be set at point of send? */ + rcvr = longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop)); + assert(!(isOopForwarded(rcvr))); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), localIP); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), localFP); + localFP = localSP; + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), GIV(newMethod)); + /* begin setMethod:methodHeader: */ + GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + assert((methodHeaderOf(GIV(method))) == methodHeader); + GIV(bytecodeSetSelector) = ((((int) methodHeader)) < 0 + ? 256 + : 0); + + /* begin internalPush: */ + object = (VMBIGENDIAN + ? ((1 + (((sqInt)((usqInt)(((((usqInt) methodHeader) >> MethodHeaderArgCountShift) & 15)) << ((BytesPerWord * 8) - 8))))) + (0)) + (0) + : ((1 + (((sqInt)((usqInt)(((((usqInt) methodHeader) >> MethodHeaderArgCountShift) & 15)) << 8)))) + (0)) + (0)); + longAtPointerput((localSP -= BytesPerOop), object); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), GIV(nilObj)); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), rcvr); + for (i = (GIV(argumentCount) + 1); i <= numTemps; i += 1) { + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), GIV(nilObj)); + } + localIP = pointerForOop(((GIV(newMethod) + ((LiteralStart + ((assert((methodHeader & 1)), +((methodHeader >> 1)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize) - 1); + if ((/* begin alternateHeaderHasPrimitiveFlag: */ + methodHeader & AlternateHeaderHasPrimFlag)) { + + /* Skip the CallPrimitive bytecode, if it's there, and store the error code if the method starts + with a long store temp. Strictly no need to skip the store because it's effectively a noop. */ + localIP += 3; + if (GIV(primFailCode) != 0) { + if ((byteAt(localIP + 1)) == (((((int) methodHeader)) < 0 + ? AltLongStoreBytecode + : LongStoreBytecode))) { + /* begin getErrorObjectFromPrimFailCode */ + if (GIV(primFailCode) > 0) { + /* begin splObj: */ + table = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(PrimErrTableIndex) << (shiftForWord()))))); + if (GIV(primFailCode) <= (numSlotsOf(table))) { + /* begin fetchPointer:ofObject: */ + errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); + goto l969; + } + } + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); + l969: /* end getErrorObjectFromPrimFailCode */; + longAtPointerput(localSP, errorCode); + } + GIV(primFailCode) = 0; + } + } + assert((frameNumArgs(localFP)) == GIV(argumentCount)); + assert(!(frameIsBlockActivation(localFP))); + assert(!(frameHasContext(localFP))); + if (localSP < GIV(stackLimit)) { + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + handleStackOverflowOrEventAllowContextSwitch(canContextSwitchIfActivatingheader(GIV(newMethod), methodHeader)); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + l970: /* end internalExecuteNewMethod */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + } + BREAK; + CASE(132) + /* doubleExtendedDoAnythingBytecode */ + { + sqInt byte2; + sqInt byte3; + char *callerFP; + sqInt index1; + sqInt litVar; + sqInt litVar1; + sqInt obj; + sqInt obj1; + sqInt object; + sqInt object11; + sqInt object2; + sqInt object3; + int onCurrentPage; + sqInt opType; + sqInt referent; + sqInt senderOop; + sqInt senderOop1; + char *spouseFP; + char * theFP; + StackPage * thePage; + sqInt top; + + VM_LABEL(doubleExtendedDoAnythingBytecode); + byte2 = byteAtPointer(++localIP); + byte3 = byteAtPointer(++localIP); + opType = ((usqInt) byte2) >> 5; + if (opType == 0) { + assert(GIV(method) == (iframeMethod(localFP))); + /* begin literal:ofMethod: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((byte3 + LiteralStart)) << (shiftForWord()))))); + + GIV(argumentCount) = byte2 & 0x1F; + goto normalSend; + goto l66; + } + if (opType == 1) { + assert(GIV(method) == (iframeMethod(localFP))); + /* begin literal:ofMethod: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((byte3 + LiteralStart)) << (shiftForWord()))))); + + GIV(argumentCount) = byte2 & 0x1F; + goto superclassSend; + goto l66; + } + if (opType == 2) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushMaybeContextReceiverVariable: */ + obj = longAt(localFP + FoxReceiver); + if ((byte3 <= StackPointerIndex) + && (((longAt(obj)) & (classIndexMask())) == ClassMethodContextCompactIndex)) { + /* begin internalPush: */ + assert(byte3 < MethodIndex); + assert(isContext(obj)); + if (!(((longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1))) { + /* begin fetchPointer:ofObject: */ + object3 = longAt((obj + BaseHeaderSize) + (((sqInt)((usqInt)(byte3) << (shiftForWord()))))); + goto l85; + } + /* begin writeBackHeadFramePointers */ + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + /* begin setHeadFP:andSP:inPage: */ + assert(localSP < localFP); + assert((localSP < ((GIV(stackPage)->baseAddress))) + && (localSP > (((GIV(stackPage)->realStackLimit)) - (LargeContextSlots * BytesPerOop)))); + assert((localFP < ((GIV(stackPage)->baseAddress))) + && (localFP > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); + (GIV(stackPage)->headFP = localFP); + (GIV(stackPage)->headSP = localSP); + assert(pageListIsWellFormed()); + if (isWidowedContext(obj)) { + /* begin fetchPointer:ofObject: */ + object3 = longAt((obj + BaseHeaderSize) + (((sqInt)((usqInt)(byte3) << (shiftForWord()))))); + goto l85; + } + /* begin frameOfMarriedContext: */ + senderOop = longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop & 1)); + spouseFP = pointerForOop(senderOop - 1); + + if (byte3 == SenderIndex) { + /* begin ensureCallerContext: */ + callerFP = pointerForOop(longAt(spouseFP + FoxSavedFP)); + if (callerFP == 0) { + + /* base frame, context in saved ip slot (or base of stack in Cog) */ + object3 = longAt(spouseFP + FoxCallerContext); + goto l85; + } + /* begin ensureFrameIsMarried:SP: */ + if ((byteAt((callerFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(callerFP))); + object3 = longAt(callerFP + FoxThisContext); + goto l85; + } + object3 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), + (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); + goto l85; + } + if (byte3 == StackPointerIndex) { + assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); + object3 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); + goto l85; + } + if (byte3 == InstructionPointerIndex) { + object3 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); + goto l85; + } + error("bad index"); + object3 = 0; + l85: /* end instVar:ofContext: */; + longAtPointerput((localSP -= BytesPerOop), object3); + } + else { + /* begin internalPush: */ + object11 = longAt((obj + BaseHeaderSize) + (((sqInt)((usqInt)(byte3) << (shiftForWord()))))); + longAtPointerput((localSP -= BytesPerOop), object11); + } + goto l66; + } + if (opType == 3) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((byte3 + LiteralStart)) << (shiftForWord()))))); + + longAtPointerput((localSP -= BytesPerOop), object); + goto l66; + } + if (opType == 4) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((byte3 + LiteralStart)) << (shiftForWord()))))); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, byte3); + } + /* begin internalPush: */ + object2 = longAt((litVar + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); + longAtPointerput((localSP -= BytesPerOop), object2); + + goto l66; + } + top = longAtPointer(localSP); + if (opType == 7) { + /* begin storeLiteralVariable:withValue: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar1 = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((byte3 + LiteralStart)) << (shiftForWord()))))); + + if (((longAt(litVar1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + /* begin followForwarded: */ + assert(isUnambiguouslyForwarder(litVar1)); + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((litVar1 + BaseHeaderSize) + (0U << (shiftForWord()))); + while (((referent & (tagMask())) == 0) + && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((referent + BaseHeaderSize) + (0U << (shiftForWord()))); + } + litVar1 = referent; + } + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(litVar1)))); + if (((((usqInt) (longAt(litVar1))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), litVar1); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), top); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l92; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(litVar1))); + if ((assert(isNonImmediate(litVar1)), + oopisGreaterThanOrEqualTo(litVar1, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((top & (tagMask())) == 0) + && (oopisLessThan(top, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(litVar1))) >> (rememberedBitShift())) & 1) != 0)) { + remember(litVar1); + } + } + } + longAtput((litVar1 + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))), top); + l92: /* end storeLiteralVariable:withValue: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l66; + } + if (opType == 6) { + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + /* begin storeMaybeContextReceiverVariable:withValue: */ + obj1 = longAt(localFP + FoxReceiver); + if ((byte3 <= ReceiverIndex) + && ((((longAt(obj1)) & (classIndexMask())) == ClassMethodContextCompactIndex) + && (((longAt((obj1 + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)))) { + /* begin instVar:ofContext:put: */ + assert(isMarriedOrWidowedContext(obj1)); + assert(!((isObjImmutable(obj1)))); + /* begin writeBackHeadFramePointers */ + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + /* begin setHeadFP:andSP:inPage: */ + assert(localSP < localFP); + assert((localSP < ((GIV(stackPage)->baseAddress))) + && (localSP > (((GIV(stackPage)->realStackLimit)) - (LargeContextSlots * BytesPerOop)))); + assert((localFP < ((GIV(stackPage)->baseAddress))) + && (localFP > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); + (GIV(stackPage)->headFP = localFP); + (GIV(stackPage)->headSP = localSP); + assert(pageListIsWellFormed()); + if (!((((longAt((obj1 + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(obj1))))) { + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(obj1))); + if ((assert(isNonImmediate(obj1)), + oopisGreaterThanOrEqualTo(obj1, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((top & (tagMask())) == 0) + && (oopisLessThan(top, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(obj1))) >> (rememberedBitShift())) & 1) != 0)) { + remember(obj1); + } + } + } + longAtput((obj1 + BaseHeaderSize) + (((sqInt)((usqInt)(byte3) << (shiftForWord())))), top); + if (byte3 == StackPointerIndex) { + } + goto l82; + } + /* begin frameOfMarriedContext: */ + senderOop1 = longAt((obj1 + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop1 & 1)); + theFP = pointerForOop(senderOop1 - 1); + + if (byte3 == SenderIndex) { + /* begin stackPageFor: */ + index1 = pageIndexForstackMemorybytesPerPage(theFP, GIV(stackMemory), GIV(bytesPerPage)); + thePage = stackPageAtpages(index1, GIV(pages)); + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + onCurrentPage = thePage == GIV(stackPage); + storeSenderOfFramewithValue(theFP, top); + if (onCurrentPage) { + localFP = (GIV(stackPage)->headFP); + localSP = (GIV(stackPage)->headSP); + } + else { + markStackPageMostRecentlyUsed(GIV(stackPage)); + } + goto l82; + } + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalDivorceFrameandContext(theFP, obj1); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(obj1))); + if ((assert(isNonImmediate(obj1)), + oopisGreaterThanOrEqualTo(obj1, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((top & (tagMask())) == 0) + && (oopisLessThan(top, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(obj1))) >> (rememberedBitShift())) & 1) != 0)) { + remember(obj1); + } + } + } + longAtput((obj1 + BaseHeaderSize) + (((sqInt)((usqInt)(byte3) << (shiftForWord())))), top); + if (byte3 == StackPointerIndex) { + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + markStackPageMostRecentlyUsed(GIV(stackPage)); + assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); + l82: /* end instVar:ofContext:put: */; + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(obj1)))); + if (((((usqInt) (longAt(obj1))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), obj1); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), top); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(byte3 + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l86; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(obj1))); + if ((assert(isNonImmediate(obj1)), + oopisGreaterThanOrEqualTo(obj1, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((top & (tagMask())) == 0) + && (oopisLessThan(top, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(obj1))) >> (rememberedBitShift())) & 1) != 0)) { + remember(obj1); + } + } + } + longAtput((obj1 + BaseHeaderSize) + (((sqInt)((usqInt)(byte3) << (shiftForWord())))), top); + l86: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + l66: /* end case */; + BREAK; + CASE(133) + /* singleExtendedSuperBytecode */ + { + sqInt descriptor; + + VM_LABEL(singleExtendedSuperBytecode); + /* begin fetchByte */ + descriptor = byteAtPointer(++localIP); + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(((descriptor & 0x1F) + LiteralStart)) << (shiftForWord()))))); + + GIV(argumentCount) = ((usqInt) descriptor) >> 5; + /* goto superclassSend */ + } + + superclassSend: + /* superclassSend */ + { + sqInt aValue; + sqInt classPointer; + sqInt err; + sqInt hash; + sqInt literal; + usqInt methodPointer; + sqInt objOop; + sqInt objOop1; + sqInt objOop11; + sqInt objOop2; + sqInt offset; + sqInt referent; + sqInt superclass; + + VM_LABEL(superclassSend); + /* begin superclassOf: */ + methodPointer = GIV(method); + /* begin followLiteral:ofMethod: */ + offset = (literalCountOf(methodPointer)) - 1; + /* begin followField:ofObject: */ + objOop11 = longAt((methodPointer + BaseHeaderSize) + (((sqInt)((usqInt)((offset + LiteralStart)) << (shiftForWord()))))); + if (((objOop11 & (tagMask())) == 0) + && (((longAt(objOop11)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop11 = fixFollowedFieldofObjectwithInitialValue(offset + LiteralStart, methodPointer, objOop11); + } + literal = objOop11; + if (literal != GIV(nilObj)) { + assert((isPointers(literal)) + && ((numSlotsOf(literal)) > ValueIndex)); + /* begin followField:ofObject: */ + objOop2 = longAt((literal + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); + if (((objOop2 & (tagMask())) == 0) + && (((longAt(objOop2)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop2 = fixFollowedFieldofObjectwithInitialValue(ValueIndex, literal, objOop2); + } + literal = objOop2; + } + classPointer = literal; + /* begin followField:ofObject: */ + objOop = longAt((classPointer + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); + if (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop = fixFollowedFieldofObjectwithInitialValue(SuperclassIndex, classPointer, objOop); + } + superclass = objOop; + + /* To maintain the invariant that all receivers are unforwarded we need an explicit + read barrier in the super send cases. Even though we always follow receivers + on become e.g. super doSomethingWith: (self become: other) forwards the receiver + self pushed on the stack. */ + assert(addressCouldBeClassObj(superclass)); + lkupClassTag = (((hash = (long32At(superclass + 4)) & (identityHashHalfWordMask()))) != 0 + ? hash + : (objCouldBeClassObj(superclass) + ? (((err = enterIntoClassTable(superclass))) != 0 + ? -err + : (/* begin rawHashBitsOf: */ + (long32At(superclass + 4)) & (identityHashHalfWordMask()))) + : -PrimErrBadReceiver)); + + /* begin ensureReceiverUnforwarded */ + if ((((longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop))) & (tagMask())) == 0) + && (((longAt(longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop)))) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin internalStackValue:put: */ + objOop1 = longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop)); + assert(isUnambiguouslyForwarder(objOop1)); + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((objOop1 + BaseHeaderSize) + (0U << (shiftForWord()))); + while (((referent & (tagMask())) == 0) + && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((referent + BaseHeaderSize) + (0U << (shiftForWord()))); + } + aValue = referent; + longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), aValue); + } + assert(lkupClassTag != (nilObject())); + goto commonSendOrdinary; + } + BREAK; + CASE(134) + /* secondExtendedSendBytecode */ + { + sqInt descriptor; + + VM_LABEL(secondExtendedSendBytecode); + /* begin fetchByte */ + descriptor = byteAtPointer(++localIP); + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(((descriptor & 0x3F) + LiteralStart)) << (shiftForWord()))))); + + GIV(argumentCount) = ((usqInt) descriptor) >> 6; + goto normalSend; + } + BREAK; + CASE(135) + CASE(472) /*216*/ + /* popStackBytecode */ + { + VM_LABEL(popStackBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(136) + CASE(339) /*83*/ + /* duplicateTopBytecode */ + { + sqInt object; + + VM_LABEL(duplicateTopBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + object = longAtPointer(localSP); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(137) + /* pushActiveContextBytecode */ + { + sqInt ourContext; + + VM_LABEL(pushActiveContextBytecode); + /* begin ensureFrameIsMarried:SP: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + ourContext = longAt(localFP + FoxThisContext); + goto l101; + } + ourContext = marryFrameSP(localFP, localSP); + l101: /* end ensureFrameIsMarried:SP: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ourContext); + } + BREAK; + CASE(138) + /* pushNewArrayBytecode */ + { + usqInt array; + sqInt i; + usqInt newObj; + usqInt numBytes; + int popValues; + sqInt size; + sqInt valuePointer; + sqInt valuePointer1; + + VM_LABEL(pushNewArrayBytecode); + /* begin fetchByte */ + size = byteAtPointer(++localIP); + popValues = size > 0x7F; + size = size & 0x7F; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + assert((size >= 0) + && (ClassArrayCompactIndex != 0)); + assert((2) == (instSpecOfClass(knownClassAtIndex(ClassArrayCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(size < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + ((size <= 1 + ? 8 + : (size + (size & 1)) * BytesPerOop)); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + array = 0; + goto l103; + } + } + long64Atput(newObj, (((((usqLong) size)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); + GIV(freeStart) += numBytes; + array = newObj; + l103: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + if (popValues) { + for (i = 0; i < size; i += 1) { + + /* Assume: have just allocated a new Array; it must be young. Thus, can use unchecked stores. */ + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer = longAtPointer(localSP + (((size - i) - 1) * BytesPerOop)); + assert(!(isOopForwarded(array))); + longAtput((array + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), valuePointer); + } + /* begin internalPop: */ + localSP += size * BytesPerOop; + } + else { + for (i = 0; i < size; i += 1) { + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer1 = GIV(nilObj); + assert(!(isOopForwarded(array))); + longAtput((array + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), valuePointer1); + } + } + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), array); + } + BREAK; + CASE(139) + /* callPrimitiveBytecode */ + { + sqInt arg; + sqInt aValue; + sqInt aValue1; + sqInt bool; + sqInt bool1; + sqInt bool2; + sqInt bool3; + sqInt bool4; + sqInt bool5; + sqInt byte1; + sqInt byte2; + sqInt byteIndex; + sqInt byteIndex1; + sqInt classObj; + sqInt fieldIndex; + sqInt fieldIndex1; + sqInt fieldIndex2; + sqInt fmt; + sqInt hash; + sqInt hash1; + sqInt header; + sqInt i; + sqInt knownClassIndex; + sqInt longIndex; + sqInt longIndex1; + usqInt newObj; + usqInt numBytes; + usqInt numBytes1; + sqInt numSlots; + usqInt numSlots1; + usqInt numSlots2; + sqInt obj; + sqInt objFormat; + sqInt objOop; + sqInt objOop1; + sqInt objOop11; + sqInt objOop12; + sqInt objOop2; + sqInt objOop21; + sqInt objOop22; + sqInt objOop3; + sqInt objOop31; + sqInt objOop4; + sqInt objOop41; + sqInt objOop5; + sqInt oop; + sqInt oop1; + sqInt oop11; + sqInt oop2; + sqInt prim; + sqInt primSet; + sqInt rcvr; + sqInt result; + sqInt result1; + usqInt result2; + sqLong result64; + sqInt shortIndex; + sqInt shortIndex1; + sqInt tagBits; + sqInt valuePointer; + + VM_LABEL(callPrimitiveBytecode); + byte1 = byteAtPointer(++localIP); + byte2 = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + if (byte2 < 128) { + /* begin methodHeaderOf: */ + assert(isCompiledMethod(GIV(method))); + /* begin fetchPointer:ofObject: */ + header = longAt((GIV(method) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); + if (((/* begin alternateHeaderHasPrimitiveFlag: */ + header & AlternateHeaderHasPrimFlag)) + && (((((usqInt)localIP)) == ((GIV(method) + ((LiteralStart + ((assert((header & 1)), +((header >> 1)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize)) + (3))) { + goto l109; + } + localIP -= 3; + goto respondToUnknownBytecode; + goto l109; + } + prim = (((sqInt)((usqInt)((byte2 - 128)) << 8))) + byte1; + primSet = (((usqInt) prim) >> 13) & 3; + prim = prim & 0x1FFF; + if (primSet == 0) { + if (prim < 1000) { + /* begin nullaryInlinePrimitive: */ + localIP -= 3; + goto respondToUnknownBytecode; + goto l109; + } + if (prim < 2000) { + /* begin unaryInlinePrimitive: */ + + switch (prim - 1000) { + case 0: + /* begin fetchClassOf: */ + oop2 = longAtPointer(localSP); + result2 = (((tagBits = oop2 & (tagMask()))) != 0 + ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits) << (shiftForWord()))))) + : fetchClassOfNonImm(oop2)); + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result2); + break; + case 1: + /* begin numSlotsOf: */ + objOop5 = longAtPointer(localSP); + assert((classIndexOf(objOop5)) > (isForwardedObjectClassIndexPun())); + numSlots1 = byteAt(objOop5 + 7); + result2 = (numSlots1 == (numSlotsMask()) + ? longAt(objOop5 - BaseHeaderSize) + : numSlots1); + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 2: + result2 = (numSlotsOf(longAtPointer(localSP))) - (fixedFieldsOfClass(fetchClassOfNonImm(longAtPointer(localSP)))); + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 3: + /* begin numBytesOf: */ + objOop12 = longAtPointer(localSP); + fmt = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOf: */ + assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); + numSlots2 = byteAt(objOop12 + 7); + numBytes = (numSlots2 == (numSlotsMask()) + ? longAt(objOop12 - BaseHeaderSize) + : numSlots2); + numBytes = numBytes << (shiftForWord()); + if (fmt >= (firstByteFormat())) { + + /* bytes (the common case), including CompiledMethod */ + result2 = numBytes - (fmt & 7); + goto l145; + } + if (fmt <= (sixtyFourBitIndexableFormat())) { + result2 = ((sqInt) numBytes); + goto l145; + } + if (fmt >= (firstShortFormat())) { + result2 = numBytes - (((sqInt)((usqInt)((fmt & 3)) << 1))); + goto l145; + } + result2 = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); + l145: /* end numBytesOf: */; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 4: + /* begin num16BitUnitsOf: */ + objOop22 = longAtPointer(localSP); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 5: + /* begin num32BitUnitsOf: */ + objOop31 = longAtPointer(localSP); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 6: + /* begin num64BitUnitsOf: */ + objOop41 = longAtPointer(localSP); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 11: + /* begin internalStackTop */ + classObj = longAtPointer(localSP); + /* begin instanceSizeOf: */ + assert(addressCouldBeClassObj(classObj)); + numSlots = (((longAt((classObj + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); + assert((rawHashBitsOf(classObj)) != 0); + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + knownClassIndex = (long32At(classObj + 4)) & (identityHashHalfWordMask()); + /* begin instSpecOfClassFormat: */ + objFormat = (((usqInt) (((longAt((classObj + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1))) >> (fixedFieldsFieldWidth())) & (formatMask()); + assert((numSlots >= 0) + && (knownClassIndex != 0)); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(knownClassIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(numSlots < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes1 = BaseHeaderSize + ((numSlots <= 1 + ? 8 + : (numSlots + (numSlots & 1)) * BytesPerOop)); + assert((numBytes1 % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes1) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes1) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + goto l130; + } + } + long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + knownClassIndex); + GIV(freeStart) += numBytes1; + result2 = newObj; + l130: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + if ((extB & 1) == 0) { + for (i = 0; i < numSlots; i += 1) { + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer = GIV(nilObj); + assert(!(isOopForwarded(result2))); + longAtput((result2 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), valuePointer); + } + } + extB = 0; + numExtB = 0; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result2); + break; + case 20: + /* begin hashBitsOf: */ + hash = (long32At((longAtPointer(localSP)) + 4)) & (identityHashHalfWordMask()); + if (hash == 0) { + + /* would like to assert + self assert: (coInterpreter addressCouldBeClassObj: objOop) not + but instance-specific behaviors that are instances of themselves may + fail this test. */ + /* begin newHashBitsOf: */ + hash1 = (newObjectHash()) & (identityHashHalfWordMask()); + /* begin setHashBitsOf:to: */ + assert(((hash1 >= 0) && (hash1 <= (identityHashHalfWordMask())))); + long32Atput((longAtPointer(localSP)) + 4, ((((long32At((longAtPointer(localSP)) + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); + hash = hash1; + } + result2 = hash; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 30: + /* begin characterValueOf: */ + oop11 = longAtPointer(localSP); + result2 = ((usqInt) (((usqInt)oop11))) >> (numTagBits()); + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + default: + localIP -= 3; + goto respondToUnknownBytecode; + + } + goto l109; + } + if (prim < 3000) { + /* begin binaryInlinePrimitive: */ + + switch (prim - 2000) { + case 0: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 1: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 2: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 3: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 4: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 5: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 6: + rcvr = ((longAtPointer(localSP + (1 * BytesPerOop))) >> 1); + arg = ((longAtPointer(localSP)) >> 1); + /* begin quot:ient: */ + result = (rcvr > 0 + ? (arg > 0 + ? rcvr / arg + : 0 - (rcvr / (0 - arg))) + : (arg > 0 + ? 0 - ((0 - rcvr) / arg) + : (0 - rcvr) / (0 - arg))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, (((usqInt)result << 1) | 1)); + break; + case 16: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 17: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 18: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 19: + result = (((usqInt)(((sqInt)((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1))) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 20: + result = (((usqInt)(((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1))) >> (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 32: + /* begin booleanObjectOf: */ + bool = (longAtPointer(localSP + (1 * BytesPerOop))) > (longAtPointer(localSP)); + result = (bool + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 33: + /* begin booleanObjectOf: */ + bool1 = (longAtPointer(localSP + (1 * BytesPerOop))) < (longAtPointer(localSP)); + result = (bool1 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 34: + /* begin booleanObjectOf: */ + bool2 = (longAtPointer(localSP + (1 * BytesPerOop))) >= (longAtPointer(localSP)); + result = (bool2 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 35: + /* begin booleanObjectOf: */ + bool3 = (longAtPointer(localSP + (1 * BytesPerOop))) <= (longAtPointer(localSP)); + result = (bool3 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 36: + /* begin booleanObjectOf: */ + bool4 = (longAtPointer(localSP + (1 * BytesPerOop))) == (longAtPointer(localSP)); + result = (bool4 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 37: + /* begin booleanObjectOf: */ + bool5 = (longAtPointer(localSP + (1 * BytesPerOop))) != (longAtPointer(localSP)); + result = (bool5 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 64: + /* begin fetchPointer:ofObject: */ + fieldIndex = (((longAtPointer(localSP)) >> 1)) - 1; + objOop = longAtPointer(localSP + (1 * BytesPerOop)); + result = longAt((objOop + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 65: + /* begin fetchByte:ofObject: */ + byteIndex = (((longAtPointer(localSP)) >> 1)) - 1; + objOop1 = longAtPointer(localSP + (1 * BytesPerOop)); + result = byteAt((objOop1 + BaseHeaderSize) + byteIndex); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, (((usqInt)result << 1) | 1)); + break; + case 66: + /* begin fetchShort16:ofObject: */ + shortIndex = (((longAtPointer(localSP)) >> 1)) - 1; + objOop2 = longAtPointer(localSP + (1 * BytesPerOop)); + result = shortAt((objOop2 + BaseHeaderSize) + (((sqInt)((usqInt)(shortIndex) << 1)))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, (((usqInt)result << 1) | 1)); + break; + case 67: + /* begin fetchLong32:ofObject: */ + fieldIndex1 = (((longAtPointer(localSP)) >> 1)) - 1; + oop = longAtPointer(localSP + (1 * BytesPerOop)); + result = long32At((oop + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << 2)))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + /* begin internalStackTopPut: */ + aValue = ((sqInt) (signed64BitValueOf(result))); + longAtPointerput(localSP, aValue); + break; + case 68: + /* begin fetchLong64:ofObject: */ + longIndex = (((longAtPointer(localSP)) >> 1)) - 1; + objOop3 = longAtPointer(localSP + (1 * BytesPerOop)); + result64 = long64At((objOop3 + BaseHeaderSize) + (((sqInt)((usqInt)(longIndex) << 3)))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + /* begin internalStackTopPut: */ + aValue1 = ((sqInt) (signed64BitValueOf(result))); + longAtPointerput(localSP, aValue1); + break; + default: + localIP -= 3; + goto respondToUnknownBytecode; + + } + goto l109; + } + if (prim < 4000) { + /* begin trinaryInlinePrimitive: */ + + switch (prim - 3000) { + case 0: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storePointer:ofObject:withValue: */ + objOop21 = longAtPointer(localSP + (2 * BytesPerOop)); + assert(!(isForwarded(objOop21))); + if ((assert(isNonImmediate(objOop21)), + oopisGreaterThanOrEqualTo(objOop21, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((result1 & (tagMask())) == 0) + && (oopisLessThan(result1, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(objOop21))) >> (rememberedBitShift())) & 1) != 0)) { + remember(objOop21); + } + } + } + longAtput((objOop21 + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1)) << (shiftForWord())))), result1); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + case 1: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storeByte:ofObject:withValue: */ + byteIndex1 = (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1; + oop1 = longAtPointer(localSP + (2 * BytesPerOop)); + byteAtput((oop1 + BaseHeaderSize) + byteIndex1, (result1 >> 1)); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + case 2: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storeShort16:ofObject:withValue: */ + shortIndex1 = (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1; + objOop4 = longAtPointer(localSP + (2 * BytesPerOop)); + shortAtput((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(shortIndex1) << 1))), (result1 >> 1)); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + case 3: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storeLong32:ofObject:withValue: */ + fieldIndex2 = (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1; + obj = longAtPointer(localSP + (2 * BytesPerOop)); + long32Atput((obj + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << 2))), (result1 >> 1)); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + case 4: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storeLong64:ofObject:withValue: */ + longIndex1 = (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1; + objOop11 = longAtPointer(localSP + (2 * BytesPerOop)); + long64Atput((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(longIndex1) << 3))), (result1 >> 1)); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + default: + localIP -= 3; + goto respondToUnknownBytecode; + + } + goto l109; + } + } + localIP -= 3; + goto respondToUnknownBytecode; + goto l109; + + } + l109: /* end case */; + BREAK; + CASE(140) + /* pushRemoteTempLongBytecode */ + { + sqInt frameNumArgs; + sqInt object; + sqInt remoteTempIndex; + sqInt tempVector; + sqInt tempVectorIndex; + + VM_LABEL(pushRemoteTempLongBytecode); + /* begin fetchByte */ + remoteTempIndex = byteAtPointer(++localIP); + /* begin fetchByte */ + tempVectorIndex = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin pushRemoteTemp:inVectorAt: */ + tempVector = (tempVectorIndex < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - tempVectorIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - tempVectorIndex) * BytesPerWord))); + /* begin internalPush: */ + object = longAt((tempVector + BaseHeaderSize) + (((sqInt)((usqInt)(remoteTempIndex) << (shiftForWord()))))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(141) + /* storeRemoteTempLongBytecode */ + { + sqInt frameNumArgs; + sqInt remoteTempIndex; + sqInt tempVector; + sqInt tempVectorIndex; + + VM_LABEL(storeRemoteTempLongBytecode); + /* begin fetchByte */ + remoteTempIndex = byteAtPointer(++localIP); + /* begin fetchByte */ + tempVectorIndex = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin storeRemoteTemp:inVectorAt: */ + tempVector = (tempVectorIndex < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - tempVectorIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - tempVectorIndex) * BytesPerWord))); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(tempVector))); + if ((assert(isNonImmediate(tempVector)), + oopisGreaterThanOrEqualTo(tempVector, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if ((((longAtPointer(localSP)) & (tagMask())) == 0) + && (oopisLessThan(longAtPointer(localSP), GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(tempVector))) >> (rememberedBitShift())) & 1) != 0)) { + remember(tempVector); + } + } + } + longAtput((tempVector + BaseHeaderSize) + (((sqInt)((usqInt)(remoteTempIndex) << (shiftForWord())))), longAtPointer(localSP)); + } + BREAK; + CASE(142) + /* storeAndPopRemoteTempLongBytecode */ + { + sqInt frameNumArgs; + sqInt remoteTempIndex; + sqInt tempVector; + sqInt tempVectorIndex; + + VM_LABEL(storeAndPopRemoteTempLongBytecode); + /* begin storeRemoteTempLongBytecode */ + remoteTempIndex = byteAtPointer(++localIP); + /* begin fetchByte */ + tempVectorIndex = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin storeRemoteTemp:inVectorAt: */ + tempVector = (tempVectorIndex < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - tempVectorIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - tempVectorIndex) * BytesPerWord))); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(tempVector))); + if ((assert(isNonImmediate(tempVector)), + oopisGreaterThanOrEqualTo(tempVector, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if ((((longAtPointer(localSP)) & (tagMask())) == 0) + && (oopisLessThan(longAtPointer(localSP), GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(tempVector))) >> (rememberedBitShift())) & 1) != 0)) { + remember(tempVector); + } + } + } + longAtput((tempVector + BaseHeaderSize) + (((sqInt)((usqInt)(remoteTempIndex) << (shiftForWord())))), longAtPointer(localSP)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(143) + /* pushClosureCopyCopiedValuesBytecode */ + { + sqInt blockSize; + sqInt context; + sqInt i; + sqInt newClosure; + usqInt newClosure1; + usqInt newObj; + sqInt numArgs; + sqInt numArgsNumCopied; + usqInt numBytes; + sqInt numCopied; + sqInt numSlots; + sqInt objFormat; + sqInt valuePointer; + + VM_LABEL(pushClosureCopyCopiedValuesBytecode); + /* begin fetchByte */ + numArgsNumCopied = byteAtPointer(++localIP); + numArgs = numArgsNumCopied & 15; + + /* Split blockSize := (self fetchByte * 256) + self fetchByte. into two because evaluation order in C is undefined. */ + numCopied = ((usqInt) numArgsNumCopied >> 4); + blockSize = ((sqInt)((usqInt)((byteAtPointer(++localIP))) << 8)); + blockSize += byteAtPointer(++localIP); + /* begin pushClosureNumArgs:copiedValues:blockSize: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + context = longAt(localFP + FoxThisContext); + goto l193; + } + context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); + l193: /* end ensureFrameIsMarried:SP: */; + /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = indexablePointersFormat(); + numSlots = ClosureFirstCopiedValueIndex + numCopied; + assert((numSlots >= 0) + && (ClassBlockClosureCompactIndex != 0)); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassBlockClosureCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(numSlots < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + ((numSlots <= 1 + ? 8 + : (numSlots + (numSlots & 1)) * BytesPerOop)); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newClosure1 = 0; + goto l184; + } + } + long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); + GIV(freeStart) += numBytes; + newClosure1 = newObj; + l184: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(newClosure1))); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(newClosure1))); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(newClosure1))); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); + newClosure = newClosure1; + if (numCopied > 0) { + for (i = 0; i < numCopied; i += 1) { + + /* Assume: have just allocated a new BlockClosure; it must be young. + Thus, can use unchecked stores. */ + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer = longAtPointer(localSP + (((numCopied - i) - 1) * BytesPerOop)); + assert(!(isOopForwarded(newClosure))); + longAtput((newClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + ClosureFirstCopiedValueIndex)) << (shiftForWord())))), valuePointer); + } + /* begin internalPop: */ + localSP += numCopied * BytesPerOop; + } + localIP += blockSize; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), newClosure); + } + BREAK; + CASE(144) + CASE(432) /*176*/ + /* shortUnconditionalJump */ + { + sqInt offset; + + VM_LABEL(shortUnconditionalJump); + /* begin jump: */ + offset = 1 /* (currentBytecode bitAnd: 7) + 1 */; + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(145) + CASE(433) /*177*/ + /* shortUnconditionalJump */ + { + sqInt offset; + + VM_LABEL(shortUnconditionalJump1); + /* begin jump: */ + offset = 2 /* (currentBytecode bitAnd: 7) + 1 */; + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(146) + CASE(434) /*178*/ + /* shortUnconditionalJump */ + { + sqInt offset; + + VM_LABEL(shortUnconditionalJump2); + /* begin jump: */ + offset = 3 /* (currentBytecode bitAnd: 7) + 1 */; + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(147) + CASE(435) /*179*/ + /* shortUnconditionalJump */ + { + sqInt offset; + + VM_LABEL(shortUnconditionalJump3); + /* begin jump: */ + offset = 4 /* (currentBytecode bitAnd: 7) + 1 */; + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(148) + CASE(436) /*180*/ + /* shortUnconditionalJump */ + { + sqInt offset; + + VM_LABEL(shortUnconditionalJump4); + /* begin jump: */ + offset = 5 /* (currentBytecode bitAnd: 7) + 1 */; + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(149) + CASE(437) /*181*/ + /* shortUnconditionalJump */ + { + sqInt offset; + + VM_LABEL(shortUnconditionalJump5); + /* begin jump: */ + offset = 6 /* (currentBytecode bitAnd: 7) + 1 */; + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(150) + CASE(438) /*182*/ + /* shortUnconditionalJump */ + { + sqInt offset; + + VM_LABEL(shortUnconditionalJump6); + /* begin jump: */ + offset = 7 /* (currentBytecode bitAnd: 7) + 1 */; + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(151) + CASE(439) /*183*/ + /* shortUnconditionalJump */ + { + sqInt offset; + + VM_LABEL(shortUnconditionalJump7); + /* begin jump: */ + offset = 8 /* (currentBytecode bitAnd: 7) + 1 */; + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(152) + CASE(153) + CASE(154) + CASE(155) + CASE(156) + CASE(157) + CASE(158) + CASE(159) + /* shortConditionalJumpFalse */ + { + sqInt boolean; + sqInt offset; + + VM_LABEL(shortConditionalJumpFalse); + /* begin jumplfFalseBy: */ + offset = (currentBytecode & 7) + 1; + /* begin internalStackTop */ + boolean = longAtPointer(localSP); + if (boolean == GIV(falseObj)) { + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + else { + if (!(boolean == GIV(trueObj))) { + /* begin internalMustBeBoolean */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + goto l197; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + l197: /* end jumplfFalseBy: */; + } + BREAK; + CASE(160) + CASE(161) + CASE(162) + CASE(163) + CASE(164) + CASE(165) + CASE(166) + CASE(167) + /* longUnconditionalJump */ + { + sqInt offset; + + VM_LABEL(longUnconditionalJump); + offset = (((currentBytecode & 7) - 4) * 256) + (byteAtPointer(++localIP)); + localIP += offset; + /* begin ifBackwardsCheckForEvents: */ + if ((offset < 0) + && (localSP < GIV(stackLimit))) { + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + checkForEventsMayContextSwitch(1); + browserPluginReturnIfNeeded(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(168) + CASE(169) + CASE(170) + CASE(171) + /* longJumpIfTrue */ + { + sqInt boolean; + sqInt offset; + + VM_LABEL(longJumpIfTrue); + /* begin jumplfTrueBy: */ + offset = ((currentBytecode & 3) * 256) + (byteAtPointer(++localIP)); + /* begin internalStackTop */ + boolean = longAtPointer(localSP); + if (boolean == GIV(trueObj)) { + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + else { + if (!(boolean == GIV(falseObj))) { + /* begin internalMustBeBoolean */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + goto l202; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + l202: /* end jumplfTrueBy: */; + } + BREAK; + CASE(172) + CASE(173) + CASE(174) + CASE(175) + /* longJumpIfFalse */ + { + sqInt boolean; + sqInt offset; + + VM_LABEL(longJumpIfFalse); + /* begin jumplfFalseBy: */ + offset = ((currentBytecode & 3) * 256) + (byteAtPointer(++localIP)); + /* begin internalStackTop */ + boolean = longAtPointer(localSP); + if (boolean == GIV(falseObj)) { + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + else { + if (!(boolean == GIV(trueObj))) { + /* begin internalMustBeBoolean */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + goto l206; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + l206: /* end jumplfFalseBy: */; + } + BREAK; + CASE(176) + /* bytecodePrimAdd */ + { + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + sqInt result; + double result1; + double result2; + char *sp; + + VM_LABEL(bytecodePrimAdd); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + result = ((rcvr >> 1)) + ((arg >> 1)); + if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l208; + } + } + else { + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveFloatAdd:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l213; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result2); + rcvr1 = result2; + goto l213; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l213: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l209; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l209; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l209: /* end loadFloatOrIntFrom: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr1 + arg1)); + GIV(stackPointer) = sp; + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l208; + } + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((0 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l208: /* end case */; + BREAK; + CASE(177) + /* bytecodePrimSubtract */ + { + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + sqInt result; + double result1; + double result2; + char *sp; + + VM_LABEL(bytecodePrimSubtract); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + result = ((rcvr >> 1)) - ((arg >> 1)); + if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l215; + } + } + else { + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveFloatSubtract:fromArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l220; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result2); + rcvr1 = result2; + goto l220; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l220: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l216; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l216; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l216: /* end loadFloatOrIntFrom: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr1 - arg1)); + GIV(stackPointer) = sp; + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l215; + } + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((1 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l215: /* end case */; + BREAK; + CASE(178) + /* bytecodePrimLessThan */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimLessThan); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + + /* The C code can avoid detagging since tagged integers are still signed. + But this means the simulator must override to do detagging. */ + /* begin booleanCheat: */ + if (rcvr < arg) { + /* goto booleanCheatTrue */ + } + else { + goto booleanCheatFalse; + } + goto l222; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatLess:thanArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l224; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l224; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l224: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l227; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l227; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l227: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 < arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheat: */ + if (aBool) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l222; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((2 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l222: /* end case */; + + booleanCheatTrue: + /* booleanCheatTrue */ + { + sqInt bytecode; + sqInt offset; + + VM_LABEL(booleanCheatTrue); + + /* assume next bytecode is jumpIfFalse (99%) */ + bytecode = byteAtPointer(++localIP); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + if ((bytecode < 173) + && (bytecode > 151)) { + if (bytecode < 160) { + + /* short jumpIfFalse 152 - 159 */ + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l989; + } + if (bytecode == 172) { + + /* long jumpIfFalse */ + byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l989; + } + if (bytecode > 167) { + + /* long jumpIfTrue 168 - 171 */ + offset = (((sqInt)((usqInt)((bytecode - 168)) << 8))) + (byteAtPointer(++localIP)); + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + goto l989; + } + } + currentBytecode = bytecode + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); + } + l989: /* end case */; + BREAK; + CASE(179) + /* bytecodePrimGreaterThan */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimGreaterThan); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + + /* The C code can avoid detagging since tagged integers are still signed. + But this means the simulator must override to do detagging. */ + /* begin booleanCheat: */ + if (rcvr > arg) { + goto booleanCheatTrue; + } + else { + /* goto booleanCheatFalse */ + } + goto l228; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatGreater:thanArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l230; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l230; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l230: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l233; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l233; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l233: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 > arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheat: */ + if (aBool) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l228; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((3 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l228: /* end case */; + + booleanCheatFalse: + /* booleanCheatFalse */ + { + sqInt bytecode; + sqInt offset; + + VM_LABEL(booleanCheatFalse); + + /* assume next bytecode is jumpIfFalse (99%) */ + bytecode = byteAtPointer(++localIP); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + if ((bytecode < 160) + && (bytecode > 151)) { + + /* short jumpIfFalse */ + /* begin jump: */ + localIP = (localIP + (bytecode - 151)) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + goto l992; + } + if (bytecode == 172) { + + /* long jumpIfFalse */ + offset = byteAtPointer(++localIP); + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + goto l992; + } + currentBytecode = bytecode + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); + } + l992: /* end case */; + BREAK; + CASE(180) + /* bytecodePrimLessOrEqual */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimLessOrEqual); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + + /* The C code can avoid detagging since tagged integers are still signed. + But this means the simulator must override to do detagging. */ + /* begin booleanCheat: */ + if (rcvr <= arg) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l234; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatLessOrEqual:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l236; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l236; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l236: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l239; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l239; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l239: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 <= arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheat: */ + if (aBool) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l234; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((4 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l234: /* end case */; + BREAK; + CASE(181) + /* bytecodePrimGreaterOrEqual */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimGreaterOrEqual); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + + /* The C code can avoid detagging since tagged integers are still signed. + But this means the simulator must override to do detagging. */ + /* begin booleanCheat: */ + if (rcvr >= arg) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l240; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatGreaterOrEqual:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l242; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l242; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l242: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l245; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l245; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l245: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 >= arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheat: */ + if (aBool) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l240; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((5 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l240: /* end case */; + BREAK; + CASE(182) + /* bytecodePrimEqual */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimEqual); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + /* begin booleanCheat: */ + if (rcvr == arg) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l246; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatEqual:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l248; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l248; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l248: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l251; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l251; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l251: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 == arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheat: */ + if (aBool) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l246; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((6 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l246: /* end case */; + BREAK; + CASE(183) + /* bytecodePrimNotEqual */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimNotEqual); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + /* begin booleanCheat: */ + if (rcvr != arg) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l252; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatEqual:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l254; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l254; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l254: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l257; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l257; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l257: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 == arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheat: */ + if (!aBool) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + goto l252; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((7 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l252: /* end case */; + BREAK; + CASE(184) + /* bytecodePrimMultiply */ + { + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt oop; + int overflow; + sqInt rcvr; + double rcvr1; + sqInt result; + double result1; + double result2; + char *sp; + + VM_LABEL(bytecodePrimMultiply); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + rcvr = (rcvr >> 1); + arg = (arg >> 1); + overflow = (rcvr > 0 + ? (arg > 0 + ? rcvr > ((MaxSmallInteger) / arg) + : arg < ((MinSmallInteger) / rcvr)) + : (arg > 0 + ? rcvr < ((MinSmallInteger) / arg) + : (rcvr < 0) + && (arg < ((MaxSmallInteger) / rcvr)))); + if (!overflow) { + result = rcvr * arg; + oop = (((usqInt)result << 1) | 1); + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l258; + } + } + else { + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveFloatMultiply:byArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l263; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result2); + rcvr1 = result2; + goto l263; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l263: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l259; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l259; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l259: /* end loadFloatOrIntFrom: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr1 * arg1)); + GIV(stackPointer) = sp; + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l258; + } + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((8 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l258: /* end case */; + BREAK; + CASE(185) + /* bytecodePrimDivide */ + { + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + sqInt result; + double result1; + double result2; + char *sp; + + VM_LABEL(bytecodePrimDivide); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + rcvr = (rcvr >> 1); + arg = (arg >> 1); + if ((arg != 0) + && ((rcvr % arg) == 0)) { + + /* generates C / operation */ + result = rcvr / arg; + if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l265; + } + } + } + else { + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveFloatDivide:byArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l270; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result2); + rcvr1 = result2; + goto l270; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l270: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l266; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l266; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l266: /* end loadFloatOrIntFrom: */; + /* begin success: */ + if (!(arg1 != 0.0)) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr1 / arg1)); + GIV(stackPointer) = sp; + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l265; + } + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((9 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l265: /* end case */; + BREAK; + CASE(186) + /* bytecodePrimMod */ + { + sqInt mod; + sqInt objOop; + + VM_LABEL(bytecodePrimMod); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); + if (!GIV(primFailCode)) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l272; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((10 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l272: /* end case */; + BREAK; + CASE(187) + /* bytecodePrimMakePoint */ + { + sqInt objOop; + + VM_LABEL(bytecodePrimMakePoint); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + primitiveMakePoint(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l276; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((11 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l276: /* end case */; + BREAK; + CASE(188) + /* bytecodePrimBitShift */ + { + sqInt integerArgument; + sqInt integerReceiver; + usqInt newLargeInteger; + usqInt newObj; + usqInt numBytes; + sqInt objFormat; + sqInt objOop; + sqInt shifted; + char *sp; + sqInt valueWord; + + VM_LABEL(bytecodePrimBitShift); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveBitShift */ + integerArgument = longAt(GIV(stackPointer)); + if (!((integerArgument & 1))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l287; + } + integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + integerReceiver = positive32BitValueOf(integerReceiver); + + if (!GIV(primFailCode)) { + if (((integerArgument = (integerArgument >> 1))) >= 0) { + + /* Left shift -- must fail bits would be lost */ + if (!(integerArgument <= 0x1F)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l287; + } + shifted = ((sqInt)((usqInt)(integerReceiver) << integerArgument)); + if (!(integerReceiver == (((usqInt) shifted) >> integerArgument))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l287; + } + } + else { + + /* Right shift -- OK to lose bits */ + if (!(integerArgument >= (-0x1F))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l287; + } + shifted = ((usqInt) integerReceiver) >> (0 - integerArgument); + } + /* begin positive32BitIntegerFor: */ + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { + shifted = (((usqInt)shifted << 1) | 1); + goto l288; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l282; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; + l282: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN(shifted); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + shifted = newLargeInteger; + goto l288; + + l288: /* end positive32BitIntegerFor: */; + + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), shifted); + GIV(stackPointer) = sp; + } + l287: /* end primitiveBitShift */; + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l280; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((12 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l280: /* end case */; + BREAK; + CASE(189) + /* bytecodePrimDiv */ + { + sqInt objOop; + sqInt quotient; + + VM_LABEL(bytecodePrimDiv); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); + if (!GIV(primFailCode)) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l290; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((13 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l290: /* end case */; + BREAK; + CASE(190) + /* bytecodePrimBitAnd */ + { + sqInt arg; + sqInt objOop; + sqInt rcvr; + + VM_LABEL(bytecodePrimBitAnd); + arg = longAtPointer(localSP); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + if (((arg & 1)) + && ((rcvr & 1))) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), arg & rcvr); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l294; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + primitiveBitAnd(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l294; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((14 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l294: /* end case */; + BREAK; + CASE(191) + /* bytecodePrimBitOr */ + { + sqInt arg; + sqInt objOop; + sqInt rcvr; + + VM_LABEL(bytecodePrimBitOr); + arg = longAtPointer(localSP); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + if (((arg & 1)) + && ((rcvr & 1))) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), arg | rcvr); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l299; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + primitiveBitOr(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l299; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((15 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l299: /* end case */; + BREAK; + CASE(192) + /* bytecodePrimAt */ + { + sqInt atIx; + sqInt class; + sqInt classFormat; + sqInt fixedFields; + sqInt fixedFields1; + sqInt fixedFields2; + usqLong fmt; + usqLong fmt1; + sqInt fmt2; + sqLong hdr; + sqLong hdr1; + sqInt index; + sqInt index1; + usqInt newLargeInteger; + usqInt newObj; + usqInt numBytes; + usqInt numSlots11; + usqInt numSlots12; + usqInt numSlots2; + usqInt numSlots3; + sqInt objFormat; + sqInt objOop; + sqInt objOop1; + sqInt rcvr; + sqInt reasonCode; + sqInt result; + usqInt result1; + sqInt stSize; + sqInt totalLength; + sqInt totalLength1; + sqInt valueWord; + + VM_LABEL(bytecodePrimAt); + result = 0; + index = longAtPointer(localSP); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + if (((rcvr & (tagMask())) == 0) + && ((index & 1))) { + + /* Index into atCache = 4N, for N = 0 ... 7 */ + atIx = rcvr & AtCacheMask; + if ((GIV(atCache)[atIx + AtCacheOop]) != rcvr) { + /* begin fetchClassTagOfNonImm: */ + lkupClassTag = (longAt(rcvr)) & (classIndexMask()); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((16 * 2)) << (shiftForWord()))))); + if (!(lookupInMethodCacheSelclassTag(GIV(messageSelector), lkupClassTag))) { + GIV(argumentCount) = 1; + goto commonSendOrdinary; + goto l304; + } + if (primitiveFunctionPointer == primitiveAt) { + /* begin install:inAtCache:at:string: */ + assert(!(isContext(rcvr))); + /* begin baseHeader: */ + hdr = long64At(rcvr); + + /* For now the AtCache code doesn't support 16-bit indexability. */ + fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); + if (((fmt >= (firstShortFormat())) && (fmt <= ((firstByteFormat()) - 1)))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l319; + } + if ((fmt == (indexablePointersFormat())) + && ((hdr & (classIndexMask())) == ClassMethodContextCompactIndex)) { + + /* Contexts must not be put in the atCache, since their size is not constant */ + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadReceiver; + goto l319; + } + /* begin lengthOf:format: */ + numSlots11 = byteAt(rcvr + 7); + numSlots2 = (numSlots11 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots11); + if (fmt <= 5) { + totalLength = numSlots2; + goto l316; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength = (numSlots2 << (shiftForWord())) - (fmt & 7); + goto l316; + } + if (fmt >= (firstShortFormat())) { + totalLength = (numSlots2 << ((shiftForWord()) - 1)) - (fmt & 3); + goto l316; + } + if (fmt >= (firstLongFormat())) { + totalLength = (numSlots2 << ((shiftForWord()) - 2)) - (fmt & 1); + goto l316; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + totalLength = ((usqInt) numSlots2) >> 1; + goto l316; + } + totalLength = 0; + l316: /* end lengthOf:format: */; + /* begin fixedFieldsOf:format:length: */ + if ((fmt >= (sixtyFourBitIndexableFormat())) + || (fmt == 2)) { + fixedFields = 0; + goto l312; + } + if (fmt < 2) { + fixedFields = totalLength; + goto l312; + } + class = fetchClassOfNonImm(rcvr); + /* begin fixedFieldsOfClassFormat: */ + classFormat = ((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1); + fixedFields = classFormat & ((1U << (fixedFieldsFieldWidth())) - 1); + l312: /* end fixedFieldsOf:format:length: */; + + GIV(atCache)[atIx + AtCacheOop] = rcvr; + GIV(atCache)[atIx + AtCacheFmt] = fmt; + GIV(atCache)[atIx + AtCacheFixedFields] = fixedFields; + GIV(atCache)[atIx + AtCacheSize] = (totalLength - fixedFields); + l319: /* end install:inAtCache:at:string: */; + } + else { + if (primitiveFunctionPointer == primitiveStringAt) { + /* begin install:inAtCache:at:string: */ + assert(!(isContext(rcvr))); + /* begin baseHeader: */ + hdr1 = long64At(rcvr); + + /* For now the AtCache code doesn't support 16-bit indexability. */ + fmt1 = (((unsigned sqLong)hdr1) >> (formatShift())) & (formatMask()); + if (((fmt1 >= (firstShortFormat())) && (fmt1 <= ((firstByteFormat()) - 1)))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l314; + } + /* begin lengthOf:format: */ + numSlots12 = byteAt(rcvr + 7); + numSlots3 = (numSlots12 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots12); + if (fmt1 <= 5) { + totalLength1 = numSlots3; + goto l329; + } + if (fmt1 >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength1 = (numSlots3 << (shiftForWord())) - (fmt1 & 7); + goto l329; + } + if (fmt1 >= (firstShortFormat())) { + totalLength1 = (numSlots3 << ((shiftForWord()) - 1)) - (fmt1 & 3); + goto l329; + } + if (fmt1 >= (firstLongFormat())) { + totalLength1 = (numSlots3 << ((shiftForWord()) - 2)) - (fmt1 & 1); + goto l329; + } + if (fmt1 == (sixtyFourBitIndexableFormat())) { + totalLength1 = ((usqInt) numSlots3) >> 1; + goto l329; + } + totalLength1 = 0; + l329: /* end lengthOf:format: */; + fixedFields1 = 0; + + /* special flag for strings */ + fmt1 += 32; + + GIV(atCache)[atIx + AtCacheOop] = rcvr; + GIV(atCache)[atIx + AtCacheFmt] = fmt1; + GIV(atCache)[atIx + AtCacheFixedFields] = fixedFields1; + GIV(atCache)[atIx + AtCacheSize] = (totalLength1 - fixedFields1); + l314: /* end install:inAtCache:at:string: */; + } + else { + GIV(argumentCount) = 1; + goto commonSendOrdinary; + goto l304; + } + } + } + if (!GIV(primFailCode)) { + /* begin commonVariable:at:cacheIndex: */ + index1 = (index >> 1); + stSize = GIV(atCache)[atIx + AtCacheSize]; + if ((oopisGreaterThanOrEqualTo(index1, 1)) + && (oopisLessThanOrEqualTo(index1, stSize))) { + fmt2 = GIV(atCache)[atIx + AtCacheFmt]; + if (fmt2 <= (weakArrayFormat())) { + assert(!(isContextNonImm(rcvr))); + fixedFields2 = GIV(atCache)[atIx + AtCacheFixedFields]; + /* begin fetchPointer:ofObject: */ + result = longAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index1 + fixedFields2) - 1)) << (shiftForWord()))))); + goto l328; + } + if (fmt2 < (firstByteFormat())) { + + /* 64, 32, & 16 bits */ + if (fmt2 >= (firstShortFormat())) { + result = (((usqInt)(((unsigned short) (shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))))) << 1) | 1); + goto l328; + } + if (fmt2 == (sixtyFourBitIndexableFormat())) { + result = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 3))))); + goto l328; + } + + /* begin fetchLong32:ofObject: */ + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); + /* begin positive32BitIntegerFor: */ + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) result1)) <= (MaxSmallInteger)) { + result = ((result1 << 1) | 1); + goto l328; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l334; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; + l334: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN(result1); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + result = newLargeInteger; + goto l328; + + } + if (fmt2 >= 32) { + + /* Note fmt >= firstStringyFormat is an artificial flag for strings */ + /* String */ + /* Spur supports the String at:[put:] primitives on WideString and DoubleByteString */ + if (fmt2 < ((firstByteFormat()) + 32)) { + if (fmt2 < ((firstShortFormat()) + 32)) { + /* begin fetchLong32:ofObject: */ + result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + } + else { + /* begin fetchUnsignedShort16:ofObject: */ + result1 = ((unsigned short) (shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1)))))); + } + } + else { + /* begin fetchByte:ofObject: */ + result1 = byteAt((rcvr + BaseHeaderSize) + (index1 - 1)); + } + /* begin characterForAscii: */ + result = (result1 << (numTagBits())) + (characterTag()); + + goto l328; + } + else { + if ((fmt2 < (firstCompiledMethodFormat())) + || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + goto l328; + } + } + } + /* begin primitiveFailFor: */ + reasonCode = (isIndexable(rcvr) + ? PrimErrBadIndex + : PrimErrBadReceiver); + result = (GIV(primFailCode) = reasonCode); + l328: /* end commonVariable:at:cacheIndex: */; + } + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), result); + goto l304; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + } + /* begin fetchPointer:ofObject: */ + objOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)((16 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l304: /* end case */; + BREAK; + CASE(193) + /* bytecodePrimAtPut */ + { + sqInt atIx; + sqInt class; + sqInt classFormat; + sqInt correctRcvr; + sqInt fixedFields; + sqInt fixedFields1; + sqInt fixedFields2; + usqLong fmt; + usqLong fmt1; + sqInt fmt2; + sqLong hdr; + sqLong hdr1; + sqInt index; + sqInt index1; + sqInt isCharacter; + usqInt numSlots11; + usqInt numSlots12; + usqInt numSlots2; + usqInt numSlots3; + sqInt objOop; + sqInt objOop1; + sqInt rcvr; + sqInt reasonCode; + sqInt stSize; + sqInt totalLength; + sqInt totalLength1; + usqLong val64ToPut; + int valToPut; + sqInt value; + + VM_LABEL(bytecodePrimAtPut); + value = longAtPointer(localSP); + index = longAtPointer(localSP + (1 * BytesPerOop)); + rcvr = longAtPointer(localSP + (2 * BytesPerOop)); + +# if IMMUTABILITY + /* begin isOopMutable: */ + correctRcvr = ((rcvr & (tagMask())) == 0) + && (!(((((usqInt) (longAt(rcvr))) >> (immutableBitShift())) & 1) != 0)); + +# else /* IMMUTABILITY */ + /* begin isNonImmediate: */ + correctRcvr = (rcvr & (tagMask())) == 0; + +# endif /* IMMUTABILITY */ + + if (correctRcvr + && ((index & 1))) { + + /* Index into atPutCache */ + atIx = (rcvr & AtCacheMask) + AtPutBase; + if ((GIV(atCache)[atIx + AtCacheOop]) != rcvr) { + /* begin fetchClassTagOfNonImm: */ + lkupClassTag = (longAt(rcvr)) & (classIndexMask()); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((17 * 2)) << (shiftForWord()))))); + if (!(lookupInMethodCacheSelclassTag(GIV(messageSelector), lkupClassTag))) { + GIV(argumentCount) = 2; + goto commonSendOrdinary; + goto l336; + } + if (primitiveFunctionPointer == primitiveAtPut) { + /* begin install:inAtCache:at:string: */ + assert(!(isContext(rcvr))); + /* begin baseHeader: */ + hdr = long64At(rcvr); + + /* For now the AtCache code doesn't support 16-bit indexability. */ + fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); + if (((fmt >= (firstShortFormat())) && (fmt <= ((firstByteFormat()) - 1)))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l366; + } + if ((fmt == (indexablePointersFormat())) + && ((hdr & (classIndexMask())) == ClassMethodContextCompactIndex)) { + + /* Contexts must not be put in the atCache, since their size is not constant */ + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadReceiver; + goto l366; + } + /* begin lengthOf:format: */ + numSlots11 = byteAt(rcvr + 7); + numSlots2 = (numSlots11 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots11); + if (fmt <= 5) { + totalLength = numSlots2; + goto l375; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength = (numSlots2 << (shiftForWord())) - (fmt & 7); + goto l375; + } + if (fmt >= (firstShortFormat())) { + totalLength = (numSlots2 << ((shiftForWord()) - 1)) - (fmt & 3); + goto l375; + } + if (fmt >= (firstLongFormat())) { + totalLength = (numSlots2 << ((shiftForWord()) - 2)) - (fmt & 1); + goto l375; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + totalLength = ((usqInt) numSlots2) >> 1; + goto l375; + } + totalLength = 0; + l375: /* end lengthOf:format: */; + /* begin fixedFieldsOf:format:length: */ + if ((fmt >= (sixtyFourBitIndexableFormat())) + || (fmt == 2)) { + fixedFields = 0; + goto l359; + } + if (fmt < 2) { + fixedFields = totalLength; + goto l359; + } + class = fetchClassOfNonImm(rcvr); + /* begin fixedFieldsOfClassFormat: */ + classFormat = ((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1); + fixedFields = classFormat & ((1U << (fixedFieldsFieldWidth())) - 1); + l359: /* end fixedFieldsOf:format:length: */; + + GIV(atCache)[atIx + AtCacheOop] = rcvr; + GIV(atCache)[atIx + AtCacheFmt] = fmt; + GIV(atCache)[atIx + AtCacheFixedFields] = fixedFields; + GIV(atCache)[atIx + AtCacheSize] = (totalLength - fixedFields); + l366: /* end install:inAtCache:at:string: */; + } + else { + if (primitiveFunctionPointer == primitiveStringAtPut) { + /* begin install:inAtCache:at:string: */ + assert(!(isContext(rcvr))); + /* begin baseHeader: */ + hdr1 = long64At(rcvr); + + /* For now the AtCache code doesn't support 16-bit indexability. */ + fmt1 = (((unsigned sqLong)hdr1) >> (formatShift())) & (formatMask()); + if (((fmt1 >= (firstShortFormat())) && (fmt1 <= ((firstByteFormat()) - 1)))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l368; + } + /* begin lengthOf:format: */ + numSlots12 = byteAt(rcvr + 7); + numSlots3 = (numSlots12 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots12); + if (fmt1 <= 5) { + totalLength1 = numSlots3; + goto l374; + } + if (fmt1 >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength1 = (numSlots3 << (shiftForWord())) - (fmt1 & 7); + goto l374; + } + if (fmt1 >= (firstShortFormat())) { + totalLength1 = (numSlots3 << ((shiftForWord()) - 1)) - (fmt1 & 3); + goto l374; + } + if (fmt1 >= (firstLongFormat())) { + totalLength1 = (numSlots3 << ((shiftForWord()) - 2)) - (fmt1 & 1); + goto l374; + } + if (fmt1 == (sixtyFourBitIndexableFormat())) { + totalLength1 = ((usqInt) numSlots3) >> 1; + goto l374; + } + totalLength1 = 0; + l374: /* end lengthOf:format: */; + fixedFields1 = 0; + + /* special flag for strings */ + fmt1 += 32; + + GIV(atCache)[atIx + AtCacheOop] = rcvr; + GIV(atCache)[atIx + AtCacheFmt] = fmt1; + GIV(atCache)[atIx + AtCacheFixedFields] = fixedFields1; + GIV(atCache)[atIx + AtCacheSize] = (totalLength1 - fixedFields1); + l368: /* end install:inAtCache:at:string: */; + } + else { + GIV(argumentCount) = 2; + goto commonSendOrdinary; + goto l336; + } + } + } + if (!GIV(primFailCode)) { + /* begin commonVariable:at:put:cacheIndex: */ + index1 = (index >> 1); + stSize = GIV(atCache)[atIx + AtCacheSize]; + if ((oopisGreaterThanOrEqualTo(index1, 1)) + && (oopisLessThanOrEqualTo(index1, stSize))) { + fmt2 = GIV(atCache)[atIx + AtCacheFmt]; + if (fmt2 <= (weakArrayFormat())) { + assert(!(isContextNonImm(rcvr))); + fixedFields2 = GIV(atCache)[atIx + AtCacheFixedFields]; + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rcvr))); + if ((assert(isNonImmediate(rcvr)), + oopisGreaterThanOrEqualTo(rcvr, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(rcvr))) >> (rememberedBitShift())) & 1) != 0)) { + remember(rcvr); + } + } + } + longAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index1 + fixedFields2) - 1)) << (shiftForWord())))), value); + goto l345; + } + if (fmt2 < (firstByteFormat())) { + + /* 64, 32, & 16 bits */ + if (fmt2 >= (firstShortFormat())) { + valToPut = ((value & 1) + ? (value >> 1) + : -1); + if (!((valToPut >= 0) + && (valToPut <= 0xFFFF))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l345; + } + /* begin storeShort16:ofObject:withValue: */ + shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))), valToPut); + goto l345; + } + if (fmt2 == (sixtyFourBitIndexableFormat())) { + val64ToPut = positive64BitValueOf(value); + if (!GIV(primFailCode)) { + /* begin storeLong64:ofObject:withValue: */ + long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 3))), val64ToPut); + goto l345; + } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l345; + } + + valToPut = positive32BitValueOf(value); + if (!GIV(primFailCode)) { + /* begin storeLong32:ofObject:withValue: */ + long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2))), valToPut); + goto l345; + } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l345; + } + if (fmt2 >= 32) { + + /* Note fmt >= firstStringyFormat is an artificial flag for strings */ + /* begin isCharacterObject: */ + isCharacter = (value & (tagMask())) == (characterTag()); + if (!isCharacter) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l345; + } + /* begin characterValueOf: */ + valToPut = ((usqInt) (((usqInt)value))) >> (numTagBits()); + + if (fmt2 < ((firstByteFormat()) + 32)) { + if (fmt2 < ((firstShortFormat()) + 32)) { + assert(fmt2 != ((sixtyFourBitIndexableFormat()) + (firstStringyFakeFormat()))); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2))), valToPut); + goto l345; + } + else { + if (!((valToPut >= 0) + && (valToPut <= 0xFFFF))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l345; + } + /* begin storeShort16:ofObject:withValue: */ + shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))), valToPut); + goto l345; + } + } + + } + else { + if ((fmt2 >= (firstCompiledMethodFormat())) + && (index1 < ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadIndex; + goto l345; + } + valToPut = ((value & 1) + ? (value >> 1) + : -1); + } + if (!((valToPut >= 0) + && (valToPut <= 0xFF))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l345; + } + /* begin storeByte:ofObject:withValue: */ + byteAtput((rcvr + BaseHeaderSize) + (index1 - 1), valToPut); + goto l345; + } + /* begin primitiveFailFor: */ + reasonCode = (isIndexable(rcvr) + ? PrimErrBadIndex + : PrimErrBadReceiver); + GIV(primFailCode) = reasonCode; + /* return self */ + l345: /* end commonVariable:at:put:cacheIndex: */; + } + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (3 - 1) * BytesPerOop), value); + goto l336; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + } + /* begin fetchPointer:ofObject: */ + objOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)((17 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + } + l336: /* end case */; + BREAK; + CASE(194) + /* bytecodePrimSize */ + { + sqInt ccIndex; + sqInt ccIndex1; + sqInt classOop; + sqInt classOop1; + sqInt fmt; + sqInt fmt1; + sqInt isArray; + sqInt isString; + usqInt numSlots; + usqInt numSlots1; + usqInt numSlots11; + usqInt numSlots2; + sqInt objOop; + sqInt rcvr; + sqInt sz; + + VM_LABEL(bytecodePrimSize); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + + /* Shortcut the mega-lookup for ByteString and Array, the two big consumers of cycles + here. Both of these have compact class indices and neither has any added fields. */ + rcvr = longAtPointer(localSP); + /* begin is:instanceOf:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassByteString) << (shiftForWord()))))); + if (rcvr & (tagMask())) { + isString = 0; + goto l389; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(rcvr))); + /* begin classIndexOf: */ + ccIndex = (longAt(rcvr)) & (classIndexMask()); + isString = ClassByteStringCompactIndex == ccIndex; + goto l389; + + l389: /* end is:instanceOf:compactClassIndex: */; + if (isString) { + /* begin lengthOf:format: */ + fmt = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOfAny: */ + numSlots1 = byteAt(rcvr + 7); + numSlots = (numSlots1 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots1); + if (fmt <= 5) { + sz = numSlots; + goto l391; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + sz = (numSlots << (shiftForWord())) - (fmt & 7); + goto l391; + } + if (fmt >= (firstShortFormat())) { + sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); + goto l391; + } + if (fmt >= (firstLongFormat())) { + sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); + goto l391; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + sz = ((usqInt) numSlots) >> 1; + goto l391; + } + sz = 0; + l391: /* end lengthOf:format: */; + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l380; + } + /* begin is:instanceOf:compactClassIndex: */ + classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))); + if (rcvr & (tagMask())) { + isArray = 0; + goto l392; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(rcvr))); + /* begin classIndexOf: */ + ccIndex1 = (longAt(rcvr)) & (classIndexMask()); + isArray = ClassArrayCompactIndex == ccIndex1; + goto l392; + + l392: /* end is:instanceOf:compactClassIndex: */; + if (isArray) { + /* begin lengthOf:format: */ + fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOfAny: */ + numSlots11 = byteAt(rcvr + 7); + numSlots2 = (numSlots11 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots11); + if (fmt1 <= 5) { + sz = numSlots2; + goto l390; + } + if (fmt1 >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + sz = (numSlots2 << (shiftForWord())) - (fmt1 & 7); + goto l390; + } + if (fmt1 >= (firstShortFormat())) { + sz = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); + goto l390; + } + if (fmt1 >= (firstLongFormat())) { + sz = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); + goto l390; + } + if (fmt1 == (sixtyFourBitIndexableFormat())) { + sz = ((usqInt) numSlots2) >> 1; + goto l390; + } + sz = 0; + l390: /* end lengthOf:format: */; + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l380; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((18 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + } + l380: /* end case */; + BREAK; + CASE(195) + CASE(371) /*115*/ + /* bytecodePrimNext */ + { + sqInt objOop; + + VM_LABEL(bytecodePrimNext); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((19 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = ((fetchPointerofObject((19 * 2) + 1, splObj(SpecialSelectors))) >> 1); + goto normalSend; + } + BREAK; + CASE(196) + CASE(372) /*116*/ + /* bytecodePrimNextPut */ + { + sqInt objOop; + + VM_LABEL(bytecodePrimNextPut); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((20 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = ((fetchPointerofObject((20 * 2) + 1, splObj(SpecialSelectors))) >> 1); + goto normalSend; + } + BREAK; + CASE(197) + CASE(373) /*117*/ + /* bytecodePrimAtEnd */ + { + sqInt objOop; + + VM_LABEL(bytecodePrimAtEnd); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((21 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = ((fetchPointerofObject((21 * 2) + 1, splObj(SpecialSelectors))) >> 1); + goto normalSend; + } + BREAK; + CASE(198) + /* bytecodePrimIdentical */ + { + sqInt arg; + sqInt rcvr; + + VM_LABEL(bytecodePrimIdentical); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + if (((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + rcvr = handleSpecialSelectorSendFaultForfpsp(rcvr, localFP, localSP); + } + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + arg = handleSpecialSelectorSendFaultForfpsp(arg, localFP, localSP); + } + /* begin booleanCheat: */ + if (rcvr == arg) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + } + BREAK; + CASE(199) + CASE(375) /*119*/ + /* bytecodePrimClass */ + { + sqInt aValue; + sqInt rcvr; + sqInt tagBits; + + VM_LABEL(bytecodePrimClass); + rcvr = longAtPointer(localSP); + if (((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + rcvr = handleSpecialSelectorSendFaultForfpsp(rcvr, localFP, localSP); + } + /* begin internalStackTopPut: */ + aValue = (((tagBits = rcvr & (tagMask()))) != 0 + ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits) << (shiftForWord()))))) + : fetchClassOfNonImm(rcvr)); + longAtPointerput(localSP, aValue); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(200) + /* bytecodePrimNotIdentical */ + { + sqInt arg; + sqInt rcvr; + + VM_LABEL(bytecodePrimNotIdentical); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + if (((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + rcvr = handleSpecialSelectorSendFaultForfpsp(rcvr, localFP, localSP); + } + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + arg = handleSpecialSelectorSendFaultForfpsp(arg, localFP, localSP); + } + /* begin booleanCheat: */ + if (rcvr != arg) { + goto booleanCheatTrue; + } + else { + goto booleanCheatFalse; + } + } + BREAK; + CASE(201) + /* bytecodePrimValue */ + { + sqInt ccIndex; + sqInt classOop; + sqInt isBlock; + sqInt objOop; + sqInt rcvr; + + VM_LABEL(bytecodePrimValue); + rcvr = longAtPointer(localSP); + GIV(argumentCount) = 0; + /* begin is:instanceOf:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))); + if (rcvr & (tagMask())) { + isBlock = 0; + goto l403; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(rcvr))); + /* begin classIndexOf: */ + ccIndex = (longAt(rcvr)) & (classIndexMask()); + isBlock = ClassBlockClosureCompactIndex == ccIndex; + goto l403; + + l403: /* end is:instanceOf:compactClassIndex: */; + if (isBlock) { + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin initPrimCall */ + GIV(primFailCode) = 0; + primitiveClosureValue(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l401; + } + GIV(primFailCode) = 0; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((25 * 2)) << (shiftForWord()))))); + goto normalSend; + } + l401: /* end case */; + BREAK; + CASE(202) + /* bytecodePrimValueWithArg */ + { + sqInt ccIndex; + sqInt classOop; + sqInt isBlock; + sqInt objOop; + sqInt rcvr; + + VM_LABEL(bytecodePrimValueWithArg); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + GIV(argumentCount) = 1; + /* begin is:instanceOf:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))); + if (rcvr & (tagMask())) { + isBlock = 0; + goto l409; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(rcvr))); + /* begin classIndexOf: */ + ccIndex = (longAt(rcvr)) & (classIndexMask()); + isBlock = ClassBlockClosureCompactIndex == ccIndex; + goto l409; + + l409: /* end is:instanceOf:compactClassIndex: */; + if (isBlock) { + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin initPrimCall */ + GIV(primFailCode) = 0; + primitiveClosureValue(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l407; + } + GIV(primFailCode) = 0; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((26 * 2)) << (shiftForWord()))))); + goto normalSend; + } + l407: /* end case */; + BREAK; + CASE(203) + CASE(379) /*123*/ + /* bytecodePrimDo */ + { + sqInt objOop; + + VM_LABEL(bytecodePrimDo); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((27 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = ((fetchPointerofObject((27 * 2) + 1, splObj(SpecialSelectors))) >> 1); + goto normalSend; + } + BREAK; + CASE(204) + CASE(380) /*124*/ + /* bytecodePrimNew */ + { + sqInt objOop; + + VM_LABEL(bytecodePrimNew); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((28 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + } + BREAK; + CASE(205) + CASE(381) /*125*/ + /* bytecodePrimNewWithArg */ + { + sqInt objOop; + + VM_LABEL(bytecodePrimNewWithArg); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((29 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + BREAK; + CASE(206) + /* bytecodePrimPointX */ + { + sqInt classOop; + sqInt objOop; + sqInt ok; + sqInt rcvr; + + VM_LABEL(bytecodePrimPointX); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + rcvr = longAtPointer(localSP); + /* begin assertClassOf:is: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); + /* begin isNonImmediate: */ + ok = (rcvr & (tagMask())) == 0; + if (ok) { + /* begin isClassOfNonImm:equalTo: */ + assert(isNonImmediate(rcvr)); + ok = ((longAt(rcvr)) & (classIndexMask())) == ((long32At(classOop + 4)) & (identityHashHalfWordMask())); + } + /* begin success: */ + if (!ok) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + /* begin internalStackTopPut: */ + longAtPointerput(localSP, longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))))); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l419; + } + GIV(primFailCode) = 0; + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((30 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + } + l419: /* end case */; + BREAK; + CASE(207) + /* bytecodePrimPointY */ + { + sqInt classOop; + sqInt objOop; + sqInt ok; + sqInt rcvr; + + VM_LABEL(bytecodePrimPointY); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + rcvr = longAtPointer(localSP); + /* begin assertClassOf:is: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); + /* begin isNonImmediate: */ + ok = (rcvr & (tagMask())) == 0; + if (ok) { + /* begin isClassOfNonImm:equalTo: */ + assert(isNonImmediate(rcvr)); + ok = ((longAt(rcvr)) & (classIndexMask())) == ((long32At(classOop + 4)) & (identityHashHalfWordMask())); + } + /* begin success: */ + if (!ok) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + /* begin internalStackTopPut: */ + longAtPointerput(localSP, longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))))); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l427; + } + GIV(primFailCode) = 0; + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((0x1F * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + } + l427: /* end case */; + BREAK; + CASE(208) + CASE(209) + CASE(210) + CASE(211) + CASE(212) + CASE(213) + CASE(214) + CASE(215) + CASE(216) + CASE(217) + CASE(218) + CASE(219) + CASE(220) + CASE(221) + CASE(222) + CASE(223) + CASE(384) /*128*/ + CASE(385) /*129*/ + CASE(386) /*130*/ + CASE(387) /*131*/ + CASE(388) /*132*/ + CASE(389) /*133*/ + CASE(390) /*134*/ + CASE(391) /*135*/ + CASE(392) /*136*/ + CASE(393) /*137*/ + CASE(394) /*138*/ + CASE(395) /*139*/ + CASE(396) /*140*/ + CASE(397) /*141*/ + CASE(398) /*142*/ + CASE(399) /*143*/ + /* sendLiteralSelector0ArgsBytecode */ + { + sqInt rcvr; + sqInt tagBits; + + VM_LABEL(sendLiteralSelector0ArgsBytecode); + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(((currentBytecode & 15) + LiteralStart)) << (shiftForWord()))))); + + GIV(argumentCount) = 0; + /* begin internalStackValue: */ + rcvr = longAtPointer(localSP + (0 * BytesPerOop)); + lkupClassTag = (((tagBits = rcvr & (tagMask()))) != 0 + ? ((tagBits & 1) != 0 + ? 1 + : tagBits) + : (longAt(rcvr)) & (classIndexMask())); + assert(lkupClassTag != (nilObject())); + goto commonSendOrdinary; + } + BREAK; + CASE(224) + CASE(225) + CASE(226) + CASE(227) + CASE(228) + CASE(229) + CASE(230) + CASE(231) + CASE(232) + CASE(233) + CASE(234) + CASE(235) + CASE(236) + CASE(237) + CASE(238) + CASE(239) + CASE(400) /*144*/ + CASE(401) /*145*/ + CASE(402) /*146*/ + CASE(403) /*147*/ + CASE(404) /*148*/ + CASE(405) /*149*/ + CASE(406) /*150*/ + CASE(407) /*151*/ + CASE(408) /*152*/ + CASE(409) /*153*/ + CASE(410) /*154*/ + CASE(411) /*155*/ + CASE(412) /*156*/ + CASE(413) /*157*/ + CASE(414) /*158*/ + CASE(415) /*159*/ + /* sendLiteralSelector1ArgBytecode */ + { + sqInt rcvr; + sqInt tagBits; + + VM_LABEL(sendLiteralSelector1ArgBytecode); + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(((currentBytecode & 15) + LiteralStart)) << (shiftForWord()))))); + + GIV(argumentCount) = 1; + /* begin internalStackValue: */ + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + lkupClassTag = (((tagBits = rcvr & (tagMask()))) != 0 + ? ((tagBits & 1) != 0 + ? 1 + : tagBits) + : (longAt(rcvr)) & (classIndexMask())); + assert(lkupClassTag != (nilObject())); + goto commonSendOrdinary; + } + BREAK; + CASE(240) + CASE(241) + CASE(242) + CASE(243) + CASE(244) + CASE(245) + CASE(246) + CASE(247) + CASE(248) + CASE(249) + CASE(250) + CASE(251) + CASE(252) + CASE(253) + CASE(254) + CASE(255) + CASE(416) /*160*/ + CASE(417) /*161*/ + CASE(418) /*162*/ + CASE(419) /*163*/ + CASE(420) /*164*/ + CASE(421) /*165*/ + CASE(422) /*166*/ + CASE(423) /*167*/ + CASE(424) /*168*/ + CASE(425) /*169*/ + CASE(426) /*170*/ + CASE(427) /*171*/ + CASE(428) /*172*/ + CASE(429) /*173*/ + CASE(430) /*174*/ + CASE(431) /*175*/ + /* sendLiteralSelector2ArgsBytecode */ + { + sqInt rcvr; + sqInt tagBits; + + VM_LABEL(sendLiteralSelector2ArgsBytecode); + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)(((currentBytecode & 15) + LiteralStart)) << (shiftForWord()))))); + + GIV(argumentCount) = 2; + /* begin internalStackValue: */ + rcvr = longAtPointer(localSP + (2 * BytesPerOop)); + lkupClassTag = (((tagBits = rcvr & (tagMask()))) != 0 + ? ((tagBits & 1) != 0 + ? 1 + : tagBits) + : (longAt(rcvr)) & (classIndexMask())); + assert(lkupClassTag != (nilObject())); + goto commonSendOrdinary; + } + BREAK; + CASE(338) /*82*/ + /* extPushPseudoVariable */ + { + sqInt objOop; + sqInt objOop1; + sqInt theThingToPush; + + VM_LABEL(extPushPseudoVariable); + + switch (extB) { + case 0: + /* begin ensureFrameIsMarried:SP: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + theThingToPush = longAt(localFP + FoxThisContext); + goto l458; + } + theThingToPush = marryFrameSP(localFP, localSP); + l458: /* end ensureFrameIsMarried:SP: */; + break; + case 1: + /* begin activeProcess */ + objOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SchedulerAssociation) << (shiftForWord()))))); + objOop = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); + theThingToPush = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)(ActiveProcessIndex) << (shiftForWord()))))); + break; + default: + goto respondToUnknownBytecode; + + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), theThingToPush); + extB = 0; + numExtB = 0; + } + BREAK; + CASE(340) /*84*/ + CASE(341) /*85*/ + CASE(342) /*86*/ + CASE(343) /*87*/ + CASE(474) /*218*/ + CASE(475) /*219*/ + CASE(476) /*220*/ + CASE(477) /*221*/ + CASE(478) /*222*/ + CASE(479) /*223*/ + CASE(486) /*230*/ + CASE(492) /*236*/ + CASE(502) /*246*/ + CASE(503) /*247*/ + CASE(511) /*255*/ + /* unknownBytecode */ + { + VM_LABEL(unknownBytecode1); + goto respondToUnknownBytecode; + } + BREAK; + CASE(344) /*88*/ + /* returnReceiver */ + { + VM_LABEL(returnReceiver1); + /* begin receiver */ + localReturnValue = longAt(localFP + FoxReceiver); + goto commonReturn; + } + BREAK; + CASE(349) /*93*/ + /* returnNilFromBlock */ + { + VM_LABEL(returnNilFromBlock); + /* begin nilObject */ + localReturnValue = GIV(nilObj); + goto commonCallerReturn; + } + BREAK; + CASE(350) /*94*/ + /* returnTopFromBlock */ + { + VM_LABEL(returnTopFromBlock1); + /* begin internalStackTop */ + localReturnValue = longAtPointer(localSP); + goto commonCallerReturn; + } + BREAK; + CASE(351) /*95*/ + /* extNopBytecode */ + { + VM_LABEL(extNopBytecode); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + numExtB = (extA = (extB = 0)); + } + BREAK; + CASE(352) /*96*/ + /* bytecodePrimAdd */ + { + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + sqInt result; + double result1; + double result2; + char *sp; + + VM_LABEL(bytecodePrimAdd1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + result = ((rcvr >> 1)) + ((arg >> 1)); + if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l470; + } + } + else { + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveFloatAdd:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l475; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result2); + rcvr1 = result2; + goto l475; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l475: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l471; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l471; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l471: /* end loadFloatOrIntFrom: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr1 + arg1)); + GIV(stackPointer) = sp; + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l470; + } + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((0 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l470: /* end case */; + BREAK; + CASE(353) /*97*/ + /* bytecodePrimSubtract */ + { + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + sqInt result; + double result1; + double result2; + char *sp; + + VM_LABEL(bytecodePrimSubtract1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + result = ((rcvr >> 1)) - ((arg >> 1)); + if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l477; + } + } + else { + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveFloatSubtract:fromArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l482; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result2); + rcvr1 = result2; + goto l482; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l482: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l478; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l478; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l478: /* end loadFloatOrIntFrom: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr1 - arg1)); + GIV(stackPointer) = sp; + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l477; + } + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((1 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l477: /* end case */; + BREAK; + CASE(354) /*98*/ + /* bytecodePrimLessThanSistaV1 */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimLessThanSistaV1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + + /* The C code can avoid detagging since tagged integers are still signed. + But this means the simulator must override to do detagging. */ + /* begin booleanCheatSistaV1: */ + if (rcvr < arg) { + /* goto booleanCheatTrueSistaV1 */ + } + else { + goto booleanCheatFalseSistaV1; + } + goto l484; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatLess:thanArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l486; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l486; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l486: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l489; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l489; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l489: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 < arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheatSistaV1: */ + if (aBool) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l484; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((2 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l484: /* end case */; + + booleanCheatTrueSistaV1: + /* booleanCheatTrueSistaV1 */ + { + sqInt bytecode; + sqInt offset; + + VM_LABEL(booleanCheatTrueSistaV1); + + /* assume next bytecode is jumpIfFalse (99%) */ + bytecode = byteAtPointer(++localIP); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + if (bytecode >= 192) { + if (bytecode <= 199) { + + /* short jumpIfFalse 192 - 199 */ + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l993; + } + if (bytecode == 239) { + + /* long jumpIfFalse */ + byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l993; + } + if (bytecode == 238) { + + /* long jumpIfTrue 238 */ + offset = byteAtPointer(++localIP); + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + goto l993; + } + } + currentBytecode = bytecode + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), GIV(trueObj)); + } + l993: /* end case */; + BREAK; + CASE(355) /*99*/ + /* bytecodePrimGreaterThanSistaV1 */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimGreaterThanSistaV1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + + /* The C code can avoid detagging since tagged integers are still signed. + But this means the simulator must override to do detagging. */ + /* begin booleanCheatSistaV1: */ + if (rcvr > arg) { + goto booleanCheatTrueSistaV1; + } + else { + /* goto booleanCheatFalseSistaV1 */ + } + goto l490; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatGreater:thanArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l492; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l492; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l492: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l495; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l495; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l495: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 > arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheatSistaV1: */ + if (aBool) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l490; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((3 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l490: /* end case */; + + booleanCheatFalseSistaV1: + /* booleanCheatFalseSistaV1 */ + { + sqInt bytecode; + sqInt offset; + + VM_LABEL(booleanCheatFalseSistaV1); + + /* assume next bytecode is jumpIfFalse (99%) */ + bytecode = byteAtPointer(++localIP); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + if ((bytecode < 199) + && (bytecode > 191)) { + + /* short jumpIfFalse */ + /* begin jump: */ + localIP = (localIP + (bytecode - 191)) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + goto l996; + } + if (bytecode == 239) { + + /* long jumpIfFalse */ + offset = byteAtPointer(++localIP); + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + goto l996; + } + currentBytecode = bytecode + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), GIV(falseObj)); + } + l996: /* end case */; + BREAK; + CASE(356) /*100*/ + /* bytecodePrimLessOrEqualSistaV1 */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimLessOrEqualSistaV1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + + /* The C code can avoid detagging since tagged integers are still signed. + But this means the simulator must override to do detagging. */ + /* begin booleanCheatSistaV1: */ + if (rcvr <= arg) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l496; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatLessOrEqual:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l498; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l498; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l498: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l501; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l501; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l501: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 <= arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheatSistaV1: */ + if (aBool) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l496; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((4 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l496: /* end case */; + BREAK; + CASE(357) /*101*/ + /* bytecodePrimGreaterOrEqualSistaV1 */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimGreaterOrEqualSistaV1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + + /* The C code can avoid detagging since tagged integers are still signed. + But this means the simulator must override to do detagging. */ + /* begin booleanCheatSistaV1: */ + if (rcvr >= arg) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l502; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatGreaterOrEqual:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l504; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l504; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l504: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l507; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l507; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l507: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 >= arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheatSistaV1: */ + if (aBool) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l502; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((5 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l502: /* end case */; + BREAK; + CASE(358) /*102*/ + /* bytecodePrimEqualSistaV1 */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimEqualSistaV1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + /* begin booleanCheatSistaV1: */ + if (rcvr == arg) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l508; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatEqual:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l510; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l510; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l510: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l513; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l513; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l513: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 == arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheatSistaV1: */ + if (aBool) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l508; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((6 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l508: /* end case */; + BREAK; + CASE(359) /*103*/ + /* bytecodePrimNotEqualSistaV1 */ + { + sqInt aBool; + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + double result; + double result1; + + VM_LABEL(bytecodePrimNotEqualSistaV1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + /* begin booleanCheatSistaV1: */ + if (rcvr != arg) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l514; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin primitiveFloatEqual:toArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l516; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result); + rcvr1 = result; + goto l516; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l516: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l519; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l519; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l519: /* end loadFloatOrIntFrom: */; + aBool = rcvr1 == arg1; + if (!GIV(primFailCode)) { + /* begin booleanCheatSistaV1: */ + if (!aBool) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + goto l514; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((7 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l514: /* end case */; + BREAK; + CASE(360) /*104*/ + /* bytecodePrimMultiply */ + { + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt oop; + int overflow; + sqInt rcvr; + double rcvr1; + sqInt result; + double result1; + double result2; + char *sp; + + VM_LABEL(bytecodePrimMultiply1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + rcvr = (rcvr >> 1); + arg = (arg >> 1); + overflow = (rcvr > 0 + ? (arg > 0 + ? rcvr > ((MaxSmallInteger) / arg) + : arg < ((MinSmallInteger) / rcvr)) + : (arg > 0 + ? rcvr < ((MinSmallInteger) / arg) + : (rcvr < 0) + && (arg < ((MaxSmallInteger) / rcvr)))); + if (!overflow) { + result = rcvr * arg; + oop = (((usqInt)result << 1) | 1); + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), oop); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l520; + } + } + else { + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveFloatMultiply:byArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l525; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result2); + rcvr1 = result2; + goto l525; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l525: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l521; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l521; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l521: /* end loadFloatOrIntFrom: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr1 * arg1)); + GIV(stackPointer) = sp; + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l520; + } + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((8 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l520: /* end case */; + BREAK; + CASE(361) /*105*/ + /* bytecodePrimDivide */ + { + sqInt arg; + double arg1; + sqInt isFloat; + sqInt isFloat1; + sqInt objOop; + sqInt rcvr; + double rcvr1; + sqInt result; + double result1; + double result2; + char *sp; + + VM_LABEL(bytecodePrimDivide1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & arg) & 1) != 0) { + rcvr = (rcvr >> 1); + arg = (arg >> 1); + if ((arg != 0) + && ((rcvr % arg) == 0)) { + + /* generates C / operation */ + result = rcvr / arg; + if ((((sqInt)((((usqInt)result)) ^ ((((usqInt)result)) << 1)))) >= 0) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)result << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l527; + } + } + } + else { + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveFloatDivide:byArg: */ + if ((rcvr & 1)) { + rcvr1 = ((double) ((rcvr >> 1)) ); + goto l532; + } + /* begin floatValueOf: */ + isFloat = ((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvr + BaseHeaderSize, result2); + rcvr1 = result2; + goto l532; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr1 = 0.0; + l532: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((arg & 1)) { + arg1 = ((double) ((arg >> 1)) ); + goto l528; + } + /* begin floatValueOf: */ + isFloat1 = ((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(arg + BaseHeaderSize, result1); + arg1 = result1; + goto l528; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg1 = 0.0; + l528: /* end loadFloatOrIntFrom: */; + /* begin success: */ + if (!(arg1 != 0.0)) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr1 / arg1)); + GIV(stackPointer) = sp; + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l527; + } + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((9 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l527: /* end case */; + BREAK; + CASE(362) /*106*/ + /* bytecodePrimMod */ + { + sqInt mod; + sqInt objOop; + + VM_LABEL(bytecodePrimMod1); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + mod = doPrimitiveModby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); + if (!GIV(primFailCode)) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)mod << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l534; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((10 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l534: /* end case */; + BREAK; + CASE(363) /*107*/ + /* bytecodePrimMakePoint */ + { + sqInt objOop; + + VM_LABEL(bytecodePrimMakePoint1); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + primitiveMakePoint(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l538; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((11 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l538: /* end case */; + BREAK; + CASE(364) /*108*/ + /* bytecodePrimBitShift */ + { + sqInt integerArgument; + sqInt integerReceiver; + usqInt newLargeInteger; + usqInt newObj; + usqInt numBytes; + sqInt objFormat; + sqInt objOop; + sqInt shifted; + char *sp; + sqInt valueWord; + + VM_LABEL(bytecodePrimBitShift1); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin primitiveBitShift */ + integerArgument = longAt(GIV(stackPointer)); + if (!((integerArgument & 1))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l549; + } + integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + integerReceiver = positive32BitValueOf(integerReceiver); + + if (!GIV(primFailCode)) { + if (((integerArgument = (integerArgument >> 1))) >= 0) { + + /* Left shift -- must fail bits would be lost */ + if (!(integerArgument <= 0x1F)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l549; + } + shifted = ((sqInt)((usqInt)(integerReceiver) << integerArgument)); + if (!(integerReceiver == (((usqInt) shifted) >> integerArgument))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l549; + } + } + else { + + /* Right shift -- OK to lose bits */ + if (!(integerArgument >= (-0x1F))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l549; + } + shifted = ((usqInt) integerReceiver) >> (0 - integerArgument); + } + /* begin positive32BitIntegerFor: */ + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { + shifted = (((usqInt)shifted << 1) | 1); + goto l550; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l544; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; + l544: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN(shifted); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + shifted = newLargeInteger; + goto l550; + + l550: /* end positive32BitIntegerFor: */; + + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), shifted); + GIV(stackPointer) = sp; + } + l549: /* end primitiveBitShift */; + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l542; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((12 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l542: /* end case */; + BREAK; + CASE(365) /*109*/ + /* bytecodePrimDiv */ + { + sqInt objOop; + sqInt quotient; + + VM_LABEL(bytecodePrimDiv1); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + quotient = doPrimitiveDivby(longAtPointer(localSP + (1 * BytesPerOop)), longAtPointer(localSP + (0 * BytesPerOop))); + if (!GIV(primFailCode)) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), (((usqInt)quotient << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l552; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((13 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l552: /* end case */; + BREAK; + CASE(366) /*110*/ + /* bytecodePrimBitAnd */ + { + sqInt arg; + sqInt objOop; + sqInt rcvr; + + VM_LABEL(bytecodePrimBitAnd1); + arg = longAtPointer(localSP); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + if (((arg & 1)) + && ((rcvr & 1))) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), arg & rcvr); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l556; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + primitiveBitAnd(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l556; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((14 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l556: /* end case */; + BREAK; + CASE(367) /*111*/ + /* bytecodePrimBitOr */ + { + sqInt arg; + sqInt objOop; + sqInt rcvr; + + VM_LABEL(bytecodePrimBitOr1); + arg = longAtPointer(localSP); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + if (((arg & 1)) + && ((rcvr & 1))) { + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), arg | rcvr); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l561; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + primitiveBitOr(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l561; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((15 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l561: /* end case */; + BREAK; + CASE(368) /*112*/ + /* bytecodePrimAt */ + { + sqInt atIx; + sqInt class; + sqInt classFormat; + sqInt fixedFields; + sqInt fixedFields1; + sqInt fixedFields2; + usqLong fmt; + usqLong fmt1; + sqInt fmt2; + sqLong hdr; + sqLong hdr1; + sqInt index; + sqInt index1; + usqInt newLargeInteger; + usqInt newObj; + usqInt numBytes; + usqInt numSlots11; + usqInt numSlots12; + usqInt numSlots2; + usqInt numSlots3; + sqInt objFormat; + sqInt objOop; + sqInt objOop1; + sqInt rcvr; + sqInt reasonCode; + sqInt result; + usqInt result1; + sqInt stSize; + sqInt totalLength; + sqInt totalLength1; + sqInt valueWord; + + VM_LABEL(bytecodePrimAt1); + result = 0; + index = longAtPointer(localSP); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + if (((rcvr & (tagMask())) == 0) + && ((index & 1))) { + + /* Index into atCache = 4N, for N = 0 ... 7 */ + atIx = rcvr & AtCacheMask; + if ((GIV(atCache)[atIx + AtCacheOop]) != rcvr) { + /* begin fetchClassTagOfNonImm: */ + lkupClassTag = (longAt(rcvr)) & (classIndexMask()); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((16 * 2)) << (shiftForWord()))))); + if (!(lookupInMethodCacheSelclassTag(GIV(messageSelector), lkupClassTag))) { + GIV(argumentCount) = 1; + goto commonSendOrdinary; + goto l566; + } + if (primitiveFunctionPointer == primitiveAt) { + /* begin install:inAtCache:at:string: */ + assert(!(isContext(rcvr))); + /* begin baseHeader: */ + hdr = long64At(rcvr); + + /* For now the AtCache code doesn't support 16-bit indexability. */ + fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); + if (((fmt >= (firstShortFormat())) && (fmt <= ((firstByteFormat()) - 1)))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l581; + } + if ((fmt == (indexablePointersFormat())) + && ((hdr & (classIndexMask())) == ClassMethodContextCompactIndex)) { + + /* Contexts must not be put in the atCache, since their size is not constant */ + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadReceiver; + goto l581; + } + /* begin lengthOf:format: */ + numSlots11 = byteAt(rcvr + 7); + numSlots2 = (numSlots11 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots11); + if (fmt <= 5) { + totalLength = numSlots2; + goto l578; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength = (numSlots2 << (shiftForWord())) - (fmt & 7); + goto l578; + } + if (fmt >= (firstShortFormat())) { + totalLength = (numSlots2 << ((shiftForWord()) - 1)) - (fmt & 3); + goto l578; + } + if (fmt >= (firstLongFormat())) { + totalLength = (numSlots2 << ((shiftForWord()) - 2)) - (fmt & 1); + goto l578; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + totalLength = ((usqInt) numSlots2) >> 1; + goto l578; + } + totalLength = 0; + l578: /* end lengthOf:format: */; + /* begin fixedFieldsOf:format:length: */ + if ((fmt >= (sixtyFourBitIndexableFormat())) + || (fmt == 2)) { + fixedFields = 0; + goto l574; + } + if (fmt < 2) { + fixedFields = totalLength; + goto l574; + } + class = fetchClassOfNonImm(rcvr); + /* begin fixedFieldsOfClassFormat: */ + classFormat = ((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1); + fixedFields = classFormat & ((1U << (fixedFieldsFieldWidth())) - 1); + l574: /* end fixedFieldsOf:format:length: */; + + GIV(atCache)[atIx + AtCacheOop] = rcvr; + GIV(atCache)[atIx + AtCacheFmt] = fmt; + GIV(atCache)[atIx + AtCacheFixedFields] = fixedFields; + GIV(atCache)[atIx + AtCacheSize] = (totalLength - fixedFields); + l581: /* end install:inAtCache:at:string: */; + } + else { + if (primitiveFunctionPointer == primitiveStringAt) { + /* begin install:inAtCache:at:string: */ + assert(!(isContext(rcvr))); + /* begin baseHeader: */ + hdr1 = long64At(rcvr); + + /* For now the AtCache code doesn't support 16-bit indexability. */ + fmt1 = (((unsigned sqLong)hdr1) >> (formatShift())) & (formatMask()); + if (((fmt1 >= (firstShortFormat())) && (fmt1 <= ((firstByteFormat()) - 1)))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l576; + } + /* begin lengthOf:format: */ + numSlots12 = byteAt(rcvr + 7); + numSlots3 = (numSlots12 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots12); + if (fmt1 <= 5) { + totalLength1 = numSlots3; + goto l591; + } + if (fmt1 >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength1 = (numSlots3 << (shiftForWord())) - (fmt1 & 7); + goto l591; + } + if (fmt1 >= (firstShortFormat())) { + totalLength1 = (numSlots3 << ((shiftForWord()) - 1)) - (fmt1 & 3); + goto l591; + } + if (fmt1 >= (firstLongFormat())) { + totalLength1 = (numSlots3 << ((shiftForWord()) - 2)) - (fmt1 & 1); + goto l591; + } + if (fmt1 == (sixtyFourBitIndexableFormat())) { + totalLength1 = ((usqInt) numSlots3) >> 1; + goto l591; + } + totalLength1 = 0; + l591: /* end lengthOf:format: */; + fixedFields1 = 0; + + /* special flag for strings */ + fmt1 += 32; + + GIV(atCache)[atIx + AtCacheOop] = rcvr; + GIV(atCache)[atIx + AtCacheFmt] = fmt1; + GIV(atCache)[atIx + AtCacheFixedFields] = fixedFields1; + GIV(atCache)[atIx + AtCacheSize] = (totalLength1 - fixedFields1); + l576: /* end install:inAtCache:at:string: */; + } + else { + GIV(argumentCount) = 1; + goto commonSendOrdinary; + goto l566; + } + } + } + if (!GIV(primFailCode)) { + /* begin commonVariable:at:cacheIndex: */ + index1 = (index >> 1); + stSize = GIV(atCache)[atIx + AtCacheSize]; + if ((oopisGreaterThanOrEqualTo(index1, 1)) + && (oopisLessThanOrEqualTo(index1, stSize))) { + fmt2 = GIV(atCache)[atIx + AtCacheFmt]; + if (fmt2 <= (weakArrayFormat())) { + assert(!(isContextNonImm(rcvr))); + fixedFields2 = GIV(atCache)[atIx + AtCacheFixedFields]; + /* begin fetchPointer:ofObject: */ + result = longAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index1 + fixedFields2) - 1)) << (shiftForWord()))))); + goto l590; + } + if (fmt2 < (firstByteFormat())) { + + /* 64, 32, & 16 bits */ + if (fmt2 >= (firstShortFormat())) { + result = (((usqInt)(((unsigned short) (shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))))))) << 1) | 1); + goto l590; + } + if (fmt2 == (sixtyFourBitIndexableFormat())) { + result = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 3))))); + goto l590; + } + + /* begin fetchLong32:ofObject: */ + result1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))))); + /* begin positive32BitIntegerFor: */ + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) result1)) <= (MaxSmallInteger)) { + result = ((result1 << 1) | 1); + goto l590; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l596; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; + l596: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN(result1); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + result = newLargeInteger; + goto l590; + + } + if (fmt2 >= 32) { + + /* Note fmt >= firstStringyFormat is an artificial flag for strings */ + /* String */ + /* Spur supports the String at:[put:] primitives on WideString and DoubleByteString */ + if (fmt2 < ((firstByteFormat()) + 32)) { + if (fmt2 < ((firstShortFormat()) + 32)) { + /* begin fetchLong32:ofObject: */ + result1 = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2)))); + } + else { + /* begin fetchUnsignedShort16:ofObject: */ + result1 = ((unsigned short) (shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1)))))); + } + } + else { + /* begin fetchByte:ofObject: */ + result1 = byteAt((rcvr + BaseHeaderSize) + (index1 - 1)); + } + /* begin characterForAscii: */ + result = (result1 << (numTagBits())) + (characterTag()); + + goto l590; + } + else { + if ((fmt2 < (firstCompiledMethodFormat())) + || (index1 >= ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + (index1 - 1))) << 1) | 1); + goto l590; + } + } + } + /* begin primitiveFailFor: */ + reasonCode = (isIndexable(rcvr) + ? PrimErrBadIndex + : PrimErrBadReceiver); + result = (GIV(primFailCode) = reasonCode); + l590: /* end commonVariable:at:cacheIndex: */; + } + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (2 - 1) * BytesPerOop), result); + goto l566; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + } + /* begin fetchPointer:ofObject: */ + objOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)((16 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 1; + goto normalSend; + } + l566: /* end case */; + BREAK; + CASE(369) /*113*/ + /* bytecodePrimAtPut */ + { + sqInt atIx; + sqInt class; + sqInt classFormat; + sqInt correctRcvr; + sqInt fixedFields; + sqInt fixedFields1; + sqInt fixedFields2; + usqLong fmt; + usqLong fmt1; + sqInt fmt2; + sqLong hdr; + sqLong hdr1; + sqInt index; + sqInt index1; + sqInt isCharacter; + usqInt numSlots11; + usqInt numSlots12; + usqInt numSlots2; + usqInt numSlots3; + sqInt objOop; + sqInt objOop1; + sqInt rcvr; + sqInt reasonCode; + sqInt stSize; + sqInt totalLength; + sqInt totalLength1; + usqLong val64ToPut; + int valToPut; + sqInt value; + + VM_LABEL(bytecodePrimAtPut1); + value = longAtPointer(localSP); + index = longAtPointer(localSP + (1 * BytesPerOop)); + rcvr = longAtPointer(localSP + (2 * BytesPerOop)); + +# if IMMUTABILITY + /* begin isOopMutable: */ + correctRcvr = ((rcvr & (tagMask())) == 0) + && (!(((((usqInt) (longAt(rcvr))) >> (immutableBitShift())) & 1) != 0)); + +# else /* IMMUTABILITY */ + /* begin isNonImmediate: */ + correctRcvr = (rcvr & (tagMask())) == 0; + +# endif /* IMMUTABILITY */ + + if (correctRcvr + && ((index & 1))) { + + /* Index into atPutCache */ + atIx = (rcvr & AtCacheMask) + AtPutBase; + if ((GIV(atCache)[atIx + AtCacheOop]) != rcvr) { + /* begin fetchClassTagOfNonImm: */ + lkupClassTag = (longAt(rcvr)) & (classIndexMask()); + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((17 * 2)) << (shiftForWord()))))); + if (!(lookupInMethodCacheSelclassTag(GIV(messageSelector), lkupClassTag))) { + GIV(argumentCount) = 2; + goto commonSendOrdinary; + goto l598; + } + if (primitiveFunctionPointer == primitiveAtPut) { + /* begin install:inAtCache:at:string: */ + assert(!(isContext(rcvr))); + /* begin baseHeader: */ + hdr = long64At(rcvr); + + /* For now the AtCache code doesn't support 16-bit indexability. */ + fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); + if (((fmt >= (firstShortFormat())) && (fmt <= ((firstByteFormat()) - 1)))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l628; + } + if ((fmt == (indexablePointersFormat())) + && ((hdr & (classIndexMask())) == ClassMethodContextCompactIndex)) { + + /* Contexts must not be put in the atCache, since their size is not constant */ + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadReceiver; + goto l628; + } + /* begin lengthOf:format: */ + numSlots11 = byteAt(rcvr + 7); + numSlots2 = (numSlots11 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots11); + if (fmt <= 5) { + totalLength = numSlots2; + goto l637; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength = (numSlots2 << (shiftForWord())) - (fmt & 7); + goto l637; + } + if (fmt >= (firstShortFormat())) { + totalLength = (numSlots2 << ((shiftForWord()) - 1)) - (fmt & 3); + goto l637; + } + if (fmt >= (firstLongFormat())) { + totalLength = (numSlots2 << ((shiftForWord()) - 2)) - (fmt & 1); + goto l637; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + totalLength = ((usqInt) numSlots2) >> 1; + goto l637; + } + totalLength = 0; + l637: /* end lengthOf:format: */; + /* begin fixedFieldsOf:format:length: */ + if ((fmt >= (sixtyFourBitIndexableFormat())) + || (fmt == 2)) { + fixedFields = 0; + goto l621; + } + if (fmt < 2) { + fixedFields = totalLength; + goto l621; + } + class = fetchClassOfNonImm(rcvr); + /* begin fixedFieldsOfClassFormat: */ + classFormat = ((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1); + fixedFields = classFormat & ((1U << (fixedFieldsFieldWidth())) - 1); + l621: /* end fixedFieldsOf:format:length: */; + + GIV(atCache)[atIx + AtCacheOop] = rcvr; + GIV(atCache)[atIx + AtCacheFmt] = fmt; + GIV(atCache)[atIx + AtCacheFixedFields] = fixedFields; + GIV(atCache)[atIx + AtCacheSize] = (totalLength - fixedFields); + l628: /* end install:inAtCache:at:string: */; + } + else { + if (primitiveFunctionPointer == primitiveStringAtPut) { + /* begin install:inAtCache:at:string: */ + assert(!(isContext(rcvr))); + /* begin baseHeader: */ + hdr1 = long64At(rcvr); + + /* For now the AtCache code doesn't support 16-bit indexability. */ + fmt1 = (((unsigned sqLong)hdr1) >> (formatShift())) & (formatMask()); + if (((fmt1 >= (firstShortFormat())) && (fmt1 <= ((firstByteFormat()) - 1)))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l630; + } + /* begin lengthOf:format: */ + numSlots12 = byteAt(rcvr + 7); + numSlots3 = (numSlots12 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots12); + if (fmt1 <= 5) { + totalLength1 = numSlots3; + goto l636; + } + if (fmt1 >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength1 = (numSlots3 << (shiftForWord())) - (fmt1 & 7); + goto l636; + } + if (fmt1 >= (firstShortFormat())) { + totalLength1 = (numSlots3 << ((shiftForWord()) - 1)) - (fmt1 & 3); + goto l636; + } + if (fmt1 >= (firstLongFormat())) { + totalLength1 = (numSlots3 << ((shiftForWord()) - 2)) - (fmt1 & 1); + goto l636; + } + if (fmt1 == (sixtyFourBitIndexableFormat())) { + totalLength1 = ((usqInt) numSlots3) >> 1; + goto l636; + } + totalLength1 = 0; + l636: /* end lengthOf:format: */; + fixedFields1 = 0; + + /* special flag for strings */ + fmt1 += 32; + + GIV(atCache)[atIx + AtCacheOop] = rcvr; + GIV(atCache)[atIx + AtCacheFmt] = fmt1; + GIV(atCache)[atIx + AtCacheFixedFields] = fixedFields1; + GIV(atCache)[atIx + AtCacheSize] = (totalLength1 - fixedFields1); + l630: /* end install:inAtCache:at:string: */; + } + else { + GIV(argumentCount) = 2; + goto commonSendOrdinary; + goto l598; + } + } + } + if (!GIV(primFailCode)) { + /* begin commonVariable:at:put:cacheIndex: */ + index1 = (index >> 1); + stSize = GIV(atCache)[atIx + AtCacheSize]; + if ((oopisGreaterThanOrEqualTo(index1, 1)) + && (oopisLessThanOrEqualTo(index1, stSize))) { + fmt2 = GIV(atCache)[atIx + AtCacheFmt]; + if (fmt2 <= (weakArrayFormat())) { + assert(!(isContextNonImm(rcvr))); + fixedFields2 = GIV(atCache)[atIx + AtCacheFixedFields]; + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rcvr))); + if ((assert(isNonImmediate(rcvr)), + oopisGreaterThanOrEqualTo(rcvr, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(rcvr))) >> (rememberedBitShift())) & 1) != 0)) { + remember(rcvr); + } + } + } + longAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index1 + fixedFields2) - 1)) << (shiftForWord())))), value); + goto l607; + } + if (fmt2 < (firstByteFormat())) { + + /* 64, 32, & 16 bits */ + if (fmt2 >= (firstShortFormat())) { + valToPut = ((value & 1) + ? (value >> 1) + : -1); + if (!((valToPut >= 0) + && (valToPut <= 0xFFFF))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l607; + } + /* begin storeShort16:ofObject:withValue: */ + shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))), valToPut); + goto l607; + } + if (fmt2 == (sixtyFourBitIndexableFormat())) { + val64ToPut = positive64BitValueOf(value); + if (!GIV(primFailCode)) { + /* begin storeLong64:ofObject:withValue: */ + long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 3))), val64ToPut); + goto l607; + } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l607; + } + + valToPut = positive32BitValueOf(value); + if (!GIV(primFailCode)) { + /* begin storeLong32:ofObject:withValue: */ + long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2))), valToPut); + goto l607; + } + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l607; + } + if (fmt2 >= 32) { + + /* Note fmt >= firstStringyFormat is an artificial flag for strings */ + /* begin isCharacterObject: */ + isCharacter = (value & (tagMask())) == (characterTag()); + if (!isCharacter) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l607; + } + /* begin characterValueOf: */ + valToPut = ((usqInt) (((usqInt)value))) >> (numTagBits()); + + if (fmt2 < ((firstByteFormat()) + 32)) { + if (fmt2 < ((firstShortFormat()) + 32)) { + assert(fmt2 != ((sixtyFourBitIndexableFormat()) + (firstStringyFakeFormat()))); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 2))), valToPut); + goto l607; + } + else { + if (!((valToPut >= 0) + && (valToPut <= 0xFFFF))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l607; + } + /* begin storeShort16:ofObject:withValue: */ + shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)((index1 - 1)) << 1))), valToPut); + goto l607; + } + } + + } + else { + if ((fmt2 >= (firstCompiledMethodFormat())) + && (index1 < ((((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadIndex; + goto l607; + } + valToPut = ((value & 1) + ? (value >> 1) + : -1); + } + if (!((valToPut >= 0) + && (valToPut <= 0xFF))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l607; + } + /* begin storeByte:ofObject:withValue: */ + byteAtput((rcvr + BaseHeaderSize) + (index1 - 1), valToPut); + goto l607; + } + /* begin primitiveFailFor: */ + reasonCode = (isIndexable(rcvr) + ? PrimErrBadIndex + : PrimErrBadReceiver); + GIV(primFailCode) = reasonCode; + /* return self */ + l607: /* end commonVariable:at:put:cacheIndex: */; + } + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPop:thenPush: */ + longAtPointerput((localSP += (3 - 1) * BytesPerOop), value); + goto l598; + } + /* begin initPrimCall */ + GIV(primFailCode) = 0; + } + /* begin fetchPointer:ofObject: */ + objOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)((17 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + } + l598: /* end case */; + BREAK; + CASE(370) /*114*/ + /* bytecodePrimSize */ + { + sqInt ccIndex; + sqInt ccIndex1; + sqInt classOop; + sqInt classOop1; + sqInt fmt; + sqInt fmt1; + sqInt isArray; + sqInt isString; + usqInt numSlots; + usqInt numSlots1; + usqInt numSlots11; + usqInt numSlots2; + sqInt objOop; + sqInt rcvr; + sqInt sz; + + VM_LABEL(bytecodePrimSize1); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + + /* Shortcut the mega-lookup for ByteString and Array, the two big consumers of cycles + here. Both of these have compact class indices and neither has any added fields. */ + rcvr = longAtPointer(localSP); + /* begin is:instanceOf:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassByteString) << (shiftForWord()))))); + if (rcvr & (tagMask())) { + isString = 0; + goto l651; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(rcvr))); + /* begin classIndexOf: */ + ccIndex = (longAt(rcvr)) & (classIndexMask()); + isString = ClassByteStringCompactIndex == ccIndex; + goto l651; + + l651: /* end is:instanceOf:compactClassIndex: */; + if (isString) { + /* begin lengthOf:format: */ + fmt = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOfAny: */ + numSlots1 = byteAt(rcvr + 7); + numSlots = (numSlots1 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots1); + if (fmt <= 5) { + sz = numSlots; + goto l653; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + sz = (numSlots << (shiftForWord())) - (fmt & 7); + goto l653; + } + if (fmt >= (firstShortFormat())) { + sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); + goto l653; + } + if (fmt >= (firstLongFormat())) { + sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); + goto l653; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + sz = ((usqInt) numSlots) >> 1; + goto l653; + } + sz = 0; + l653: /* end lengthOf:format: */; + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l642; + } + /* begin is:instanceOf:compactClassIndex: */ + classOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))); + if (rcvr & (tagMask())) { + isArray = 0; + goto l654; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(rcvr))); + /* begin classIndexOf: */ + ccIndex1 = (longAt(rcvr)) & (classIndexMask()); + isArray = ClassArrayCompactIndex == ccIndex1; + goto l654; + + l654: /* end is:instanceOf:compactClassIndex: */; + if (isArray) { + /* begin lengthOf:format: */ + fmt1 = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOfAny: */ + numSlots11 = byteAt(rcvr + 7); + numSlots2 = (numSlots11 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots11); + if (fmt1 <= 5) { + sz = numSlots2; + goto l652; + } + if (fmt1 >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + sz = (numSlots2 << (shiftForWord())) - (fmt1 & 7); + goto l652; + } + if (fmt1 >= (firstShortFormat())) { + sz = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); + goto l652; + } + if (fmt1 >= (firstLongFormat())) { + sz = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); + goto l652; + } + if (fmt1 == (sixtyFourBitIndexableFormat())) { + sz = ((usqInt) numSlots2) >> 1; + goto l652; + } + sz = 0; + l652: /* end lengthOf:format: */; + longAtPointerput(localSP, (((usqInt)sz << 1) | 1)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l642; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((18 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + } + l642: /* end case */; + BREAK; + CASE(374) /*118*/ + /* bytecodePrimIdenticalSistaV1 */ + { + sqInt arg; + sqInt rcvr; + + VM_LABEL(bytecodePrimIdenticalSistaV1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + rcvr = handleSpecialSelectorSendFaultForfpsp(rcvr, localFP, localSP); + } + if (((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + arg = handleSpecialSelectorSendFaultForfpsp(arg, localFP, localSP); + } + /* begin booleanCheatSistaV1: */ + if (rcvr == arg) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + } + BREAK; + CASE(376) /*120*/ + /* bytecodePrimNotIdenticalSistaV1 */ + { + sqInt arg; + sqInt rcvr; + + VM_LABEL(bytecodePrimNotIdenticalSistaV1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + arg = longAtPointer(localSP + (0 * BytesPerOop)); + if (((rcvr & (tagMask())) == 0) + && (((longAt(rcvr)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + rcvr = handleSpecialSelectorSendFaultForfpsp(rcvr, localFP, localSP); + } + if (((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + arg = handleSpecialSelectorSendFaultForfpsp(arg, localFP, localSP); + } + /* begin booleanCheatSistaV1: */ + if (rcvr != arg) { + goto booleanCheatTrueSistaV1; + } + else { + goto booleanCheatFalseSistaV1; + } + } + BREAK; + CASE(377) /*121*/ + /* bytecodePrimValue */ + { + sqInt ccIndex; + sqInt classOop; + sqInt isBlock; + sqInt objOop; + sqInt rcvr; + + VM_LABEL(bytecodePrimValue1); + rcvr = longAtPointer(localSP); + GIV(argumentCount) = 0; + /* begin is:instanceOf:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))); + if (rcvr & (tagMask())) { + isBlock = 0; + goto l665; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(rcvr))); + /* begin classIndexOf: */ + ccIndex = (longAt(rcvr)) & (classIndexMask()); + isBlock = ClassBlockClosureCompactIndex == ccIndex; + goto l665; + + l665: /* end is:instanceOf:compactClassIndex: */; + if (isBlock) { + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin initPrimCall */ + GIV(primFailCode) = 0; + primitiveClosureValue(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l663; + } + GIV(primFailCode) = 0; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((25 * 2)) << (shiftForWord()))))); + goto normalSend; + } + l663: /* end case */; + BREAK; + CASE(378) /*122*/ + /* bytecodePrimValueWithArg */ + { + sqInt ccIndex; + sqInt classOop; + sqInt isBlock; + sqInt objOop; + sqInt rcvr; + + VM_LABEL(bytecodePrimValueWithArg1); + rcvr = longAtPointer(localSP + (1 * BytesPerOop)); + GIV(argumentCount) = 1; + /* begin is:instanceOf:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassBlockClosure) << (shiftForWord()))))); + if (rcvr & (tagMask())) { + isBlock = 0; + goto l671; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(rcvr))); + /* begin classIndexOf: */ + ccIndex = (longAt(rcvr)) & (classIndexMask()); + isBlock = ClassBlockClosureCompactIndex == ccIndex; + goto l671; + + l671: /* end is:instanceOf:compactClassIndex: */; + if (isBlock) { + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin initPrimCall */ + GIV(primFailCode) = 0; + primitiveClosureValue(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + if (!GIV(primFailCode)) { + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l669; + } + GIV(primFailCode) = 0; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((26 * 2)) << (shiftForWord()))))); + goto normalSend; + } + l669: /* end case */; + BREAK; + CASE(382) /*126*/ + /* bytecodePrimPointX */ + { + sqInt classOop; + sqInt objOop; + sqInt ok; + sqInt rcvr; + + VM_LABEL(bytecodePrimPointX1); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + rcvr = longAtPointer(localSP); + /* begin assertClassOf:is: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); + /* begin isNonImmediate: */ + ok = (rcvr & (tagMask())) == 0; + if (ok) { + /* begin isClassOfNonImm:equalTo: */ + assert(isNonImmediate(rcvr)); + ok = ((longAt(rcvr)) & (classIndexMask())) == ((long32At(classOop + 4)) & (identityHashHalfWordMask())); + } + /* begin success: */ + if (!ok) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + /* begin internalStackTopPut: */ + longAtPointerput(localSP, longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(XIndex) << (shiftForWord())))))); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l681; + } + GIV(primFailCode) = 0; + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((30 * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + } + l681: /* end case */; + BREAK; + CASE(383) /*127*/ + /* bytecodePrimPointY */ + { + sqInt classOop; + sqInt objOop; + sqInt ok; + sqInt rcvr; + + VM_LABEL(bytecodePrimPointY1); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + rcvr = longAtPointer(localSP); + /* begin assertClassOf:is: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); + /* begin isNonImmediate: */ + ok = (rcvr & (tagMask())) == 0; + if (ok) { + /* begin isClassOfNonImm:equalTo: */ + assert(isNonImmediate(rcvr)); + ok = ((longAt(rcvr)) & (classIndexMask())) == ((long32At(classOop + 4)) & (identityHashHalfWordMask())); + } + /* begin success: */ + if (!ok) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + /* begin internalStackTopPut: */ + longAtPointerput(localSP, longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(YIndex) << (shiftForWord())))))); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l689; + } + GIV(primFailCode) = 0; + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SpecialSelectors) << (shiftForWord()))))); + GIV(messageSelector) = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)((0x1F * 2)) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + } + l689: /* end case */; + BREAK; + CASE(440) /*184*/ + CASE(441) /*185*/ + CASE(442) /*186*/ + CASE(443) /*187*/ + CASE(444) /*188*/ + CASE(445) /*189*/ + CASE(446) /*190*/ + CASE(447) /*191*/ + /* shortConditionalJumpTrue */ + { + sqInt boolean; + sqInt offset; + + VM_LABEL(shortConditionalJumpTrue); + /* begin jumplfTrueBy: */ + offset = (currentBytecode & 7) + 1; + /* begin internalStackTop */ + boolean = longAtPointer(localSP); + if (boolean == GIV(trueObj)) { + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + else { + if (!(boolean == GIV(falseObj))) { + /* begin internalMustBeBoolean */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + goto l705; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + l705: /* end jumplfTrueBy: */; + } + BREAK; + CASE(448) /*192*/ + CASE(449) /*193*/ + CASE(450) /*194*/ + CASE(451) /*195*/ + CASE(452) /*196*/ + CASE(453) /*197*/ + CASE(454) /*198*/ + CASE(455) /*199*/ + /* shortConditionalJumpFalse */ + { + sqInt boolean; + sqInt offset; + + VM_LABEL(shortConditionalJumpFalse1); + /* begin jumplfFalseBy: */ + offset = (currentBytecode & 7) + 1; + /* begin internalStackTop */ + boolean = longAtPointer(localSP); + if (boolean == GIV(falseObj)) { + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + else { + if (!(boolean == GIV(trueObj))) { + /* begin internalMustBeBoolean */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + goto l709; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + l709: /* end jumplfFalseBy: */; + } + BREAK; + CASE(456) /*200*/ + CASE(457) /*201*/ + CASE(458) /*202*/ + CASE(459) /*203*/ + CASE(460) /*204*/ + CASE(461) /*205*/ + CASE(462) /*206*/ + CASE(463) /*207*/ + /* storeAndPopReceiverVariableBytecode */ + { + sqInt instVarIndex; + sqInt rcvr; + sqInt top; + + VM_LABEL(storeAndPopReceiverVariableBytecode1); + /* begin receiver */ + rcvr = longAt(localFP + FoxReceiver); + /* begin internalStackTop */ + top = longAtPointer(localSP); + instVarIndex = currentBytecode & 7; + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(rcvr)))); + if (((((usqInt) (longAt(rcvr))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), rcvr); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), top); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(instVarIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l711; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rcvr))); + if ((assert(isNonImmediate(rcvr)), + oopisGreaterThanOrEqualTo(rcvr, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((top & (tagMask())) == 0) + && (oopisLessThan(top, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(rcvr))) >> (rememberedBitShift())) & 1) != 0)) { + remember(rcvr); + } + } + } + longAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(instVarIndex) << (shiftForWord())))), top); + l711: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(473) /*217*/ + /* unconditionnalTrapBytecode */ + { + VM_LABEL(unconditionnalTrapBytecode); + + respondToSistaTrap: + /* respondToSistaTrap */ + { + sqInt ourContext; + + VM_LABEL(respondToSistaTrap); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorSistaTrap) << (shiftForWord()))))); + /* begin ensureFrameIsMarried:SP: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + ourContext = longAt(localFP + FoxThisContext); + goto l998; + } + ourContext = marryFrameSP(localFP, localSP); + l998: /* end ensureFrameIsMarried:SP: */; + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), ourContext); + GIV(argumentCount) = 0; + goto normalSend; + } + goto l719; + + } + l719: /* end case */; + BREAK; + CASE(480) /*224*/ + /* extABytecode */ + { + VM_LABEL(extABytecode); + extA = (((usqInt) extA << 8)) + (byteAtPointer(++localIP)); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(481) /*225*/ + /* extBBytecode */ + { + sqInt byte; + + VM_LABEL(extBBytecode); + byte = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + extB = ((numExtB == 0) + && (byte > 0x7F) + ? byte - 256 + : (((usqInt) extB << 8)) + byte); + numExtB += 1; + } + BREAK; + CASE(482) /*226*/ + /* extPushReceiverVariableBytecode */ + { + char *callerFP; + sqInt index; + sqInt obj; + sqInt object; + sqInt object1; + sqInt senderOop; + char *spouseFP; + + VM_LABEL(extPushReceiverVariableBytecode); + index = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extA) << 8))); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + extA = 0; + /* begin pushMaybeContextReceiverVariable: */ + obj = longAt(localFP + FoxReceiver); + if ((index <= StackPointerIndex) + && (((longAt(obj)) & (classIndexMask())) == ClassMethodContextCompactIndex)) { + /* begin internalPush: */ + assert(index < MethodIndex); + assert(isContext(obj)); + if (!(((longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1))) { + /* begin fetchPointer:ofObject: */ + object = longAt((obj + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); + goto l722; + } + /* begin writeBackHeadFramePointers */ + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + /* begin setHeadFP:andSP:inPage: */ + assert(localSP < localFP); + assert((localSP < ((GIV(stackPage)->baseAddress))) + && (localSP > (((GIV(stackPage)->realStackLimit)) - (LargeContextSlots * BytesPerOop)))); + assert((localFP < ((GIV(stackPage)->baseAddress))) + && (localFP > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); + (GIV(stackPage)->headFP = localFP); + (GIV(stackPage)->headSP = localSP); + assert(pageListIsWellFormed()); + if (isWidowedContext(obj)) { + /* begin fetchPointer:ofObject: */ + object = longAt((obj + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); + goto l722; + } + /* begin frameOfMarriedContext: */ + senderOop = longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop & 1)); + spouseFP = pointerForOop(senderOop - 1); + + if (index == SenderIndex) { + /* begin ensureCallerContext: */ + callerFP = pointerForOop(longAt(spouseFP + FoxSavedFP)); + if (callerFP == 0) { + + /* base frame, context in saved ip slot (or base of stack in Cog) */ + object = longAt(spouseFP + FoxCallerContext); + goto l722; + } + /* begin ensureFrameIsMarried:SP: */ + if ((byteAt((callerFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(callerFP))); + object = longAt(callerFP + FoxThisContext); + goto l722; + } + object = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), + (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); + goto l722; + } + if (index == StackPointerIndex) { + assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(obj))); + object = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); + goto l722; + } + if (index == InstructionPointerIndex) { + object = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); + goto l722; + } + error("bad index"); + object = 0; + l722: /* end instVar:ofContext: */; + longAtPointerput((localSP -= BytesPerOop), object); + } + else { + /* begin internalPush: */ + object1 = longAt((obj + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord()))))); + longAtPointerput((localSP -= BytesPerOop), object1); + } + } + BREAK; + CASE(483) /*227*/ + /* extPushLiteralVariableBytecode */ + { + sqInt index; + sqInt litVar; + sqInt object; + + VM_LABEL(extPushLiteralVariableBytecode); + index = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extA) << 8))); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + extA = 0; + /* begin pushLiteralVariable: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((index + LiteralStart)) << (shiftForWord()))))); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + litVar = unfollowatIndex(litVar, index); + } + /* begin internalPush: */ + object = longAt((litVar + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); + longAtPointerput((localSP -= BytesPerOop), object); + + } + BREAK; + CASE(484) /*228*/ + /* extPushLiteralBytecode */ + { + sqInt index; + sqInt object; + + VM_LABEL(extPushLiteralBytecode); + index = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extA) << 8))); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + extA = 0; + /* begin pushLiteralConstant: */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + object = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((index + LiteralStart)) << (shiftForWord()))))); + + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(485) /*229*/ + /* longPushTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt index; + sqInt object; + + VM_LABEL(longPushTemporaryVariableBytecode); + /* begin fetchByte */ + index = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + object = (index < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - index) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - index) * BytesPerWord))); + longAtPointerput((localSP -= BytesPerOop), object); + } + BREAK; + CASE(487) /*231*/ + /* pushNewArrayBytecode */ + { + usqInt array; + sqInt i; + usqInt newObj; + usqInt numBytes; + int popValues; + sqInt size; + sqInt valuePointer; + sqInt valuePointer1; + + VM_LABEL(pushNewArrayBytecode1); + /* begin fetchByte */ + size = byteAtPointer(++localIP); + popValues = size > 0x7F; + size = size & 0x7F; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + assert((size >= 0) + && (ClassArrayCompactIndex != 0)); + assert((2) == (instSpecOfClass(knownClassAtIndex(ClassArrayCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(size < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + ((size <= 1 + ? 8 + : (size + (size & 1)) * BytesPerOop)); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + array = 0; + goto l734; + } + } + long64Atput(newObj, (((((usqLong) size)) << (numSlotsFullShift())) + (2U << (formatShift()))) + ClassArrayCompactIndex); + GIV(freeStart) += numBytes; + array = newObj; + l734: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + if (popValues) { + for (i = 0; i < size; i += 1) { + + /* Assume: have just allocated a new Array; it must be young. Thus, can use unchecked stores. */ + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer = longAtPointer(localSP + (((size - i) - 1) * BytesPerOop)); + assert(!(isOopForwarded(array))); + longAtput((array + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), valuePointer); + } + /* begin internalPop: */ + localSP += size * BytesPerOop; + } + else { + for (i = 0; i < size; i += 1) { + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer1 = GIV(nilObj); + assert(!(isOopForwarded(array))); + longAtput((array + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), valuePointer1); + } + } + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), array); + } + BREAK; + CASE(488) /*232*/ + /* extPushIntegerBytecode */ + { + sqInt value; + + VM_LABEL(extPushIntegerBytecode); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + extB = 0; + numExtB = 0; + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)value << 1) | 1)); + } + BREAK; + CASE(489) /*233*/ + /* extPushCharacterBytecode */ + { + sqInt object; + sqInt value; + + VM_LABEL(extPushCharacterBytecode); + value = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + object = (((sqInt)((usqInt)(value) << (numTagBits())))) + (characterTag()); + longAtPointerput((localSP -= BytesPerOop), object); + numExtB = (extB = 0); + } + BREAK; + CASE(490) /*234*/ + /* extSendBytecode */ + { + sqInt byte; + sqInt rcvr; + sqInt tagBits; + + VM_LABEL(extSendBytecode); + byte = byteAtPointer(++localIP); + assert(GIV(method) == (iframeMethod(localFP))); + /* begin literal:ofMethod: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((((((usqInt) byte) >> 3) + (((sqInt)((usqInt)(extA) << 5)))) + LiteralStart)) << (shiftForWord()))))); + + extA = 0; + GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)(extB) << 3))); + extB = 0; + numExtB = 0; + rcvr = longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop)); + lkupClassTag = (((tagBits = rcvr & (tagMask()))) != 0 + ? ((tagBits & 1) != 0 + ? 1 + : tagBits) + : (longAt(rcvr)) & (classIndexMask())); + goto commonSendOrdinary; + } + BREAK; + CASE(491) /*235*/ + /* extSendSuperBytecode */ + { + sqInt byte; + + VM_LABEL(extSendSuperBytecode); + byte = byteAtPointer(++localIP); + assert(GIV(method) == (iframeMethod(localFP))); + /* begin literal:ofMethod: */ + GIV(messageSelector) = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((((((usqInt) byte) >> 3) + (((sqInt)((usqInt)(extA) << 5)))) + LiteralStart)) << (shiftForWord()))))); + + extA = 0; + if (extB >= 64) { + GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)((extB - 64)) << 3))); + extB = 0; + /* goto directedSuperclassSend */ + goto l743; + } + + GIV(argumentCount) = (byte & 7) + (((sqInt)((usqInt)(extB) << 3))); + extB = 0; + numExtB = 0; + goto superclassSend; + } + l743: /* end case */; + + directedSuperclassSend: + /* directedSuperclassSend */ + { + sqInt aValue; + sqInt class; + sqInt err; + sqInt hash; + sqInt objOop; + sqInt objOop1; + sqInt referent; + sqInt referent1; + sqInt superclass; + sqInt top; + + VM_LABEL(directedSuperclassSend); + /* begin internalPopStack */ + top = longAt(localSP); + localSP += BytesPerOop; + class = top; + if (((longAt(class)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + /* begin followForwarded: */ + assert(isUnambiguouslyForwarder(class)); + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((class + BaseHeaderSize) + (0U << (shiftForWord()))); + while (((referent & (tagMask())) == 0) + && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((referent + BaseHeaderSize) + (0U << (shiftForWord()))); + } + class = referent; + } + /* begin followField:ofObject: */ + objOop = longAt((class + BaseHeaderSize) + (((int)((usqInt)(SuperclassIndex) << (shiftForWord()))))); + if (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop = fixFollowedFieldofObjectwithInitialValue(SuperclassIndex, class, objOop); + } + superclass = objOop; + + /* To maintain the invariant that all receivers are unforwarded we need an explicit + read barrier in the super send cases. Even though we always follow receivers + on become e.g. super doSomethingWith: (self become: other) forwards the receiver + self pushed on the stack. */ + assert(addressCouldBeClassObj(superclass)); + lkupClassTag = (((hash = (long32At(superclass + 4)) & (identityHashHalfWordMask()))) != 0 + ? hash + : (objCouldBeClassObj(superclass) + ? (((err = enterIntoClassTable(superclass))) != 0 + ? -err + : (/* begin rawHashBitsOf: */ + (long32At(superclass + 4)) & (identityHashHalfWordMask()))) + : -PrimErrBadReceiver)); + + /* begin ensureReceiverUnforwarded */ + if ((((longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop))) & (tagMask())) == 0) + && (((longAt(longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop)))) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin internalStackValue:put: */ + objOop1 = longAtPointer(localSP + (GIV(argumentCount) * BytesPerOop)); + assert(isUnambiguouslyForwarder(objOop1)); + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent1 = longAt((objOop1 + BaseHeaderSize) + (0U << (shiftForWord()))); + while (((referent1 & (tagMask())) == 0) + && (((longAt(referent1)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent1 = longAt((referent1 + BaseHeaderSize) + (0U << (shiftForWord()))); + } + aValue = referent1; + longAtPointerput(localSP + (GIV(argumentCount) * BytesPerOop), aValue); + } + assert(lkupClassTag != (nilObject())); + goto commonSendOrdinary; + } + BREAK; + CASE(493) /*237*/ + /* extUnconditionalJump */ + { + sqInt byte; + sqInt offset; + + VM_LABEL(extUnconditionalJump); + byte = byteAtPointer(++localIP); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); + extB = 0; + numExtB = 0; + localIP += offset; + /* begin ifBackwardsCheckForEvents: */ + if ((offset < 0) + && (localSP < GIV(stackLimit))) { + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + checkForEventsMayContextSwitch(1); + browserPluginReturnIfNeeded(); + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(494) /*238*/ + /* extJumpIfTrue */ + { + sqInt boolean; + sqInt byte; + sqInt offset; + + VM_LABEL(extJumpIfTrue); + byte = byteAtPointer(++localIP); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); + numExtB = (extB = (extA = 0)); + /* begin jumplfTrueBy: */ + boolean = longAtPointer(localSP); + if (boolean == GIV(trueObj)) { + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + else { + if (!(boolean == GIV(falseObj))) { + /* begin internalMustBeBoolean */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + goto l748; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + l748: /* end jumplfTrueBy: */; + } + BREAK; + CASE(495) /*239*/ + /* extJumpIfFalse */ + { + sqInt boolean; + sqInt byte; + sqInt offset; + + VM_LABEL(extJumpIfFalse); + byte = byteAtPointer(++localIP); + offset = byte + (((sqInt)((usqInt)(extB) << 8))); + numExtB = (extB = (extA = 0)); + /* begin jumplfFalseBy: */ + boolean = longAtPointer(localSP); + if (boolean == GIV(falseObj)) { + /* begin jump: */ + localIP = (localIP + offset) + 1; + currentBytecode = (byteAtPointer(localIP)) + GIV(bytecodeSetSelector); + + } + else { + if (!(boolean == GIV(trueObj))) { + /* begin internalMustBeBoolean */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorMustBeBoolean) << (shiftForWord()))))); + GIV(argumentCount) = 0; + goto normalSend; + goto l752; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + l752: /* end jumplfFalseBy: */; + } + BREAK; + CASE(496) /*240*/ + /* extSistaStoreAndPopReceiverVariableBytecode */ + { + sqInt index1; + sqInt obj; + int onCurrentPage; + sqInt senderOop; + char * theFP; + StackPage * thePage; + sqInt value; + sqInt variableIndex; + + VM_LABEL(extSistaStoreAndPopReceiverVariableBytecode); + variableIndex = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extA) << 8))); + extA = (numExtB = (extB = 0)); + value = longAtPointer(localSP); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + /* begin storeMaybeContextReceiverVariable:withValue: */ + obj = longAt(localFP + FoxReceiver); + if ((variableIndex <= ReceiverIndex) + && ((((longAt(obj)) & (classIndexMask())) == ClassMethodContextCompactIndex) + && (((longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)))) { + /* begin instVar:ofContext:put: */ + assert(isMarriedOrWidowedContext(obj)); + assert(!((isObjImmutable(obj)))); + /* begin writeBackHeadFramePointers */ + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + /* begin setHeadFP:andSP:inPage: */ + assert(localSP < localFP); + assert((localSP < ((GIV(stackPage)->baseAddress))) + && (localSP > (((GIV(stackPage)->realStackLimit)) - (LargeContextSlots * BytesPerOop)))); + assert((localFP < ((GIV(stackPage)->baseAddress))) + && (localFP > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); + (GIV(stackPage)->headFP = localFP); + (GIV(stackPage)->headSP = localSP); + assert(pageListIsWellFormed()); + if (!((((longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(obj))))) { + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(obj))); + if ((assert(isNonImmediate(obj)), + oopisGreaterThanOrEqualTo(obj, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(obj))) >> (rememberedBitShift())) & 1) != 0)) { + remember(obj); + } + } + } + longAtput((obj + BaseHeaderSize) + (((sqInt)((usqInt)(variableIndex) << (shiftForWord())))), value); + if (variableIndex == StackPointerIndex) { + } + goto l758; + } + /* begin frameOfMarriedContext: */ + senderOop = longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + + if (variableIndex == SenderIndex) { + /* begin stackPageFor: */ + index1 = pageIndexForstackMemorybytesPerPage(theFP, GIV(stackMemory), GIV(bytesPerPage)); + thePage = stackPageAtpages(index1, GIV(pages)); + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + onCurrentPage = thePage == GIV(stackPage); + storeSenderOfFramewithValue(theFP, value); + if (onCurrentPage) { + localFP = (GIV(stackPage)->headFP); + localSP = (GIV(stackPage)->headSP); + } + else { + markStackPageMostRecentlyUsed(GIV(stackPage)); + } + goto l758; + } + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalDivorceFrameandContext(theFP, obj); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(obj))); + if ((assert(isNonImmediate(obj)), + oopisGreaterThanOrEqualTo(obj, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(obj))) >> (rememberedBitShift())) & 1) != 0)) { + remember(obj); + } + } + } + longAtput((obj + BaseHeaderSize) + (((sqInt)((usqInt)(variableIndex) << (shiftForWord())))), value); + if (variableIndex == StackPointerIndex) { + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + markStackPageMostRecentlyUsed(GIV(stackPage)); + assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); + l758: /* end instVar:ofContext:put: */; + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(obj)))); + if (((((usqInt) (longAt(obj))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), obj); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), value); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l760; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(obj))); + if ((assert(isNonImmediate(obj)), + oopisGreaterThanOrEqualTo(obj, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(obj))) >> (rememberedBitShift())) & 1) != 0)) { + remember(obj); + } + } + } + longAtput((obj + BaseHeaderSize) + (((sqInt)((usqInt)(variableIndex) << (shiftForWord())))), value); + l760: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(497) /*241*/ + /* extSistaStoreAndPopLiteralVariableBytecode */ + { + sqInt litVar; + sqInt referent; + sqInt value; + sqInt variableIndex; + + VM_LABEL(extSistaStoreAndPopLiteralVariableBytecode); + variableIndex = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extA) << 8))); + value = longAtPointer(localSP); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + extA = (numExtB = (extB = 0)); + /* begin storeLiteralVariable:withValue: */ + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((variableIndex + LiteralStart)) << (shiftForWord()))))); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + /* begin followForwarded: */ + assert(isUnambiguouslyForwarder(litVar)); + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((litVar + BaseHeaderSize) + (0U << (shiftForWord()))); + while (((referent & (tagMask())) == 0) + && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((referent + BaseHeaderSize) + (0U << (shiftForWord()))); + } + litVar = referent; + } + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(litVar)))); + if (((((usqInt) (longAt(litVar))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), litVar); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), value); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l763; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(litVar))); + if ((assert(isNonImmediate(litVar)), + oopisGreaterThanOrEqualTo(litVar, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(litVar))) >> (rememberedBitShift())) & 1) != 0)) { + remember(litVar); + } + } + } + longAtput((litVar + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))), value); + l763: /* end storeLiteralVariable:withValue: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(498) /*242*/ + /* longStoreAndPopTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt index; + + VM_LABEL(longStoreAndPopTemporaryVariableBytecode); + /* begin longStoreTemporaryVariableBytecode */ + index = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (index < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - index) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - index) * BytesPerWord), longAtPointer(localSP)); + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(499) /*243*/ + /* extSistaStoreReceiverVariableBytecode */ + { + sqInt anObject; + sqInt index1; + sqInt obj; + int onCurrentPage; + sqInt senderOop; + char * theFP; + StackPage * thePage; + sqInt variableIndex; + + VM_LABEL(extSistaStoreReceiverVariableBytecode); + variableIndex = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extA) << 8))); + extA = (numExtB = (extB = 0)); + /* begin storeMaybeContextReceiverVariable:withValue: */ + anObject = longAtPointer(localSP); + /* begin storeMaybeContext:receiverVariable:withValue: */ + obj = longAt(localFP + FoxReceiver); + if ((variableIndex <= ReceiverIndex) + && ((((longAt(obj)) & (classIndexMask())) == ClassMethodContextCompactIndex) + && (((longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)))) { + /* begin instVar:ofContext:put: */ + assert(isMarriedOrWidowedContext(obj)); + assert(!((isObjImmutable(obj)))); + /* begin writeBackHeadFramePointers */ + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + /* begin setHeadFP:andSP:inPage: */ + assert(localSP < localFP); + assert((localSP < ((GIV(stackPage)->baseAddress))) + && (localSP > (((GIV(stackPage)->realStackLimit)) - (LargeContextSlots * BytesPerOop)))); + assert((localFP < ((GIV(stackPage)->baseAddress))) + && (localFP > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); + (GIV(stackPage)->headFP = localFP); + (GIV(stackPage)->headSP = localSP); + assert(pageListIsWellFormed()); + if (!((((longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(obj))))) { + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(obj))); + if ((assert(isNonImmediate(obj)), + oopisGreaterThanOrEqualTo(obj, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anObject & (tagMask())) == 0) + && (oopisLessThan(anObject, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(obj))) >> (rememberedBitShift())) & 1) != 0)) { + remember(obj); + } + } + } + longAtput((obj + BaseHeaderSize) + (((sqInt)((usqInt)(variableIndex) << (shiftForWord())))), anObject); + if (variableIndex == StackPointerIndex) { + } + goto l777; + } + /* begin frameOfMarriedContext: */ + senderOop = longAt((obj + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + + if (variableIndex == SenderIndex) { + /* begin stackPageFor: */ + index1 = pageIndexForstackMemorybytesPerPage(theFP, GIV(stackMemory), GIV(bytesPerPage)); + thePage = stackPageAtpages(index1, GIV(pages)); + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + onCurrentPage = thePage == GIV(stackPage); + storeSenderOfFramewithValue(theFP, anObject); + if (onCurrentPage) { + localFP = (GIV(stackPage)->headFP); + localSP = (GIV(stackPage)->headSP); + } + else { + markStackPageMostRecentlyUsed(GIV(stackPage)); + } + goto l777; + } + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalDivorceFrameandContext(theFP, obj); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(obj))); + if ((assert(isNonImmediate(obj)), + oopisGreaterThanOrEqualTo(obj, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anObject & (tagMask())) == 0) + && (oopisLessThan(anObject, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(obj))) >> (rememberedBitShift())) & 1) != 0)) { + remember(obj); + } + } + } + longAtput((obj + BaseHeaderSize) + (((sqInt)((usqInt)(variableIndex) << (shiftForWord())))), anObject); + if (variableIndex == StackPointerIndex) { + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + markStackPageMostRecentlyUsed(GIV(stackPage)); + assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); + l777: /* end instVar:ofContext:put: */; + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(obj)))); + if (((((usqInt) (longAt(obj))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), obj); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), anObject); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(variableIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l779; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(obj))); + if ((assert(isNonImmediate(obj)), + oopisGreaterThanOrEqualTo(obj, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anObject & (tagMask())) == 0) + && (oopisLessThan(anObject, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(obj))) >> (rememberedBitShift())) & 1) != 0)) { + remember(obj); + } + } + } + longAtput((obj + BaseHeaderSize) + (((sqInt)((usqInt)(variableIndex) << (shiftForWord())))), anObject); + l779: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(500) /*244*/ + /* extSistaStoreLiteralVariableBytecode */ + { + sqInt anObject; + sqInt litVar; + sqInt referent; + sqInt variableIndex; + + VM_LABEL(extSistaStoreLiteralVariableBytecode); + variableIndex = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extA) << 8))); + extA = (numExtB = (extB = 0)); + /* begin storeLiteralVariable:withValue: */ + anObject = longAtPointer(localSP); + + /* push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field. + The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in + all methods in the stack zone, and the entire method on return, and global variables are relatively + rare; in my work image 8.7% of literals are globals). */ + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + litVar = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((variableIndex + LiteralStart)) << (shiftForWord()))))); + + if (((longAt(litVar)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0) { + /* begin followForwarded: */ + assert(isUnambiguouslyForwarder(litVar)); + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((litVar + BaseHeaderSize) + (0U << (shiftForWord()))); + while (((referent & (tagMask())) == 0) + && (((longAt(referent)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + /* begin fetchPointer:ofMaybeForwardedObject: */ + referent = longAt((referent + BaseHeaderSize) + (0U << (shiftForWord()))); + } + litVar = referent; + } + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(litVar)))); + if (((((usqInt) (longAt(litVar))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), litVar); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), anObject); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(ValueIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l782; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(litVar))); + if ((assert(isNonImmediate(litVar)), + oopisGreaterThanOrEqualTo(litVar, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anObject & (tagMask())) == 0) + && (oopisLessThan(anObject, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(litVar))) >> (rememberedBitShift())) & 1) != 0)) { + remember(litVar); + } + } + } + longAtput((litVar + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord())))), anObject); + l782: /* end storeLiteralVariable:withValue: */; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + BREAK; + CASE(501) /*245*/ + /* longStoreTemporaryVariableBytecode */ + { + sqInt frameNumArgs; + sqInt index; + + VM_LABEL(longStoreTemporaryVariableBytecode); + /* begin fetchByte */ + index = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin temporary:in:put: */ + if (index < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1)))) { + longAtput((localFP + FoxCallerSavedIP) + ((frameNumArgs - index) * BytesPerWord), longAtPointer(localSP)); + } + else { + longAtput(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - index) * BytesPerWord), longAtPointer(localSP)); + } + } + BREAK; + CASE(504) /*248*/ + /* callPrimitiveBytecode */ + { + sqInt arg; + sqInt aValue; + sqInt aValue1; + sqInt bool; + sqInt bool1; + sqInt bool2; + sqInt bool3; + sqInt bool4; + sqInt bool5; + sqInt byte1; + sqInt byte2; + sqInt byteIndex; + sqInt byteIndex1; + sqInt classObj; + sqInt fieldIndex; + sqInt fieldIndex1; + sqInt fieldIndex2; + sqInt fmt; + sqInt hash; + sqInt hash1; + sqInt header; + sqInt i; + sqInt knownClassIndex; + sqInt longIndex; + sqInt longIndex1; + usqInt newObj; + usqInt numBytes; + usqInt numBytes1; + sqInt numSlots; + usqInt numSlots1; + usqInt numSlots2; + sqInt obj; + sqInt objFormat; + sqInt objOop; + sqInt objOop1; + sqInt objOop11; + sqInt objOop12; + sqInt objOop2; + sqInt objOop21; + sqInt objOop22; + sqInt objOop3; + sqInt objOop31; + sqInt objOop4; + sqInt objOop41; + sqInt objOop5; + sqInt oop; + sqInt oop1; + sqInt oop11; + sqInt oop2; + sqInt prim; + sqInt primSet; + sqInt rcvr; + sqInt result; + sqInt result1; + usqInt result2; + sqLong result64; + sqInt shortIndex; + sqInt shortIndex1; + sqInt tagBits; + sqInt valuePointer; + + VM_LABEL(callPrimitiveBytecode1); + byte1 = byteAtPointer(++localIP); + byte2 = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + if (byte2 < 128) { + /* begin methodHeaderOf: */ + assert(isCompiledMethod(GIV(method))); + /* begin fetchPointer:ofObject: */ + header = longAt((GIV(method) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); + if (((/* begin alternateHeaderHasPrimitiveFlag: */ + header & AlternateHeaderHasPrimFlag)) + && (((((usqInt)localIP)) == ((GIV(method) + ((LiteralStart + ((assert((header & 1)), +((header >> 1)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize)) + (3))) { + goto l792; + } + localIP -= 3; + goto respondToUnknownBytecode; + goto l792; + } + prim = (((sqInt)((usqInt)((byte2 - 128)) << 8))) + byte1; + primSet = (((usqInt) prim) >> 13) & 3; + prim = prim & 0x1FFF; + if (primSet == 0) { + if (prim < 1000) { + /* begin nullaryInlinePrimitive: */ + localIP -= 3; + goto respondToUnknownBytecode; + goto l792; + } + if (prim < 2000) { + /* begin unaryInlinePrimitive: */ + + switch (prim - 1000) { + case 0: + /* begin fetchClassOf: */ + oop2 = longAtPointer(localSP); + result2 = (((tagBits = oop2 & (tagMask()))) != 0 + ? longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits) << (shiftForWord()))))) + : fetchClassOfNonImm(oop2)); + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result2); + break; + case 1: + /* begin numSlotsOf: */ + objOop5 = longAtPointer(localSP); + assert((classIndexOf(objOop5)) > (isForwardedObjectClassIndexPun())); + numSlots1 = byteAt(objOop5 + 7); + result2 = (numSlots1 == (numSlotsMask()) + ? longAt(objOop5 - BaseHeaderSize) + : numSlots1); + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 2: + result2 = (numSlotsOf(longAtPointer(localSP))) - (fixedFieldsOfClass(fetchClassOfNonImm(longAtPointer(localSP)))); + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 3: + /* begin numBytesOf: */ + objOop12 = longAtPointer(localSP); + fmt = (((usqInt) (longAt(objOop12))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOf: */ + assert((classIndexOf(objOop12)) > (isForwardedObjectClassIndexPun())); + numSlots2 = byteAt(objOop12 + 7); + numBytes = (numSlots2 == (numSlotsMask()) + ? longAt(objOop12 - BaseHeaderSize) + : numSlots2); + numBytes = numBytes << (shiftForWord()); + if (fmt >= (firstByteFormat())) { + + /* bytes (the common case), including CompiledMethod */ + result2 = numBytes - (fmt & 7); + goto l828; + } + if (fmt <= (sixtyFourBitIndexableFormat())) { + result2 = ((sqInt) numBytes); + goto l828; + } + if (fmt >= (firstShortFormat())) { + result2 = numBytes - (((sqInt)((usqInt)((fmt & 3)) << 1))); + goto l828; + } + result2 = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); + l828: /* end numBytesOf: */; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 4: + /* begin num16BitUnitsOf: */ + objOop22 = longAtPointer(localSP); + result2 = ((usqInt) (numBytesOf(objOop22))) >> 1; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 5: + /* begin num32BitUnitsOf: */ + objOop31 = longAtPointer(localSP); + result2 = ((usqInt) (numBytesOf(objOop31))) >> 2; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 6: + /* begin num64BitUnitsOf: */ + objOop41 = longAtPointer(localSP); + result2 = ((usqInt) (numBytesOf(objOop41))) >> 3; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 11: + /* begin internalStackTop */ + classObj = longAtPointer(localSP); + /* begin instanceSizeOf: */ + assert(addressCouldBeClassObj(classObj)); + numSlots = (((longAt((classObj + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1)) & ((1U << (fixedFieldsFieldWidth())) - 1); + assert((rawHashBitsOf(classObj)) != 0); + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + knownClassIndex = (long32At(classObj + 4)) & (identityHashHalfWordMask()); + /* begin instSpecOfClassFormat: */ + objFormat = (((usqInt) (((longAt((classObj + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1))) >> (fixedFieldsFieldWidth())) & (formatMask()); + assert((numSlots >= 0) + && (knownClassIndex != 0)); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(knownClassIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(numSlots < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes1 = BaseHeaderSize + ((numSlots <= 1 + ? 8 + : (numSlots + (numSlots & 1)) * BytesPerOop)); + assert((numBytes1 % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes1) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes1) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + goto l813; + } + } + long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + knownClassIndex); + GIV(freeStart) += numBytes1; + result2 = newObj; + l813: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + if ((extB & 1) == 0) { + for (i = 0; i < numSlots; i += 1) { + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer = GIV(nilObj); + assert(!(isOopForwarded(result2))); + longAtput((result2 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), valuePointer); + } + } + extB = 0; + numExtB = 0; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result2); + break; + case 20: + /* begin hashBitsOf: */ + hash = (long32At((longAtPointer(localSP)) + 4)) & (identityHashHalfWordMask()); + if (hash == 0) { + + /* would like to assert + self assert: (coInterpreter addressCouldBeClassObj: objOop) not + but instance-specific behaviors that are instances of themselves may + fail this test. */ + /* begin newHashBitsOf: */ + hash1 = (newObjectHash()) & (identityHashHalfWordMask()); + /* begin setHashBitsOf:to: */ + assert(((hash1 >= 0) && (hash1 <= (identityHashHalfWordMask())))); + long32Atput((longAtPointer(localSP)) + 4, ((((long32At((longAtPointer(localSP)) + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); + hash = hash1; + } + result2 = hash; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + case 30: + /* begin characterValueOf: */ + oop11 = longAtPointer(localSP); + result2 = ((usqInt) (((usqInt)oop11))) >> (numTagBits()); + /* begin internalStackTopPut: */ + longAtPointerput(localSP, ((result2 << 1) | 1)); + break; + default: + localIP -= 3; + goto respondToUnknownBytecode; + + } + goto l792; + } + if (prim < 3000) { + /* begin binaryInlinePrimitive: */ + + switch (prim - 2000) { + case 0: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) + (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 1: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 2: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) * (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 3: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 4: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) / (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 5: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) % (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 6: + rcvr = ((longAtPointer(localSP + (1 * BytesPerOop))) >> 1); + arg = ((longAtPointer(localSP)) >> 1); + /* begin quot:ient: */ + result = (rcvr > 0 + ? (arg > 0 + ? rcvr / arg + : 0 - (rcvr / (0 - arg))) + : (arg > 0 + ? 0 - ((0 - rcvr) / arg) + : (0 - rcvr) / (0 - arg))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, (((usqInt)result << 1) | 1)); + break; + case 16: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) & (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 17: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) | (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 18: + result = (((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) ^ (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 19: + result = (((usqInt)(((sqInt)((usqInt)((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1))) << (((longAtPointer(localSP)) >> 1))))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 20: + result = (((usqInt)(((usqInt) (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1))) >> (((longAtPointer(localSP)) >> 1))) << 1) | 1); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 32: + /* begin booleanObjectOf: */ + bool = (longAtPointer(localSP + (1 * BytesPerOop))) > (longAtPointer(localSP)); + result = (bool + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 33: + /* begin booleanObjectOf: */ + bool1 = (longAtPointer(localSP + (1 * BytesPerOop))) < (longAtPointer(localSP)); + result = (bool1 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 34: + /* begin booleanObjectOf: */ + bool2 = (longAtPointer(localSP + (1 * BytesPerOop))) >= (longAtPointer(localSP)); + result = (bool2 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 35: + /* begin booleanObjectOf: */ + bool3 = (longAtPointer(localSP + (1 * BytesPerOop))) <= (longAtPointer(localSP)); + result = (bool3 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 36: + /* begin booleanObjectOf: */ + bool4 = (longAtPointer(localSP + (1 * BytesPerOop))) == (longAtPointer(localSP)); + result = (bool4 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 37: + /* begin booleanObjectOf: */ + bool5 = (longAtPointer(localSP + (1 * BytesPerOop))) != (longAtPointer(localSP)); + result = (bool5 + ? GIV(trueObj) + : GIV(falseObj)); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 64: + /* begin fetchPointer:ofObject: */ + fieldIndex = (((longAtPointer(localSP)) >> 1)) - 1; + objOop = longAtPointer(localSP + (1 * BytesPerOop)); + result = longAt((objOop + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << (shiftForWord()))))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, result); + break; + case 65: + /* begin fetchByte:ofObject: */ + byteIndex = (((longAtPointer(localSP)) >> 1)) - 1; + objOop1 = longAtPointer(localSP + (1 * BytesPerOop)); + result = byteAt((objOop1 + BaseHeaderSize) + byteIndex); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, (((usqInt)result << 1) | 1)); + break; + case 66: + /* begin fetchShort16:ofObject: */ + shortIndex = (((longAtPointer(localSP)) >> 1)) - 1; + objOop2 = longAtPointer(localSP + (1 * BytesPerOop)); + result = shortAt((objOop2 + BaseHeaderSize) + (((sqInt)((usqInt)(shortIndex) << 1)))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + longAtPointerput(localSP, (((usqInt)result << 1) | 1)); + break; + case 67: + /* begin fetchLong32:ofObject: */ + fieldIndex1 = (((longAtPointer(localSP)) >> 1)) - 1; + oop = longAtPointer(localSP + (1 * BytesPerOop)); + result = long32At((oop + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << 2)))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + /* begin internalStackTopPut: */ + aValue = ((sqInt) (signed64BitValueOf(result))); + longAtPointerput(localSP, aValue); + break; + case 68: + /* begin fetchLong64:ofObject: */ + longIndex = (((longAtPointer(localSP)) >> 1)) - 1; + objOop3 = longAtPointer(localSP + (1 * BytesPerOop)); + result64 = long64At((objOop3 + BaseHeaderSize) + (((sqInt)((usqInt)(longIndex) << 3)))); + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + /* begin internalStackTopPut: */ + aValue1 = ((sqInt) (signed64BitValueOf(result))); + longAtPointerput(localSP, aValue1); + break; + default: + localIP -= 3; + goto respondToUnknownBytecode; + + } + goto l792; + } + if (prim < 4000) { + /* begin trinaryInlinePrimitive: */ + + switch (prim - 3000) { + case 0: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storePointer:ofObject:withValue: */ + objOop21 = longAtPointer(localSP + (2 * BytesPerOop)); + assert(!(isForwarded(objOop21))); + if ((assert(isNonImmediate(objOop21)), + oopisGreaterThanOrEqualTo(objOop21, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((result1 & (tagMask())) == 0) + && (oopisLessThan(result1, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(objOop21))) >> (rememberedBitShift())) & 1) != 0)) { + remember(objOop21); + } + } + } + longAtput((objOop21 + BaseHeaderSize) + (((sqInt)((usqInt)(((((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1)) << (shiftForWord())))), result1); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + case 1: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storeByte:ofObject:withValue: */ + byteIndex1 = (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1; + oop1 = longAtPointer(localSP + (2 * BytesPerOop)); + byteAtput((oop1 + BaseHeaderSize) + byteIndex1, (result1 >> 1)); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + case 2: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storeShort16:ofObject:withValue: */ + shortIndex1 = (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1; + objOop4 = longAtPointer(localSP + (2 * BytesPerOop)); + shortAtput((objOop4 + BaseHeaderSize) + (((sqInt)((usqInt)(shortIndex1) << 1))), (result1 >> 1)); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + case 3: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storeLong32:ofObject:withValue: */ + fieldIndex2 = (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1; + obj = longAtPointer(localSP + (2 * BytesPerOop)); + long32Atput((obj + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex2) << 2))), (result1 >> 1)); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + case 4: + /* begin internalStackTop */ + result1 = longAtPointer(localSP); + /* begin storeLong64:ofObject:withValue: */ + longIndex1 = (((longAtPointer(localSP + (1 * BytesPerOop))) >> 1)) - 1; + objOop11 = longAtPointer(localSP + (2 * BytesPerOop)); + long64Atput((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(longIndex1) << 3))), (result1 >> 1)); + /* begin internalPop: */ + localSP += 2 * BytesPerOop; + /* begin internalStackTopPut: */ + longAtPointerput(localSP, result1); + break; + default: + localIP -= 3; + goto respondToUnknownBytecode; + + } + goto l792; + } + } + localIP -= 3; + goto respondToUnknownBytecode; + goto l792; + + } + l792: /* end case */; + BREAK; + CASE(505) /*249*/ + /* extPushFullClosureBytecode */ + { + sqInt byte; + sqInt compiledBlock; + sqInt compiledBlockLiteralIndex; + sqInt context; + sqInt header; + sqInt i; + int ignoreContext; + usqInt newClosure; + usqInt newClosure1; + usqInt newObj; + sqInt numArgs; + usqInt numBytes; + sqInt numCopied; + sqInt numCopied1; + sqInt numSlots; + sqInt objFormat; + int receiverIsOnStack; + sqInt startIndex; + sqInt valuePointer; + sqInt valuePointer1; + + VM_LABEL(extPushFullClosureBytecode); + compiledBlockLiteralIndex = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extA) << 8))); + extA = 0; + assert(GIV(method) == (iframeMethod(localFP))); + /* begin literal:ofMethod: */ + compiledBlock = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((compiledBlockLiteralIndex + LiteralStart)) << (shiftForWord()))))); + + assert(isOopCompiledMethod(compiledBlock)); + /* begin argumentCountOf: */ + assert(isCompiledMethod(compiledBlock)); + /* begin fetchPointer:ofObject: */ + header = longAt((compiledBlock + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); + numArgs = (((usqInt) header) >> MethodHeaderArgCountShift) & 15; + byte = byteAtPointer(++localIP); + numCopied = byte & ((1U << 6) - 1); + receiverIsOnStack = byte & (1U << 7); + ignoreContext = byte & (1U << 6); + /* begin pushFullClosureNumArgs:copiedValues:compiledBlock:receiverIsOnStack:ignoreContext: */ + if (ignoreContext) { + /* begin nilObject */ + context = GIV(nilObj); + } + else { + /* begin ensureFrameIsMarried:SP: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + longAt(localFP + FoxThisContext); + goto l862; + } + context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); + l862: /* end ensureFrameIsMarried:SP: */; + } + /* begin fullClosureIn:numArgs:numCopiedValues:compiledBlock: */ + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = indexablePointersFormat(); + numSlots = FullClosureFirstCopiedValueIndex + numCopied; + assert((numSlots >= 0) + && (ClassFullBlockClosureCompactIndex != 0)); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassFullBlockClosureCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(numSlots < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + ((numSlots <= 1 + ? 8 + : (numSlots + (numSlots & 1)) * BytesPerOop)); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newClosure1 = 0; + goto l860; + } + } + long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassFullBlockClosureCompactIndex); + GIV(freeStart) += numBytes; + newClosure1 = newObj; + l860: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(newClosure1))); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(newClosure1))); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord())))), compiledBlock); + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(newClosure1))); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); + newClosure = newClosure1; + if (receiverIsOnStack) { + startIndex = FullClosureReceiverIndex; + numCopied1 = numCopied + 1; + } + else { + startIndex = FullClosureFirstCopiedValueIndex; + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer = longAt(localFP + FoxReceiver); + assert(!(isOopForwarded(newClosure))); + longAtput((newClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureReceiverIndex) << (shiftForWord())))), valuePointer); + numCopied1 = numCopied; + } + if (numCopied1 > 0) { + for (i = 0; i < numCopied1; i += 1) { + + /* Assume: have just allocated a new BlockClosure; it must be young. + Thus, can use unchecked stores. */ + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer1 = longAtPointer(localSP + (((numCopied1 - i) - 1) * BytesPerOop)); + assert(!(isOopForwarded(newClosure))); + longAtput((newClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + startIndex)) << (shiftForWord())))), valuePointer1); + } + /* begin internalPop: */ + localSP += numCopied1 * BytesPerOop; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), newClosure); + } + BREAK; + CASE(506) /*250*/ + /* extPushClosureBytecode */ + { + sqInt blockSize; + sqInt byte; + sqInt context; + sqInt i; + sqInt newClosure; + usqInt newClosure1; + usqInt newObj; + sqInt numArgs; + usqInt numBytes; + sqInt numCopied; + sqInt numSlots; + sqInt objFormat; + sqInt valuePointer; + + VM_LABEL(extPushClosureBytecode); + byte = byteAtPointer(++localIP); + numArgs = (byte & 7) + ((extA % 16) * 8); + numCopied = ((((usqInt) byte) >> 3) & 7) + ((extA / 16) * 8); + extA = 0; + blockSize = (byteAtPointer(++localIP)) + (((sqInt)((usqInt)(extB) << 8))); + numExtB = (extB = 0); + /* begin pushClosureNumArgs:copiedValues:blockSize: */ + if ((byteAt((localFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(localFP))); + context = longAt(localFP + FoxThisContext); + goto l880; + } + context = marryFrameSP(localFP, localSP + (numCopied * BytesPerOop)); + l880: /* end ensureFrameIsMarried:SP: */; + /* begin closureIn:numArgs:instructionPointer:numCopiedValues: */ + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = indexablePointersFormat(); + numSlots = ClosureFirstCopiedValueIndex + numCopied; + assert((numSlots >= 0) + && (ClassBlockClosureCompactIndex != 0)); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassBlockClosureCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(numSlots < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + ((numSlots <= 1 + ? 8 + : (numSlots + (numSlots & 1)) * BytesPerOop)); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newClosure1 = 0; + goto l872; + } + } + long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassBlockClosureCompactIndex); + GIV(freeStart) += numBytes; + newClosure1 = newObj; + l872: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(newClosure1))); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord())))), context); + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(newClosure1))); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord())))), (((usqInt)(((oopForPointer(localIP)) + 2) - (GIV(method) + BaseHeaderSize)) << 1) | 1)); + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(newClosure1))); + longAtput((newClosure1 + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord())))), (((usqInt)numArgs << 1) | 1)); + newClosure = newClosure1; + if (numCopied > 0) { + for (i = 0; i < numCopied; i += 1) { + + /* Assume: have just allocated a new BlockClosure; it must be young. + Thus, can use unchecked stores. */ + /* begin storePointerUnchecked:ofObject:withValue: */ + valuePointer = longAtPointer(localSP + (((numCopied - i) - 1) * BytesPerOop)); + assert(!(isOopForwarded(newClosure))); + longAtput((newClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + ClosureFirstCopiedValueIndex)) << (shiftForWord())))), valuePointer); + } + /* begin internalPop: */ + localSP += numCopied * BytesPerOop; + } + localIP += blockSize; + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), newClosure); + } + BREAK; + CASE(507) /*251*/ + /* extPushRemoteTempOrInstVarLongBytecode */ + { + char *callerFP; + sqInt frameNumArgs; + sqInt frameNumArgs1; + sqInt object; + sqInt object1; + sqInt object11; + sqInt object2; + sqInt senderOop; + sqInt slotIndex; + char *spouseFP; + sqInt tempIndex; + sqInt tempVector; + + VM_LABEL(extPushRemoteTempOrInstVarLongBytecode); + slotIndex = byteAtPointer(++localIP); + tempIndex = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + if ((tempIndex & (remoteIsInstVarAccess())) == 0) { + /* begin pushRemoteTemp:inVectorAt: */ + tempVector = (tempIndex < ((frameNumArgs1 = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs1 - tempIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs1 - tempIndex) * BytesPerWord))); + /* begin internalPush: */ + object1 = longAt((tempVector + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); + longAtPointerput((localSP -= BytesPerOop), object1); + } + else { + slotIndex += ((sqInt)((usqInt)(extA) << 8)); + tempIndex -= remoteIsInstVarAccess(); + numExtB = (extA = (extB = 0)); + object = (tempIndex < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - tempIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - tempIndex) * BytesPerWord))); + /* begin pushMaybeContext:receiverVariable: */ + if ((slotIndex <= StackPointerIndex) + && (((longAt(object)) & (classIndexMask())) == ClassMethodContextCompactIndex)) { + /* begin internalPush: */ + assert(slotIndex < MethodIndex); + assert(isContext(object)); + if (!(((longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1))) { + /* begin fetchPointer:ofObject: */ + object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); + goto l882; + } + /* begin writeBackHeadFramePointers */ + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + /* begin setHeadFP:andSP:inPage: */ + assert(localSP < localFP); + assert((localSP < ((GIV(stackPage)->baseAddress))) + && (localSP > (((GIV(stackPage)->realStackLimit)) - (LargeContextSlots * BytesPerOop)))); + assert((localFP < ((GIV(stackPage)->baseAddress))) + && (localFP > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); + (GIV(stackPage)->headFP = localFP); + (GIV(stackPage)->headSP = localSP); + assert(pageListIsWellFormed()); + if (isWidowedContext(object)) { + /* begin fetchPointer:ofObject: */ + object2 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); + goto l882; + } + /* begin frameOfMarriedContext: */ + senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop & 1)); + spouseFP = pointerForOop(senderOop - 1); + + if (slotIndex == SenderIndex) { + /* begin ensureCallerContext: */ + callerFP = pointerForOop(longAt(spouseFP + FoxSavedFP)); + if (callerFP == 0) { + + /* base frame, context in saved ip slot (or base of stack in Cog) */ + object2 = longAt(spouseFP + FoxCallerContext); + goto l882; + } + /* begin ensureFrameIsMarried:SP: */ + if ((byteAt((callerFP + FoxFrameFlags) + 2)) != 0) { + assert(isContext(frameContext(callerFP))); + object2 = longAt(callerFP + FoxThisContext); + goto l882; + } + object2 = marryFrameSP(callerFP, (assert(!(isBaseFrame(spouseFP))), + (spouseFP + (frameStackedReceiverOffset(spouseFP))) + BytesPerWord)); + goto l882; + } + if (slotIndex == StackPointerIndex) { + assert((ReceiverIndex + (stackPointerIndexForFrame(spouseFP))) < (lengthOf(object))); + object2 = (((usqInt)(stackPointerIndexForFrame(spouseFP)) << 1) | 1); + goto l882; + } + if (slotIndex == InstructionPointerIndex) { + object2 = instructionPointerForFramecurrentFPcurrentIP(spouseFP, localFP, oopForPointer(localIP)); + goto l882; + } + error("bad index"); + object2 = 0; + l882: /* end instVar:ofContext: */; + longAtPointerput((localSP -= BytesPerOop), object2); + } + else { + /* begin internalPush: */ + object11 = longAt((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord()))))); + longAtPointerput((localSP -= BytesPerOop), object11); + } + } + } + BREAK; + CASE(508) /*252*/ + /* extStoreRemoteTempOrInstVarLongBytecode */ + { + sqInt anOop; + sqInt frameNumArgs; + sqInt frameNumArgs1; + sqInt index1; + sqInt object; + int onCurrentPage; + sqInt senderOop; + sqInt slotIndex; + sqInt tempIndex; + sqInt tempVector; + char * theFP; + StackPage * thePage; + + VM_LABEL(extStoreRemoteTempOrInstVarLongBytecode); + slotIndex = byteAtPointer(++localIP); + tempIndex = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + if ((tempIndex & (remoteIsInstVarAccess())) == 0) { + /* begin storeRemoteTemp:inVectorAt: */ + tempVector = (tempIndex < ((frameNumArgs1 = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs1 - tempIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs1 - tempIndex) * BytesPerWord))); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(tempVector))); + if ((assert(isNonImmediate(tempVector)), + oopisGreaterThanOrEqualTo(tempVector, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if ((((longAtPointer(localSP)) & (tagMask())) == 0) + && (oopisLessThan(longAtPointer(localSP), GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(tempVector))) >> (rememberedBitShift())) & 1) != 0)) { + remember(tempVector); + } + } + } + longAtput((tempVector + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), longAtPointer(localSP)); + } + else { + slotIndex += ((sqInt)((usqInt)(extA) << 8)); + tempIndex -= remoteIsInstVarAccess(); + extA = (numExtB = (extB = 0)); + object = (tempIndex < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - tempIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - tempIndex) * BytesPerWord))); + /* begin storeMaybeContext:receiverVariable:withValue: */ + anOop = longAtPointer(localSP); + if ((slotIndex <= ReceiverIndex) + && ((((longAt(object)) & (classIndexMask())) == ClassMethodContextCompactIndex) + && (((longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)))) { + /* begin instVar:ofContext:put: */ + assert(isMarriedOrWidowedContext(object)); + assert(!((isObjImmutable(object)))); + /* begin writeBackHeadFramePointers */ + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + /* begin setHeadFP:andSP:inPage: */ + assert(localSP < localFP); + assert((localSP < ((GIV(stackPage)->baseAddress))) + && (localSP > (((GIV(stackPage)->realStackLimit)) - (LargeContextSlots * BytesPerOop)))); + assert((localFP < ((GIV(stackPage)->baseAddress))) + && (localFP > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); + (GIV(stackPage)->headFP = localFP); + (GIV(stackPage)->headSP = localSP); + assert(pageListIsWellFormed()); + if (!((((longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(object))))) { + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(object))); + if ((assert(isNonImmediate(object)), + oopisGreaterThanOrEqualTo(object, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anOop & (tagMask())) == 0) + && (oopisLessThan(anOop, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(object))) >> (rememberedBitShift())) & 1) != 0)) { + remember(object); + } + } + } + longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); + if (slotIndex == StackPointerIndex) { + } + goto l890; + } + /* begin frameOfMarriedContext: */ + senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + + if (slotIndex == SenderIndex) { + /* begin stackPageFor: */ + index1 = pageIndexForstackMemorybytesPerPage(theFP, GIV(stackMemory), GIV(bytesPerPage)); + thePage = stackPageAtpages(index1, GIV(pages)); + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + onCurrentPage = thePage == GIV(stackPage); + storeSenderOfFramewithValue(theFP, anOop); + if (onCurrentPage) { + localFP = (GIV(stackPage)->headFP); + localSP = (GIV(stackPage)->headSP); + } + else { + markStackPageMostRecentlyUsed(GIV(stackPage)); + } + goto l890; + } + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalDivorceFrameandContext(theFP, object); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(object))); + if ((assert(isNonImmediate(object)), + oopisGreaterThanOrEqualTo(object, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anOop & (tagMask())) == 0) + && (oopisLessThan(anOop, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(object))) >> (rememberedBitShift())) & 1) != 0)) { + remember(object); + } + } + } + longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); + if (slotIndex == StackPointerIndex) { + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + markStackPageMostRecentlyUsed(GIV(stackPage)); + assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); + l890: /* end instVar:ofContext:put: */; + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(object)))); + if (((((usqInt) (longAt(object))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), object); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), anOop); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l892; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(object))); + if ((assert(isNonImmediate(object)), + oopisGreaterThanOrEqualTo(object, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anOop & (tagMask())) == 0) + && (oopisLessThan(anOop, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(object))) >> (rememberedBitShift())) & 1) != 0)) { + remember(object); + } + } + } + longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); + l892: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + } + } + BREAK; + CASE(509) /*253*/ + /* extStoreAndPopRemoteTempOrInstVarLongBytecode */ + { + sqInt anOop; + sqInt frameNumArgs; + sqInt frameNumArgs1; + sqInt index1; + sqInt object; + int onCurrentPage; + sqInt senderOop; + sqInt slotIndex; + sqInt tempIndex; + sqInt tempVector; + char * theFP; + StackPage * thePage; + + VM_LABEL(extStoreAndPopRemoteTempOrInstVarLongBytecode); + /* begin extStoreRemoteTempOrInstVarLongBytecode */ + slotIndex = byteAtPointer(++localIP); + tempIndex = byteAtPointer(++localIP); + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + if ((tempIndex & (remoteIsInstVarAccess())) == 0) { + /* begin storeRemoteTemp:inVectorAt: */ + tempVector = (tempIndex < ((frameNumArgs1 = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs1 - tempIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs1 - tempIndex) * BytesPerWord))); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(tempVector))); + if ((assert(isNonImmediate(tempVector)), + oopisGreaterThanOrEqualTo(tempVector, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if ((((longAtPointer(localSP)) & (tagMask())) == 0) + && (oopisLessThan(longAtPointer(localSP), GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(tempVector))) >> (rememberedBitShift())) & 1) != 0)) { + remember(tempVector); + } + } + } + longAtput((tempVector + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), longAtPointer(localSP)); + } + else { + slotIndex += ((sqInt)((usqInt)(extA) << 8)); + tempIndex -= remoteIsInstVarAccess(); + extA = (numExtB = (extB = 0)); + object = (tempIndex < ((frameNumArgs = byteAt((localFP + FoxFrameFlags) + 1))) + ? longAt((localFP + FoxCallerSavedIP) + ((frameNumArgs - tempIndex) * BytesPerWord)) + : longAt(((localFP + FoxReceiver) - BytesPerWord) + ((frameNumArgs - tempIndex) * BytesPerWord))); + /* begin storeMaybeContext:receiverVariable:withValue: */ + anOop = longAtPointer(localSP); + if ((slotIndex <= ReceiverIndex) + && ((((longAt(object)) & (classIndexMask())) == ClassMethodContextCompactIndex) + && (((longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)))) { + /* begin instVar:ofContext:put: */ + assert(isMarriedOrWidowedContext(object)); + assert(!((isObjImmutable(object)))); + /* begin writeBackHeadFramePointers */ + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + /* begin setHeadFP:andSP:inPage: */ + assert(localSP < localFP); + assert((localSP < ((GIV(stackPage)->baseAddress))) + && (localSP > (((GIV(stackPage)->realStackLimit)) - (LargeContextSlots * BytesPerOop)))); + assert((localFP < ((GIV(stackPage)->baseAddress))) + && (localFP > (((GIV(stackPage)->realStackLimit)) - ((LargeContextSlots * BytesPerOop) / 2)))); + (GIV(stackPage)->headFP = localFP); + (GIV(stackPage)->headSP = localSP); + assert(pageListIsWellFormed()); + if (!((((longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(object))))) { + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(object))); + if ((assert(isNonImmediate(object)), + oopisGreaterThanOrEqualTo(object, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anOop & (tagMask())) == 0) + && (oopisLessThan(anOop, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(object))) >> (rememberedBitShift())) & 1) != 0)) { + remember(object); + } + } + } + longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); + if (slotIndex == StackPointerIndex) { + } + goto l900; + } + /* begin frameOfMarriedContext: */ + senderOop = longAt((object + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord()))))); + assert((senderOop & 1)); + theFP = pointerForOop(senderOop - 1); + + if (slotIndex == SenderIndex) { + /* begin stackPageFor: */ + index1 = pageIndexForstackMemorybytesPerPage(theFP, GIV(stackMemory), GIV(bytesPerPage)); + thePage = stackPageAtpages(index1, GIV(pages)); + assert(GIV(stackPage) == (mostRecentlyUsedPage())); + onCurrentPage = thePage == GIV(stackPage); + storeSenderOfFramewithValue(theFP, anOop); + if (onCurrentPage) { + localFP = (GIV(stackPage)->headFP); + localSP = (GIV(stackPage)->headSP); + } + else { + markStackPageMostRecentlyUsed(GIV(stackPage)); + } + goto l900; + } + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + externalDivorceFrameandContext(theFP, object); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(object))); + if ((assert(isNonImmediate(object)), + oopisGreaterThanOrEqualTo(object, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anOop & (tagMask())) == 0) + && (oopisLessThan(anOop, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(object))) >> (rememberedBitShift())) & 1) != 0)) { + remember(object); + } + } + } + longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); + if (slotIndex == StackPointerIndex) { + } + /* begin internalizeIPandSP */ + localIP = pointerForOop(GIV(instructionPointer)); + localSP = pointerForOop(GIV(stackPointer)); + localFP = pointerForOop(GIV(framePointer)); + markStackPageMostRecentlyUsed(GIV(stackPage)); + assertValidExecutionPointersimbarline(((usqInt)localIP), localFP, localSP, 1, __LINE__); + l900: /* end instVar:ofContext:put: */; + } + else { + /* begin storePointerImmutabilityCheck:ofObject:withValue: */ + +# if IMMUTABILITY + assert(!((isImmediate(object)))); + if (((((usqInt) (longAt(object))) >> (immutableBitShift())) & 1) != 0) { + /* begin cannotAssign:to:withIndex: */ + longAtPointerput((localSP -= BytesPerOop), object); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), anOop); + /* begin internalPush: */ + longAtPointerput((localSP -= BytesPerOop), (((usqInt)(slotIndex + 1) << 1) | 1)); + /* begin splObj: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorAttemptToAssign) << (shiftForWord()))))); + GIV(argumentCount) = 2; + goto normalSend; + goto l902; + } + +# endif /* IMMUTABILITY */ + + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(object))); + if ((assert(isNonImmediate(object)), + oopisGreaterThanOrEqualTo(object, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((anOop & (tagMask())) == 0) + && (oopisLessThan(anOop, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(object))) >> (rememberedBitShift())) & 1) != 0)) { + remember(object); + } + } + } + longAtput((object + BaseHeaderSize) + (((sqInt)((usqInt)(slotIndex) << (shiftForWord())))), anOop); + l902: /* end storePointerImmutabilityCheck:ofObject:withValue: */; + } + } + /* begin internalPop: */ + localSP += 1 * BytesPerOop; + } + BREAK; + CASE(510) /*254*/ + /* extJumpIfNotInstanceOfBehaviorsBytecode */ + { + sqInt distance; + sqInt i; + sqInt iLimiT; + int inverse; + sqInt literal; + sqInt oop; + sqInt tagBits; + sqInt top; + sqInt tosClassTag; + + VM_LABEL(extJumpIfNotInstanceOfBehaviorsBytecode); + assert(((extB & 128) == 0) + || (extB < 0)); + if ((inverse = extB < 0)) { + extB += 128; + } + /* begin fetchClassTagOf: */ + top = longAt(localSP); + localSP += BytesPerOop; + oop = top; + tosClassTag = (((tagBits = oop & (tagMask()))) != 0 + ? ((tagBits & 1) != 0 + ? 1 + : tagBits) + : (longAt(oop)) & (classIndexMask())); + assert(GIV(method) == (iframeMethod(localFP))); + /* begin fetchPointer:ofObject: */ + literal = longAt((GIV(method) + BaseHeaderSize) + (((sqInt)((usqInt)((((((sqInt)((usqInt)(extA) << 8))) + (byteAtPointer(++localIP))) + LiteralStart)) << (shiftForWord()))))); + + distance = (((sqInt)((usqInt)(extB) << 8))) + (byteAtPointer(++localIP)); + extA = (extB = (numExtB = 0)); + if (((((usqInt) (longAt(literal))) >> (formatShift())) & (formatMask())) == 2) { + for (i = 0, iLimiT = ((((sqInt)(numSlotsOf(literal)))) - 1); i <= iLimiT; i += 1) { + if (tosClassTag == (rawClassTagForClass(longAt((literal + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))))))) { + if (inverse) { + localIP += distance; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l906; + } + } + if (!inverse) { + localIP += distance; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + goto l906; + } + if ((tosClassTag == ((long32At(literal + 4)) & (identityHashHalfWordMask()))) == inverse) { + localIP += distance; + } + /* begin fetchNextBytecode */ + currentBytecode = (byteAtPointer(++localIP)) + GIV(bytecodeSetSelector); + + } + l906: /* end case */; + BREAK; + } + } + + /* undo the pre-increment of IP before returning */ + localIP -= 1; + /* begin externalizeIPandSP */ + GIV(instructionPointer) = oopForPointer(localIP); + GIV(stackPointer) = localSP; + GIV(framePointer) = localFP; + return null; +} + + +/* For assert-checking */ + + /* CogStackPage>>#addressIsInPage: */ +static sqInt NoDbgRegParms +addressIsInPage(StackPage * self_in_addressIsInPage, char *address) +{ + return (((self_in_addressIsInPage->lastAddress)) < address) + && (address < ((self_in_addressIsInPage->baseAddress))); +} + + /* CogStackPage>>#isFree */ +static sqInt NoDbgRegParms +isFree(StackPage * self_in_isFree) +{ + return ((self_in_isFree->baseFP)) == 0; +} + + +/* */ +/* MRUP-->used page<->used page<->used page<->used page<--LRUP + ^ <-next-prev-> ^ + | | + v <-prev-next-> v + free page<->free page<->free page<->free page */ + + /* CogStackPages>>#freeStackPageNoAssert: */ +static void NoDbgRegParms +freeStackPageNoAssert(StackPage *aPage) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + StackPage *prev; + + (aPage->baseFP = 0); + if (aPage == GIV(mostRecentlyUsedPage)) { + GIV(mostRecentlyUsedPage) = (GIV(mostRecentlyUsedPage)->prevPage); + return; + } + if ((((prev = (aPage->prevPage))->baseFP)) == 0) { + return; + } + (prev->nextPage = (aPage->nextPage)); + (((aPage->nextPage))->prevPage = prev); + (aPage->nextPage = (GIV(mostRecentlyUsedPage)->nextPage)); + (((GIV(mostRecentlyUsedPage)->nextPage))->prevPage = aPage); + (aPage->prevPage = GIV(mostRecentlyUsedPage)); + (GIV(mostRecentlyUsedPage)->nextPage = aPage); +} + + +/* */ +/* MRUP-->used page<->used page<->used page<->used page<--LRUP + ^ <-next-prev-> ^ + | | + v <-prev-next-> v + free page<->free page<->free page<->free page */ + + /* CogStackPages>>#freeStackPage: */ +static sqInt NoDbgRegParms +freeStackPage(StackPage *aPage) +{ + freeStackPageNoAssert(aPage); + assert(pageListIsWellFormed()); + return 0; +} + + +/* */ +/* MRUP-->used page<->used page<->used page<->used page<--LRUP + ^ <-next-prev-> ^ + | | + v <-prev-next-> v + free page<->free page<->free page<->free page */ + + /* CogStackPages>>#markStackPageMostRecentlyUsed: */ +static void NoDbgRegParms +markStackPageMostRecentlyUsed(StackPage *page) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + if (page == GIV(mostRecentlyUsedPage)) { + return; + } + if (((page->prevPage)) == GIV(mostRecentlyUsedPage)) { + GIV(mostRecentlyUsedPage) = page; + assert(pageListIsWellFormed()); + return; + } + (((page->prevPage))->nextPage = (page->nextPage)); + (((page->nextPage))->prevPage = (page->prevPage)); + (((GIV(mostRecentlyUsedPage)->nextPage))->prevPage = page); + (page->prevPage = GIV(mostRecentlyUsedPage)); + (page->nextPage = (GIV(mostRecentlyUsedPage)->nextPage)); + (GIV(mostRecentlyUsedPage)->nextPage = page); + GIV(mostRecentlyUsedPage) = page; + assert(pageListIsWellFormed()); +} + + +/* */ +/* This method is used to move a page to a position in the list such that it + cannot be deallocated when a new page is allocated, without changing the + most recently + used page. There must be at least 3 pages in the system. So making the + page the MRU's prevPage is sufficient to ensure it won't be deallocated. */ +/* MRUP-->used page<->used page<->used page<->used page<--LRUP + ^ <-next-prev-> ^ + | | + v <-prev-next-> v + free page<->free page<->free page<->free page */ + + /* CogStackPages>>#markStackPageNextMostRecentlyUsed: */ +static void NoDbgRegParms +markStackPageNextMostRecentlyUsed(StackPage *page) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + assert(page != GIV(mostRecentlyUsedPage)); + if (((page->nextPage)) == GIV(mostRecentlyUsedPage)) { + return; + } + (((page->prevPage))->nextPage = (page->nextPage)); + (((page->nextPage))->prevPage = (page->prevPage)); + (((GIV(mostRecentlyUsedPage)->prevPage))->nextPage = page); + (page->prevPage = (GIV(mostRecentlyUsedPage)->prevPage)); + (page->nextPage = GIV(mostRecentlyUsedPage)); + (GIV(mostRecentlyUsedPage)->prevPage = page); + assert(pageListIsWellFormed()); +} + + +/* MRUP-->used page<->used page<->used page<->used page<--LRUP + ^ <-next-prev-> ^ + | | + v <-prev-next-> v + free page<->free page<->free page<->free page */ + + /* CogStackPages>>#newStackPage */ +static StackPage * +newStackPage(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + StackPage *lruOrFree; + + lruOrFree = (GIV(mostRecentlyUsedPage)->nextPage); + if (((lruOrFree->baseFP)) == 0) { + return lruOrFree; + } + divorceFramesIn(lruOrFree); + return lruOrFree; +} + + +/* Answer if the stack page list is well-formed. + MRUP-->used page<->used page<->used page<->used page<--LRUP + ^ <-next-prev-> ^ + | | + v <-prev-next-> v + free page<->free page<->free page<->free page */ + + /* CogStackPages>>#pageListIsWellFormed */ +static sqInt +pageListIsWellFormed(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt count; + sqInt limit; + sqInt ok; + StackPage *page; + + ok = 1; + page = (GIV(mostRecentlyUsedPage)->nextPage); + count = 1; + limit = GIV(numStackPages) * 2; + while ((((page->baseFP)) == 0) + && ((page != GIV(mostRecentlyUsedPage)) + && (count <= limit))) { + if (!(asserta(((((page->nextPage))->prevPage)) == page))) { + ok = 0; + } + page = (page->nextPage); + count += 1; + } + while ((page != GIV(mostRecentlyUsedPage)) + && (count <= limit)) { + if (!(asserta(((((page->nextPage))->prevPage)) == page))) { + ok = 0; + } + if (asserta(!(isFree(page)))) { + if (!(asserta((addressIsInPage(page, (page->baseFP))) + && (addressIsInPage(page, (page->headSP)))))) { + ok = 0; + } + } + else { + ok = 0; + } + page = (page->nextPage); + count += 1; + } + if (!(asserta(count == (numStkPages())))) { + ok = 0; + } + return ok; +} + + +/* Answer the page for a page index. + N.B. This is a zero-relative index. */ + + /* CogStackPages>>#stackPageAt: */ +static StackPage * NoDbgRegParms +stackPageAt(sqInt index) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return stackPageAtpages(index, GIV(pages)); +} + + +/* */ + + /* CogStackPages>>#stackPageFor: */ +static StackPage * NoDbgRegParms +stackPageFor(void *pointer) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt index; + + /* begin stackPageAt: */ + index = pageIndexForstackMemorybytesPerPage(pointer, GIV(stackMemory), GIV(bytesPerPage)); + return stackPageAtpages(index, GIV(pages)); +} + + /* CogStackPages>>#statAverageLivePagesWhenMapping */ +static double +statAverageLivePagesWhenMapping(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (((double) GIV(statPageCountWhenMappingSum) )) / GIV(statNumMaps); +} + + /* InterpreterPrimitives>>#canBeImmutable: */ +#if IMMUTABILITY +static sqInt NoDbgRegParms +canBeImmutable(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt objOop; + sqInt processLists; + sqInt scheduler; + + assert(isNonImmediate(oop)); + if (((oop & (tagMask())) == 0) + && (((longAt(oop)) & (classIndexMask())) == ClassMethodContextCompactIndex)) { + return 0; + } + if ((assert(isNonImmediate(oop)), + isEphemeronFormat((((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask())))) { + return 0; + } + if (isWeakFormat((((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()))) { + return 0; + } + if (((longAt(oop)) & (classIndexMask())) == (rawHashBitsOf(splObj(ClassSemaphore)))) { + return 0; + } + /* begin fetchPointer:ofObject: */ + objOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SchedulerAssociation) << (shiftForWord()))))); + scheduler = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); + processLists = longAt((scheduler + BaseHeaderSize) + (((int)((usqInt)(ProcessListsIndex) << (shiftForWord()))))); + if (oop == scheduler) { + return 0; + } + if (oop == processLists) { + return 0; + } + if ((classIndexOf(longAt((processLists + BaseHeaderSize) + (1U << (shiftForWord()))))) == ((longAt(oop)) & (classIndexMask()))) { + return 0; + } + if ((classIndexOf(longAt((scheduler + BaseHeaderSize) + (((int)((usqInt)(ActiveProcessIndex) << (shiftForWord()))))))) == ((longAt(oop)) & (classIndexMask()))) { + return 0; + } + return 1; +} +#endif /* IMMUTABILITY */ + + +/* Answer either a malloced string with the null-terminated contents of oop + if oop is a string, + or the null pointer if oop is nil, or fail. It is the client's + responsibility to free the string later. */ + + /* InterpreterPrimitives>>#cStringOrNullFor: */ +char * +cStringOrNullFor(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt classOop; + char *cString; + sqInt fmt; + sqInt isString; + sqInt len; + usqInt numSlots; + usqInt numSlots1; + + /* begin is:instanceOf:compactClassIndex: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassByteString) << (shiftForWord()))))); + if (oop & (tagMask())) { + isString = 0; + goto l2; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex = (longAt(oop)) & (classIndexMask()); + isString = ClassByteStringCompactIndex == ccIndex; + goto l2; + +l2: /* end is:instanceOf:compactClassIndex: */; + if (!isString) { + if (oop != GIV(nilObj)) { + GIV(primFailCode) = PrimErrBadArgument; + } + return 0; + } + /* begin lengthOf:format: */ + fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOfAny: */ + numSlots1 = byteAt(oop + 7); + numSlots = (numSlots1 == (numSlotsMask()) + ? longAt(oop - BaseHeaderSize) + : numSlots1); + if (fmt <= 5) { + len = numSlots; + goto l4; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + len = (numSlots << (shiftForWord())) - (fmt & 7); + goto l4; + } + if (fmt >= (firstShortFormat())) { + len = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); + goto l4; + } + if (fmt >= (firstLongFormat())) { + len = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); + goto l4; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + len = ((usqInt) numSlots) >> 1; + goto l4; + } + len = 0; +l4: /* end lengthOf:format: */; + if (len == 0) { + return 0; + } + cString = malloc(len + 1); + if (!(cString)) { + GIV(primFailCode) = PrimErrNoCMemory; + return 0; + } + memcpy(cString, firstIndexableField(oop), len); + cString[len] = 0; + return cString; +} + + +/* In C, non-zero is true, so avoid computation by simply answering + primFailCode in the C version. + */ + + /* InterpreterPrimitives>>#failed */ +sqInt +failed(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return GIV(primFailCode); +} + + +/* Answer true if integer object is negative. + Fail if object pointed by oop i not an integer. */ + + /* InterpreterPrimitives>>#isNegativeIntegerValueOf: */ +static sqInt NoDbgRegParms +isNegativeIntegerValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + sqInt ok; + sqInt smallInt; + + if ((oop & 1)) { + smallInt = (oop >> 1); + return smallInt < 0; + } + if ((oop & (tagMask())) == 0) { + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex; + goto l2; + + l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex1; + goto l4; + + l4: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + return 1; + } + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; +} + + +/* Return a Large Integer object for the given integer magnitude and sign */ + + /* InterpreterPrimitives>>#magnitude64BitIntegerFor:neg: */ +static sqInt NoDbgRegParms +magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqInt highWord; + int isSmall; + sqInt largeClass; + sqInt newLargeInteger; + sqInt smallVal; + sqInt sz; + + isSmall = (isNegative + ? magnitude <= ((MaxSmallInteger) + 1) + : magnitude <= (MaxSmallInteger)); + if (isSmall) { + smallVal = ((sqInt) magnitude); + if (isNegative) { + smallVal = 0 - smallVal; + } + return (((usqInt)smallVal << 1) | 1); + } + if (isNegative) { + assert(((ClassLargeNegativeIntegerCompactIndex >= 1) && (ClassLargeNegativeIntegerCompactIndex <= (classTablePageSize())))); + /* begin fetchPointer:ofObject: */ + largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargeNegativeIntegerCompactIndex) << (shiftForWord()))))); + + } + else { + assert(((ClassLargePositiveIntegerCompactIndex >= 1) && (ClassLargePositiveIntegerCompactIndex <= (classTablePageSize())))); + /* begin fetchPointer:ofObject: */ + largeClass = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((int)((usqInt)(ClassLargePositiveIntegerCompactIndex) << (shiftForWord()))))); + + } + if (((highWord = magnitude >> 32)) == 0) { + sz = 4; + } + else { + sz = 5; + if (!(((highWord = ((usqInt) highWord) >> 8)) == 0)) { + sz += 1; + if (!(((highWord = ((usqInt) highWord) >> 8)) == 0)) { + sz += 1; + if (!(((highWord = ((usqInt) highWord) >> 8)) == 0)) { + sz += 1; + } + } + } + } + + newLargeInteger = instantiateClassindexableSize(largeClass, sz); + + /* Memory is eight byte aligned in SPUR, so we are sure to have room for 64bits word whatever allocated sz */ + long64Atput((newLargeInteger + BaseHeaderSize) + (0U << 3), SQ_SWAP_8_BYTES_IF_BIGENDIAN(magnitude)); + + return newLargeInteger; +} + + +/* Convert the given object into an integer value. + The object may be either a positive SmallInteger or an eight-byte + LargeInteger. + */ + + /* InterpreterPrimitives>>#magnitude64BitValueOf: */ +static usqLong NoDbgRegParms +magnitude64BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + sqInt fmt; + sqInt ok; + sqInt smallIntValue; + sqInt sz; + usqLong value; + + if ((oop & 1)) { + smallIntValue = (oop >> 1); + if (smallIntValue < 0) { + smallIntValue = 0 - smallIntValue; + } + return ((usqLong) smallIntValue); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l4; + +l4: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l2; + + l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + } + /* begin numBytesOfBytes: */ + fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); + assert(fmt >= (firstByteFormat())); + sz = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); + if (sz > (sizeof(sqLong))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (sz > 4) { + value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); + } + else { + + /* ] */ + value = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } + return value; +} + + +/* Convert the given object into an integer value. + The object may be a four-byte LargeInteger. */ + + /* InterpreterPrimitives>>#noInlineSigned32BitValueGutsOf: */ +static int NoDbgRegParms +noInlineSigned32BitValueGutsOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt ccIndex1; + unsigned int magnitude; + sqInt negative; + sqInt ok; + int value; + + assert(!((hasSixtyFourBitImmediates()))); + assert(!(((oop & 1)))); + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex1 = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l4; + +l4: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (ok) { + negative = 0; + } + else { + negative = 1; + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargeNegativeIntegerCompactIndex == ccIndex; + goto l2; + + l2: /* 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: */ +unsigned int +positive32BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt fmt; + sqInt ok; + sqInt sz; + sqInt value; + + /* begin maybeInlinePositive32BitValueOf: */ + if ((oop & 1)) { + value = (oop >> 1); + if (value < 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + value = 0; + } + return value; + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + else { + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex; + goto l2; + + l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin numBytesOfBytes: */ + fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); + assert(fmt >= (firstByteFormat())); + sz = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); + if (sz > 4) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } + +} + + +/* Convert the given object into an integer value. + The object may be either a positive SmallInteger or an eight-byte + LargePositiveInteger. + */ + + /* InterpreterPrimitives>>#positive64BitValueOf: */ +usqLong +positive64BitValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ccIndex; + sqInt fmt; + sqInt ok; + sqInt sz; + usqLong value; + + if ((oop & 1)) { + if (((oop >> 1)) < 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + return (oop >> 1); + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin numBytesOfBytes: */ + fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); + assert(fmt >= (firstByteFormat())); + sz = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); + if (sz > (sizeof(sqLong))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (sz > 4) { + value = SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); + } + else { + + /* ] */ + value = ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } + 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 + of size <= word size. + */ +/* only two callers & one is primitiveNewWithArg */ + + /* InterpreterPrimitives>>#positiveMachineIntegerValueOf: */ +usqIntptr_t +positiveMachineIntegerValueOf(sqInt oop) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt bs; + sqInt ccIndex; + sqInt fmt; + sqInt ok; + sqInt value; + + if ((oop & 1)) { + value = (oop >> 1); + if (value < 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + return value; + } + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop))); + /* begin classIndexOf: */ + ccIndex = (longAt(oop)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + /* begin numBytesOfBytes: */ + fmt = (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()); + assert(fmt >= (firstByteFormat())); + bs = ((numSlotsOf(oop)) << (shiftForWord())) - (fmt & 7); + if (bs > (sizeof(usqIntptr_t))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; + } + if (((sizeof(usqIntptr_t)) == 8) + && (bs > 4)) { + return SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop + BaseHeaderSize) + (0U << 3)))); + } + else { + return ((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop + BaseHeaderSize) + (0U << 2)))))); + } +} + + /* InterpreterPrimitives>>#primitiveAdd */ +static void +primitiveAdd(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt integerResult; + char *sp; + + /* begin pop2AndPushIntegerIfOK: */ + integerResult = (stackIntegerValue(1)) + (stackIntegerValue(0)); + if (!GIV(primFailCode)) { + if ((((sqInt)((((usqInt)integerResult)) ^ ((((usqInt)integerResult)) << 1)))) >= 0) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 1) | 1)); + GIV(stackPointer) = sp; + } + else { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + } + } +} + + +/* Primitive arithmetic operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveAddLargeIntegers */ +EXPORT(void) +primitiveAddLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqLong a; + sqInt aIsNegative; + usqLong b; + sqInt bIsNegative; + sqInt oopArg; + sqInt oopRcvr; + sqInt oopResult; + usqLong result; + sqInt resultIsNegative; + char *sp; + + oopArg = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + oopRcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + aIsNegative = isNegativeIntegerValueOf(oopRcvr); + bIsNegative = isNegativeIntegerValueOf(oopArg); + a = magnitude64BitValueOf(oopRcvr); + b = magnitude64BitValueOf(oopArg); + if (GIV(primFailCode)) { + return; + } + if (aIsNegative == bIsNegative) { + + /* Protect against overflow */ + if (a > (0xFFFFFFFFFFFFFFFFULL - b)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + result = a + b; + resultIsNegative = aIsNegative; + } + else { + if (a >= b) { + result = a - b; + resultIsNegative = aIsNegative; + } + else { + result = b - a; + resultIsNegative = bIsNegative; + } + } + oopResult = magnitude64BitIntegerForneg(result, resultIsNegative); + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oopResult); + GIV(stackPointer) = sp; + } +} + + +/* Primitive. Change the class of the argument to make it an instance of the + receiver given that the format of the receiver matches the format of the + argument's class. + Fail if receiver or argument are SmallIntegers, or the receiver is an + instance of a + compact class and the argument isn't, or when the argument's class is + compact and + the receiver isn't, or when the format of the receiver is different from + the format of + the argument's class, or when the arguments class is fixed and the + receiver's size + differs from the size that an instance of the argument's class should + have. + */ + + /* InterpreterPrimitives>>#primitiveAdoptInstance */ +static void +primitiveAdoptInstance(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt arg; + sqInt err; + sqInt i; + sqInt rcvr; + + arg = longAt(GIV(stackPointer)); + rcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if ((arg & (tagMask())) + || ((GIV(argumentCount) > 1) + && ((rcvr & (tagMask())) + || (!(objCouldBeClassObj(rcvr)))))) { + GIV(primFailCode) = PrimErrBadArgument; + return; + } + err = changeClassOfto(arg, rcvr); + if (err == 0) { + + /* Flush at cache because rcvr's class has changed. */ + /* begin flushAtCache */ + for (i = 1; i <= AtCacheTotalSize; i += 1) { + GIV(atCache)[i] = 0; + } + /* begin pop: */ + GIV(stackPointer) += GIV(argumentCount) * BytesPerWord; + } + else { + GIV(primFailCode) = err; + } + return; +} + + +/* Answer an array of all instances of the receiver that exist + when the primitive is called, excluding any that may be + garbage collected as a side effect of allocating the result array. */ + + /* InterpreterPrimitives>>#primitiveAllInstances */ +EXPORT(void) +primitiveAllInstances(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt delta; + sqInt result; + char *sp; + + result = allInstancesOf(longAt(GIV(stackPointer))); + if ((result & 1)) { + /* begin growToAccomodateContainerWithNumSlots: */ + delta = (BaseHeaderSize * 2) + (((result >> 1)) * BytesPerOop); + growOldSpaceByAtLeast(((GIV(growHeadroom) < delta) ? delta : GIV(growHeadroom))); + result = allInstancesOf(longAt(GIV(stackPointer))); + if ((result & 1)) { + GIV(primFailCode) = PrimErrNoMemory; + return; + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), result); + GIV(stackPointer) = sp; +} + + +/* Answer an array of all objects that exist when the primitive + is called, excluding those that may be garbage collected as + a side effect of allocating the result array. */ + + /* InterpreterPrimitives>>#primitiveAllObjects */ +EXPORT(void) +primitiveAllObjects(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt delta; + sqInt result; + char *sp; + + result = allObjects(); + if ((result & 1)) { + /* begin growToAccomodateContainerWithNumSlots: */ + delta = (BaseHeaderSize * 2) + (((result >> 1)) * BytesPerOop); + growOldSpaceByAtLeast(((GIV(growHeadroom) < delta) ? delta : GIV(growHeadroom))); + result = allObjects(); + if ((result & 1)) { + GIV(primFailCode) = PrimErrNoMemory; + return; + } + } + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), result); + GIV(stackPointer) = sp; +} + + +/* N.B. IMO we should be able to assume the receiver is a float because this + primitive is specific to floats. eem 2/13/2017 + */ + + /* InterpreterPrimitives>>#primitiveArctan */ +static void +primitiveArctan(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aValue; + sqInt isFloat; + sqInt oop; + double rcvr; + double result; + + /* begin stackFloatValue: */ + oop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + isFloat = ((oop & (tagMask())) == 0) + && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(oop + BaseHeaderSize, result); + rcvr = result; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l2: /* end stackFloatValue: */; + if (!GIV(primFailCode)) { + /* begin stackTopPut: */ + aValue = floatObjectOf(atan(rcvr)); + longAtPointerput(GIV(stackPointer), aValue); + } +} + + +/* We must flush the method cache here, to eliminate stale references + to mutated classes and/or selectors. */ + + /* InterpreterPrimitives>>#primitiveArrayBecome */ +static void +primitiveArrayBecome(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt arg; + sqInt ec; + sqInt rcvr; + + arg = longAt(GIV(stackPointer)); + rcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + ec = becomewithtwoWaycopyHash(rcvr, arg, 1, 0); + if (ec == PrimNoErr) { + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + } + else { + GIV(primFailCode) = ec; + } +} + + +/* We must flush the method cache here, to eliminate stale references + to mutated classes and/or selectors. */ + + /* InterpreterPrimitives>>#primitiveArrayBecomeOneWay */ +static void +primitiveArrayBecomeOneWay(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt arg; + sqInt ec; + sqInt rcvr; + + arg = longAt(GIV(stackPointer)); + rcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + ec = becomewithtwoWaycopyHash(rcvr, arg, 0, 1); + if (ec == PrimNoErr) { + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + } + else { + GIV(primFailCode) = ec; + } +} + + +/* Similar to primitiveArrayBecomeOneWay but accepts a third argument + deciding whether to + copy the receiver's element's identity hash over the argument's elementy's + identity hash. + */ + + /* InterpreterPrimitives>>#primitiveArrayBecomeOneWayCopyHash */ +static void +primitiveArrayBecomeOneWayCopyHash(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt copyHashFlag; + sqInt ec; + + copyHashFlag = 0; + if ((longAt(GIV(stackPointer))) == GIV(trueObj)) { + copyHashFlag = 1; + } + else { + if ((longAt(GIV(stackPointer))) == GIV(falseObj)) { + copyHashFlag = 0; + } + else { + GIV(primFailCode) = PrimErrBadArgument; + return; + } + } + ec = becomewithtwoWaycopyHash(longAt(GIV(stackPointer) + (2 * BytesPerWord)), longAt(GIV(stackPointer) + (1 * BytesPerWord)), 0, copyHashFlag); + if (ec == PrimNoErr) { + /* begin pop: */ + GIV(stackPointer) += GIV(argumentCount) * BytesPerWord; + } + else { + GIV(primFailCode) = ec; + } +} + + /* InterpreterPrimitives>>#primitiveAsCharacter */ +static void +primitiveAsCharacter(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt characterCode; + sqInt characterObject; + sqInt reasonCode; + char *sp; + + characterCode = longAt(GIV(stackPointer)); + if (!(((characterCode & 1)) + && (((characterCode = (characterCode >> 1)), + ((characterCode >= 0) && (characterCode <= ((1U << 30) - 1))))))) { + /* begin primitiveFailFor: */ + reasonCode = (GIV(argumentCount) == 0 + ? PrimErrBadReceiver + : PrimErrBadArgument); + GIV(primFailCode) = reasonCode; + return; + } + /* begin characterObjectOf: */ + characterObject = (((sqInt)((usqInt)(characterCode) << (numTagBits())))) + (characterTag()); + + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), characterObject); + GIV(stackPointer) = sp; +} + + +/* N.B. This will answer inexact results for integers with > 53 bits of + magnitude. + */ + + /* InterpreterPrimitives>>#primitiveAsFloat */ +static void +primitiveAsFloat(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt rcvr; + char *sp; + + rcvr = longAt(GIV(stackPointer)); + assert((rcvr & 1)); + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), floatObjectOf(((double) ((rcvr >> 1)) ))); + GIV(stackPointer) = sp; +} + + /* InterpreterPrimitives>>#primitiveAt */ +static void +primitiveAt(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt class; + sqInt classFormat; + sqInt fixedFields; + usqLong fmt; + sqLong hdr; + sqInt index; + unsigned int integerValue; + usqInt newLargeInteger; + usqInt newObj; + usqInt numBytes; + usqInt numSlots; + usqInt numSlots1; + sqInt objFormat; + sqInt rcvr; + sqInt reasonCode; + sqInt result; + char *sp; + sqInt sp1; + sqInt sp2; + sqInt stSize; + sqInt totalLength; + sqInt valueWord; + + /* begin commonAt: */ + GIV(primFailCode) = 0; + rcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + index = longAt(GIV(stackPointer)); + if (rcvr & (tagMask())) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrInappropriate; + goto l14; + } + if (((index & 1) == 0) + || ((GIV(argumentCount) > 1) + && (((longAt(rcvr)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l14; + } + index = (index >> 1); + /* begin stObject:at: */ + hdr = long64At(rcvr); + fmt = (((unsigned sqLong)hdr) >> (formatShift())) & (formatMask()); + /* begin lengthOf:format: */ + numSlots1 = byteAt(rcvr + 7); + numSlots = (numSlots1 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots1); + if (fmt <= 5) { + totalLength = numSlots; + goto l6; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength = (numSlots << (shiftForWord())) - (fmt & 7); + goto l6; + } + if (fmt >= (firstShortFormat())) { + totalLength = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); + goto l6; + } + if (fmt >= (firstLongFormat())) { + totalLength = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); + goto l6; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + totalLength = ((usqInt) numSlots) >> 1; + goto l6; + } + totalLength = 0; +l6: /* end lengthOf:format: */; + /* begin fixedFieldsOf:format:length: */ + if ((fmt >= (sixtyFourBitIndexableFormat())) + || (fmt == 2)) { + fixedFields = 0; + goto l7; + } + if (fmt < 2) { + fixedFields = totalLength; + goto l7; + } + class = fetchClassOfNonImm(rcvr); + /* begin fixedFieldsOfClassFormat: */ + classFormat = ((longAt((class + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1); + fixedFields = classFormat & ((1U << (fixedFieldsFieldWidth())) - 1); +l7: /* end fixedFieldsOf:format:length: */; + if ((fmt == (indexablePointersFormat())) + && ((hdr & (classIndexMask())) == ClassMethodContextCompactIndex)) { + /* begin stackPointerForMaybeMarriedContext: */ + if ((((longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(rcvr)))) { + sp2 = stackPointerIndexForFrame(frameOfMarriedContext(rcvr)); + assert((ReceiverIndex + ((sp2 >> 1))) < (lengthOf(rcvr))); + stSize = sp2; + goto l4; + } + /* begin fetchStackPointerOf: */ + sp1 = longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); + if (!((sp1 & 1))) { + stSize = 0; + goto l4; + } + assert((ReceiverIndex + ((sp1 >> 1))) < (lengthOf(rcvr))); + stSize = (sp1 >> 1); + l4: /* end stackPointerForMaybeMarriedContext: */; + if ((oopisGreaterThanOrEqualTo(index, 1)) + && ((oopisLessThanOrEqualTo(index, stSize)) + && ((((longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(rcvr)))))) { + result = noInlineTemporaryin(index - 1, frameOfMarriedContext(rcvr)); + goto l13; + } + } + else { + stSize = totalLength - fixedFields; + } + if ((oopisGreaterThanOrEqualTo(index, (fmt >= (firstCompiledMethodFormat()) + ? (((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1 + : 1))) + && (oopisLessThanOrEqualTo(index, stSize))) { + /* begin subscript:with:format: */ + if (fmt <= 5) { + /* begin fetchPointer:ofObject: */ + result = longAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << (shiftForWord()))))); + goto l13; + } + if (fmt >= (firstByteFormat())) { + result = (((usqInt)(byteAt((rcvr + BaseHeaderSize) + ((index + fixedFields) - 1))) << 1) | 1); + goto l13; + } + if (fmt >= (firstShortFormat())) { + result = (((usqInt)(((unsigned short) (shortAt((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 1))))))) << 1) | 1); + goto l13; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + result = positive64BitIntegerFor(long64At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 3))))); + goto l13; + } + + /* begin positive32BitIntegerFor: */ + integerValue = long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields) - 1)) << 2)))); + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) { + result = ((integerValue << 1) | 1); + goto l13; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l10; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; + l10: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + result = newLargeInteger; + goto l13; + + } + /* begin primitiveFailFor: */ + reasonCode = (fmt <= 1 + ? PrimErrBadReceiver + : PrimErrBadIndex); + GIV(primFailCode) = reasonCode; + result = 0; +l13: /* end stObject:at: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), result); + GIV(stackPointer) = sp; + } +l14: /* end commonAt: */; +} + + /* InterpreterPrimitives>>#primitiveAtPut */ +static void +primitiveAtPut(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt class1; + sqInt classFormat1; + sqInt fixedFields1; + usqLong fmt1; + sqLong hdr1; + sqInt index; + usqInt numSlots11; + usqInt numSlots2; + sqInt rcvr; + sqInt reasonCode1; + sqInt signedValueToStore1; + char *sp; + sqInt sp11; + sqInt sp3; + sqInt stSize1; + sqInt totalLength1; + usqLong unsigned64BitValueToStore1; + unsigned int unsignedValueToStore1; + sqInt value; + + /* begin commonAtPut: */ + GIV(primFailCode) = 0; + rcvr = longAt(GIV(stackPointer) + (2 * BytesPerWord)); + index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + value = longAt(GIV(stackPointer)); + if (rcvr & (tagMask())) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrInappropriate; + goto l30; + } + if (((index & 1) == 0) + || ((GIV(argumentCount) > 2) + && (((longAt(rcvr)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + goto l30; + } + if ( +# if IMMUTABILITY + (/* begin isImmutable: */ + ((((usqInt) (longAt(rcvr))) >> (immutableBitShift())) & 1) != 0) +# else /* IMMUTABILITY */ + 0 +# endif /* IMMUTABILITY */ + ) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrNoModification; + goto l30; + } + index = (index >> 1); + /* begin stObject:at:put: */ + hdr1 = long64At(rcvr); + fmt1 = (((unsigned sqLong)hdr1) >> (formatShift())) & (formatMask()); + /* begin lengthOf:format: */ + numSlots11 = byteAt(rcvr + 7); + numSlots2 = (numSlots11 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots11); + if (fmt1 <= 5) { + totalLength1 = numSlots2; + goto l21; + } + if (fmt1 >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + totalLength1 = (numSlots2 << (shiftForWord())) - (fmt1 & 7); + goto l21; + } + if (fmt1 >= (firstShortFormat())) { + totalLength1 = (numSlots2 << ((shiftForWord()) - 1)) - (fmt1 & 3); + goto l21; + } + if (fmt1 >= (firstLongFormat())) { + totalLength1 = (numSlots2 << ((shiftForWord()) - 2)) - (fmt1 & 1); + goto l21; + } + if (fmt1 == (sixtyFourBitIndexableFormat())) { + totalLength1 = ((usqInt) numSlots2) >> 1; + goto l21; + } + totalLength1 = 0; +l21: /* end lengthOf:format: */; + /* begin fixedFieldsOf:format:length: */ + if ((fmt1 >= (sixtyFourBitIndexableFormat())) + || (fmt1 == 2)) { + fixedFields1 = 0; + goto l16; + } + if (fmt1 < 2) { + fixedFields1 = totalLength1; + goto l16; + } + class1 = fetchClassOfNonImm(rcvr); + /* begin fixedFieldsOfClassFormat: */ + classFormat1 = ((longAt((class1 + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1); + fixedFields1 = classFormat1 & ((1U << (fixedFieldsFieldWidth())) - 1); +l16: /* end fixedFieldsOf:format:length: */; + if ((fmt1 == (indexablePointersFormat())) + && ((hdr1 & (classIndexMask())) == ClassMethodContextCompactIndex)) { + /* begin stackPointerForMaybeMarriedContext: */ + if ((((longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(rcvr)))) { + sp3 = stackPointerIndexForFrame(frameOfMarriedContext(rcvr)); + assert((ReceiverIndex + ((sp3 >> 1))) < (lengthOf(rcvr))); + stSize1 = sp3; + goto l17; + } + /* begin fetchStackPointerOf: */ + sp11 = longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(StackPointerIndex) << (shiftForWord()))))); + if (!((sp11 & 1))) { + stSize1 = 0; + goto l17; + } + assert((ReceiverIndex + ((sp11 >> 1))) < (lengthOf(rcvr))); + stSize1 = (sp11 >> 1); + l17: /* end stackPointerForMaybeMarriedContext: */; + if ((oopisGreaterThanOrEqualTo(index, 1)) + && ((oopisLessThanOrEqualTo(index, stSize1)) + && ((((longAt((rcvr + BaseHeaderSize) + (((int)((usqInt)(SenderIndex) << (shiftForWord())))))) & 1)) + && (!(isWidowedContext(rcvr)))))) { + noInlineTemporaryinput(index - 1, frameOfMarriedContext(rcvr), value); + goto l29; + } + } + else { + stSize1 = totalLength1 - fixedFields1; + } + if ((oopisGreaterThanOrEqualTo(index, (fmt1 >= (firstCompiledMethodFormat()) + ? (((literalCountOf(rcvr)) + LiteralStart) * BytesPerOop) + 1 + : 1))) + && (oopisLessThanOrEqualTo(index, stSize1))) { + /* begin subscript:with:storing:format: */ + if (fmt1 <= 5) { + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(rcvr))); + if ((assert(isNonImmediate(rcvr)), + oopisGreaterThanOrEqualTo(rcvr, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(rcvr))) >> (rememberedBitShift())) & 1) != 0)) { + remember(rcvr); + } + } + } + longAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << (shiftForWord())))), value); + goto l28; + } + if (fmt1 >= (firstByteFormat())) { + if (!((value & 1))) { + GIV(primFailCode) = PrimErrBadArgument; + goto l28; + } + signedValueToStore1 = (value >> 1); + if (!((signedValueToStore1 >= 0) + && (signedValueToStore1 <= 0xFF))) { + GIV(primFailCode) = PrimErrBadArgument; + goto l28; + } + /* begin storeByte:ofObject:withValue: */ + byteAtput((rcvr + BaseHeaderSize) + ((index + fixedFields1) - 1), signedValueToStore1); + goto l28; + } + if (fmt1 >= (firstShortFormat())) { + if (!((value & 1))) { + GIV(primFailCode) = PrimErrBadArgument; + goto l28; + } + signedValueToStore1 = (value >> 1); + if (!((signedValueToStore1 >= 0) + && (signedValueToStore1 <= 0xFFFF))) { + GIV(primFailCode) = PrimErrBadArgument; + goto l28; + } + /* begin storeShort16:ofObject:withValue: */ + shortAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 1))), signedValueToStore1); + goto l28; + } + if (fmt1 == (sixtyFourBitIndexableFormat())) { + unsigned64BitValueToStore1 = positive64BitValueOf(value); + if (!GIV(primFailCode)) { + /* begin storeLong64:ofObject:withValue: */ + long64Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 3))), unsigned64BitValueToStore1); + } + goto l28; + } + + unsignedValueToStore1 = positive32BitValueOf(value); + if (!GIV(primFailCode)) { + /* begin storeLong32:ofObject:withValue: */ + long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(((index + fixedFields1) - 1)) << 2))), unsignedValueToStore1); + } + l28: /* end subscript:with:storing:format: */; + } + else { + /* begin primitiveFailFor: */ + reasonCode1 = (fmt1 <= 1 + ? PrimErrBadReceiver + : PrimErrBadIndex); + GIV(primFailCode) = reasonCode1; + } +l29: /* end stObject:at:put: */; + + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), value); + GIV(stackPointer) = sp; + } +l30: /* end commonAtPut: */; +} + + +/* Set the cursor to the given shape. The Mac only supports 16x16 pixel + cursors. Cursor offsets are handled by Smalltalk. + */ + + /* InterpreterPrimitives>>#primitiveBeCursor */ +static void +primitiveBeCursor(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt bitsObj; + sqInt cursorBitsIndex; + sqInt cursorObj; + sqInt depth; + sqInt extentX; + sqInt extentY; + sqInt maskBitsIndex; + sqInt maskObj; + sqInt offsetObj; + sqInt offsetX; + sqInt offsetY; + sqInt ourCursor; + sqInt successBoolean; + sqInt successBoolean1; + sqInt successBoolean10; + sqInt successBoolean11; + sqInt successBoolean12; + sqInt successBoolean2; + sqInt successBoolean3; + sqInt successBoolean4; + sqInt successBoolean5; + sqInt successBoolean6; + sqInt successBoolean7; + sqInt successBoolean8; + sqInt successBoolean9; + + bitsObj = 0; + cursorBitsIndex = 0; + cursorObj = 0; + depth = 0; + extentX = 0; + extentY = 0; + maskBitsIndex = 0; + maskObj = 0; + offsetObj = 0; + ourCursor = 0; + if (GIV(argumentCount) == 0) { + cursorObj = longAt(GIV(stackPointer)); + maskBitsIndex = null; + } + if (GIV(argumentCount) == 1) { + cursorObj = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + maskObj = longAt(GIV(stackPointer)); + } + /* begin success: */ + if (!(GIV(argumentCount) < 2)) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + /* begin success: */ + successBoolean = (((cursorObj & (tagMask())) == 0) + && (((((usqInt) (longAt(cursorObj))) >> (formatShift())) & (formatMask())) <= 5)) + && ((lengthOfformat(cursorObj, (((usqInt) (longAt(cursorObj))) >> (formatShift())) & (formatMask()))) >= 5); + if (!successBoolean) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + } + if (!GIV(primFailCode)) { + bitsObj = longAt((cursorObj + BaseHeaderSize) + (0U << (shiftForWord()))); + extentX = fetchIntegerofObject(1, cursorObj); + extentY = fetchIntegerofObject(2, cursorObj); + depth = fetchIntegerofObject(3, cursorObj); + offsetObj = longAt((cursorObj + BaseHeaderSize) + (4U << (shiftForWord()))); + /* begin success: */ + successBoolean1 = (((offsetObj & (tagMask())) == 0) + && (((((usqInt) (longAt(offsetObj))) >> (formatShift())) & (formatMask())) <= 5)) + && ((lengthOfformat(offsetObj, (((usqInt) (longAt(offsetObj))) >> (formatShift())) & (formatMask()))) >= 2); + if (!successBoolean1) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + } + if (!GIV(primFailCode)) { + offsetX = fetchIntegerofObject(0, offsetObj); + offsetY = fetchIntegerofObject(1, offsetObj); + if ((GIV(argumentCount) == 0) + && (depth == 32)) { + + /* Support arbitrary-sized 32 bit ARGB forms --bf 3/1/2007 23:51 */ + /* begin success: */ + successBoolean2 = (extentX > 0) + && (extentY > 0); + if (!successBoolean2) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + /* begin success: */ + successBoolean3 = (offsetX >= (extentX * -1)) + && (offsetX <= 0); + if (!successBoolean3) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + /* begin success: */ + successBoolean4 = (offsetY >= (extentY * -1)) + && (offsetY <= 0); + if (!successBoolean4) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + /* begin success: */ + successBoolean5 = (((bitsObj & (tagMask())) == 0) + && (((((usqInt) (longAt(bitsObj))) >> (formatShift())) & (formatMask())) == (firstLongFormat()))) + && ((lengthOfformat(bitsObj, (((usqInt) (longAt(bitsObj))) >> (formatShift())) & (formatMask()))) == (extentX * extentY)); + if (!successBoolean5) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + cursorBitsIndex = bitsObj + BaseHeaderSize; + } + else { + /* begin success: */ + successBoolean6 = (extentX == 16) + && ((extentY == 16) + && (depth == 1)); + if (!successBoolean6) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + /* begin success: */ + successBoolean7 = (offsetX >= -16) + && (offsetX <= 0); + if (!successBoolean7) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + /* begin success: */ + successBoolean8 = (offsetY >= -16) + && (offsetY <= 0); + if (!successBoolean8) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + /* begin success: */ + successBoolean9 = (((bitsObj & (tagMask())) == 0) + && (((((usqInt) (longAt(bitsObj))) >> (formatShift())) & (formatMask())) == (firstLongFormat()))) + && ((lengthOfformat(bitsObj, (((usqInt) (longAt(bitsObj))) >> (formatShift())) & (formatMask()))) == 16); + if (!successBoolean9) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + cursorBitsIndex = bitsObj + BaseHeaderSize; + } + } + if (GIV(argumentCount) == 1) { + /* begin success: */ + successBoolean12 = (((maskObj & (tagMask())) == 0) + && (((((usqInt) (longAt(maskObj))) >> (formatShift())) & (formatMask())) <= 5)) + && ((lengthOfformat(maskObj, (((usqInt) (longAt(maskObj))) >> (formatShift())) & (formatMask()))) >= 5); + if (!successBoolean12) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + bitsObj = longAt((maskObj + BaseHeaderSize) + (0U << (shiftForWord()))); + extentX = fetchIntegerofObject(1, maskObj); + extentY = fetchIntegerofObject(2, maskObj); + depth = fetchIntegerofObject(3, maskObj); + } + if (!GIV(primFailCode)) { + /* begin success: */ + successBoolean10 = (extentX == 16) + && ((extentY == 16) + && (depth == 1)); + if (!successBoolean10) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + /* begin success: */ + successBoolean11 = (((bitsObj & (tagMask())) == 0) + && (((((usqInt) (longAt(bitsObj))) >> (formatShift())) & (formatMask())) == (firstLongFormat()))) + && ((lengthOfformat(bitsObj, (((usqInt) (longAt(bitsObj))) >> (formatShift())) & (formatMask()))) == 16); + if (!successBoolean11) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + maskBitsIndex = bitsObj + BaseHeaderSize; + } + } + if (!GIV(primFailCode)) { + if (GIV(argumentCount) == 0) { + if (depth == 32) { + if (!(ioSetCursorARGB(cursorBitsIndex, extentX, extentY, offsetX, offsetY))) { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + return; + } + } + else { + ioSetCursor(cursorBitsIndex, offsetX, offsetY); + } + } + else { + ioSetCursorWithMask(cursorBitsIndex, maskBitsIndex, offsetX, offsetY); + } + /* begin pop: */ + GIV(stackPointer) += GIV(argumentCount) * BytesPerWord; + } +} + + +/* Record the system Display object in the specialObjectsTable. */ + + /* InterpreterPrimitives>>#primitiveBeDisplay */ +static void +primitiveBeDisplay(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt rcvr; + sqInt successBoolean; + + rcvr = longAt(GIV(stackPointer)); + /* begin success: */ + successBoolean = (((rcvr & (tagMask())) == 0) + && (((((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask())) <= 5)) + && ((lengthOfformat(rcvr, (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()))) >= 4); + if (!successBoolean) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + /* begin splObj:put: */ + assert(!(isForwarded(GIV(specialObjectsOop)))); + if ((assert(isNonImmediate(GIV(specialObjectsOop))), + oopisGreaterThanOrEqualTo(GIV(specialObjectsOop), GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((rcvr & (tagMask())) == 0) + && (oopisLessThan(rcvr, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(GIV(specialObjectsOop)))) >> (rememberedBitShift())) & 1) != 0)) { + remember(GIV(specialObjectsOop)); + } + } + } + longAtput((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(TheDisplay) << (shiftForWord())))), rcvr); + } +} + + +/* make the basic beep noise */ + + /* InterpreterPrimitives>>#primitiveBeep */ +static void +primitiveBeep(void) +{ + ioBeep(); +} + + /* InterpreterPrimitives>>#primitiveBehaviorHash */ +static void +primitiveBehaviorHash(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt err; + sqInt hash; + sqInt hashOrError; + char *sp; + + assert((isNonImmediate(stackTop())) + && (addressCouldBeClassObj(stackTop()))); + assert(addressCouldBeClassObj(longAt(GIV(stackPointer)))); + hashOrError = (((hash = (long32At((longAt(GIV(stackPointer))) + 4)) & (identityHashHalfWordMask()))) != 0 + ? hash + : (objCouldBeClassObj(longAt(GIV(stackPointer))) + ? (((err = enterIntoClassTable(longAt(GIV(stackPointer))))) != 0 + ? -err + : (long32At((longAt(GIV(stackPointer))) + 4)) & (identityHashHalfWordMask())) + : -PrimErrBadReceiver)); + + if (hashOrError >= 0) { + /* begin pop:thenPushInteger: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)hashOrError << 1) | 1)); + GIV(stackPointer) = sp; + } + else { + GIV(primFailCode) = -hashOrError; + } +} + + +/* Note no short-cut for SmallIntegers. Either the inline interpreter + bytecode or the JIT primitive will handle this case. */ + + /* InterpreterPrimitives>>#primitiveBitAnd */ +static void +primitiveBitAnd(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt bs; + sqInt bs1; + sqInt ccIndex; + sqInt ccIndex1; + sqInt fmt; + sqInt fmt1; + usqInt integerArgumentValue; + usqInt integerReceiverValue; + sqInt ok; + sqInt ok1; + sqInt oop; + sqInt oop1; + sqInt oop2; + char *sp; + sqInt value; + sqInt value1; + + /* begin positiveMachineIntegerValueOf: */ + oop1 = longAt(GIV(stackPointer)); + if ((oop1 & 1)) { + value = (oop1 >> 1); + if (value < 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) null); + goto l4; + } + integerArgumentValue = ((usqIntptr_t) value); + goto l4; + } + if (oop1 & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) 0); + goto l4; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop1))); + /* begin classIndexOf: */ + ccIndex = (longAt(oop1)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) 0); + goto l4; + } + /* begin numBytesOfBytes: */ + fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); + assert(fmt >= (firstByteFormat())); + bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); + if (bs > (sizeof(usqIntptr_t))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) 0); + goto l4; + } + if (((sizeof(usqIntptr_t)) == 8) + && (bs > 4)) { + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + goto l4; + } + else { + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + goto l4; + } +l4: /* end positiveMachineIntegerValueOf: */; + /* begin positiveMachineIntegerValueOf: */ + oop2 = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if ((oop2 & 1)) { + value1 = (oop2 >> 1); + if (value1 < 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) null); + goto l8; + } + integerReceiverValue = ((usqIntptr_t) value1); + goto l8; + } + if (oop2 & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) 0); + goto l8; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop2))); + /* begin classIndexOf: */ + ccIndex1 = (longAt(oop2)) & (classIndexMask()); + ok1 = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l7; + +l7: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok1) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) 0); + goto l8; + } + /* begin numBytesOfBytes: */ + fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); + assert(fmt1 >= (firstByteFormat())); + bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); + if (bs1 > (sizeof(usqIntptr_t))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) 0); + goto l8; + } + if (((sizeof(usqIntptr_t)) == 8) + && (bs1 > 4)) { + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + goto l8; + } + else { + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + goto l8; + } +l8: /* end positiveMachineIntegerValueOf: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + oop = positiveMachineIntegerFor(integerArgumentValue & integerReceiverValue); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + } +} + + +/* Primitive logical operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveBitAndLargeIntegers */ +EXPORT(void) +primitiveBitAndLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqLong integerArg; + usqLong integerRcvr; + sqInt oopResult; + char *sp; + + integerArg = positive64BitValueOf(longAt(GIV(stackPointer) + (0 * BytesPerWord))); + integerRcvr = positive64BitValueOf(longAt(GIV(stackPointer) + (1 * BytesPerWord))); + if (GIV(primFailCode)) { + return; + } + oopResult = positive64BitIntegerFor(integerRcvr & integerArg); + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oopResult); + GIV(stackPointer) = sp; + } +} + + +/* Note no short-cut for SmallIntegers. Either the inline interpreter + bytecode or the JIT primitive will handle this case. */ + + /* InterpreterPrimitives>>#primitiveBitOr */ +static void +primitiveBitOr(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt bs; + sqInt bs1; + sqInt ccIndex; + sqInt ccIndex1; + sqInt fmt; + sqInt fmt1; + usqInt integerArgumentValue; + usqInt integerReceiverValue; + sqInt ok; + sqInt ok1; + sqInt oop; + sqInt oop1; + sqInt oop2; + char *sp; + sqInt value; + sqInt value1; + + /* begin positiveMachineIntegerValueOf: */ + oop1 = longAt(GIV(stackPointer)); + if ((oop1 & 1)) { + value = (oop1 >> 1); + if (value < 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) null); + goto l4; + } + integerArgumentValue = ((usqIntptr_t) value); + goto l4; + } + if (oop1 & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) 0); + goto l4; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop1))); + /* begin classIndexOf: */ + ccIndex = (longAt(oop1)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex; + goto l2; + +l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) 0); + goto l4; + } + /* begin numBytesOfBytes: */ + fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask()); + assert(fmt >= (firstByteFormat())); + bs = ((numSlotsOf(oop1)) << (shiftForWord())) - (fmt & 7); + if (bs > (sizeof(usqIntptr_t))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) 0); + goto l4; + } + if (((sizeof(usqIntptr_t)) == 8) + && (bs > 4)) { + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop1 + BaseHeaderSize) + (0U << 3)))))); + goto l4; + } + else { + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop1 + BaseHeaderSize) + (0U << 2)))))))); + goto l4; + } +l4: /* end positiveMachineIntegerValueOf: */; + /* begin positiveMachineIntegerValueOf: */ + oop2 = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if ((oop2 & 1)) { + value1 = (oop2 >> 1); + if (value1 < 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) null); + goto l8; + } + integerReceiverValue = ((usqIntptr_t) value1); + goto l8; + } + if (oop2 & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) 0); + goto l8; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(oop2))); + /* begin classIndexOf: */ + ccIndex1 = (longAt(oop2)) & (classIndexMask()); + ok1 = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l7; + +l7: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok1) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) 0); + goto l8; + } + /* begin numBytesOfBytes: */ + fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask()); + assert(fmt1 >= (firstByteFormat())); + bs1 = ((numSlotsOf(oop2)) << (shiftForWord())) - (fmt1 & 7); + if (bs1 > (sizeof(usqIntptr_t))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) 0); + goto l8; + } + if (((sizeof(usqIntptr_t)) == 8) + && (bs1 > 4)) { + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((oop2 + BaseHeaderSize) + (0U << 3)))))); + goto l8; + } + else { + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((oop2 + BaseHeaderSize) + (0U << 2)))))))); + goto l8; + } +l8: /* end positiveMachineIntegerValueOf: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + oop = positiveMachineIntegerFor(integerArgumentValue | integerReceiverValue); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + } +} + + +/* Primitive logical operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveBitOrLargeIntegers */ +EXPORT(void) +primitiveBitOrLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqLong integerArg; + usqLong integerRcvr; + sqInt oopResult; + char *sp; + + integerArg = positive64BitValueOf(longAt(GIV(stackPointer) + (0 * BytesPerWord))); + integerRcvr = positive64BitValueOf(longAt(GIV(stackPointer) + (1 * BytesPerWord))); + if (GIV(primFailCode)) { + return; + } + oopResult = positive64BitIntegerFor(integerRcvr | integerArg); + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oopResult); + GIV(stackPointer) = sp; + } +} + + +/* Perform a bitShift. In 32-bits deal only with non-negative 32-bit + integers. In 64-bits deal with signed 64-bit quantities (max (2^63)-1). */ + + /* InterpreterPrimitives>>#primitiveBitShift */ +static void +primitiveBitShift(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt integerArgument; + sqInt integerReceiver; + usqInt newLargeInteger; + usqInt newObj; + usqInt numBytes; + sqInt objFormat; + sqInt shifted; + char *sp; + sqInt valueWord; + + integerArgument = longAt(GIV(stackPointer)); + if (!((integerArgument & 1))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + integerReceiver = positive32BitValueOf(integerReceiver); + + if (!GIV(primFailCode)) { + if (((integerArgument = (integerArgument >> 1))) >= 0) { + + /* Left shift -- must fail bits would be lost */ + if (!(integerArgument <= 0x1F)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + shifted = ((sqInt)((usqInt)(integerReceiver) << integerArgument)); + if (!(integerReceiver == (((usqInt) shifted) >> integerArgument))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + } + else { + + /* Right shift -- OK to lose bits */ + if (!(integerArgument >= (-0x1F))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + shifted = ((usqInt) integerReceiver) >> (0 - integerArgument); + } + /* begin positive32BitIntegerFor: */ + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) shifted)) <= (MaxSmallInteger)) { + shifted = (((usqInt)shifted << 1) | 1); + goto l5; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l4; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; + l4: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN(shifted); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + shifted = newLargeInteger; + goto l5; + + l5: /* end positive32BitIntegerFor: */; + + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), shifted); + GIV(stackPointer) = sp; + } +} + + +/* Primitive arithmetic operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveBitShiftLargeIntegers */ +EXPORT(void) +primitiveBitShiftLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqLong a; + sqInt aIsNegative; + sqInt integerPointer; + sqInt oopRcvr; + sqInt oopResult; + usqLong result; + sqInt shift; + char *sp; + + /* begin stackIntegerValue: */ + integerPointer = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + /* begin checkedIntegerValueOf: */ + if ((integerPointer & 1)) { + shift = (integerPointer >> 1); + goto l1; + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + shift = 0; + goto l1; + } +l1: /* end stackIntegerValue: */; + oopRcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + aIsNegative = isNegativeIntegerValueOf(oopRcvr); + a = magnitude64BitValueOf(oopRcvr); + if (GIV(primFailCode)) { + return; + } + if (shift >= 0) { + + /* Protect against overflow */ + + /* This is to avoid undue (usqInt) cast */ + result = 0xFFFFFFFFFFFFFFFFULL; + if ((shift >= 64) + || (a > (result >> shift))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + result = a << shift; + } + else { + shift = 0 - shift; + if (shift >= 64) { + result = 0; + } + else { + result = a >> shift; + } + if (aIsNegative + && ((result << shift) != a)) { + result += 1; + } + } + oopResult = magnitude64BitIntegerForneg(result, aIsNegative); + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oopResult); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveBitXor */ +static void +primitiveBitXor(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt bs; + sqInt bs1; + sqInt ccIndex; + sqInt ccIndex1; + sqInt fmt; + sqInt fmt1; + sqInt integerArgument; + usqInt integerArgumentValue; + sqInt integerReceiver; + usqInt integerReceiverValue; + sqInt ok; + sqInt ok1; + sqInt oop; + sqInt oop1; + char *sp; + char *sp1; + sqInt value; + sqInt value1; + + integerArgument = longAt(GIV(stackPointer)); + integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((integerArgument & 1)) + && ((integerReceiver & 1))) { + + /* xoring will leave the tag bits zero, whether the tag is 1 or zero, so add it back in. */ + /* begin pop:thenPush: */ + oop = (integerArgument ^ integerReceiver) + (smallIntegerTag()); + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + } + else { + /* begin positiveMachineIntegerValueOf: */ + if ((integerArgument & 1)) { + value = (integerArgument >> 1); + if (value < 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) null); + goto l4; + } + integerArgumentValue = ((usqIntptr_t) value); + goto l4; + } + if (integerArgument & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) 0); + goto l4; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(integerArgument))); + /* begin classIndexOf: */ + ccIndex = (longAt(integerArgument)) & (classIndexMask()); + ok = ClassLargePositiveIntegerCompactIndex == ccIndex; + goto l2; + + l2: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) 0); + goto l4; + } + /* begin numBytesOfBytes: */ + fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask()); + assert(fmt >= (firstByteFormat())); + bs = ((numSlotsOf(integerArgument)) << (shiftForWord())) - (fmt & 7); + if (bs > (sizeof(usqIntptr_t))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgumentValue = ((usqIntptr_t) 0); + goto l4; + } + if (((sizeof(usqIntptr_t)) == 8) + && (bs > 4)) { + integerArgumentValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerArgument + BaseHeaderSize) + (0U << 3)))))); + goto l4; + } + else { + integerArgumentValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerArgument + BaseHeaderSize) + (0U << 2)))))))); + goto l4; + } + l4: /* end positiveMachineIntegerValueOf: */; + /* begin positiveMachineIntegerValueOf: */ + if ((integerReceiver & 1)) { + value1 = (integerReceiver >> 1); + if (value1 < 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) null); + goto l8; + } + integerReceiverValue = ((usqIntptr_t) value1); + goto l8; + } + if (integerReceiver & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) 0); + goto l8; + } + /* begin isClassOfNonImm:equalTo:compactClassIndex: */ + assert(!(isImmediate(integerReceiver))); + /* begin classIndexOf: */ + ccIndex1 = (longAt(integerReceiver)) & (classIndexMask()); + ok1 = ClassLargePositiveIntegerCompactIndex == ccIndex1; + goto l7; + + l7: /* end isClassOfNonImm:equalTo:compactClassIndex: */; + if (!ok1) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) 0); + goto l8; + } + /* begin numBytesOfBytes: */ + fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask()); + assert(fmt1 >= (firstByteFormat())); + bs1 = ((numSlotsOf(integerReceiver)) << (shiftForWord())) - (fmt1 & 7); + if (bs1 > (sizeof(usqIntptr_t))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiverValue = ((usqIntptr_t) 0); + goto l8; + } + if (((sizeof(usqIntptr_t)) == 8) + && (bs1 > 4)) { + integerReceiverValue = ((usqIntptr_t) (SQ_SWAP_8_BYTES_IF_BIGENDIAN((long64At((integerReceiver + BaseHeaderSize) + (0U << 3)))))); + goto l8; + } + else { + integerReceiverValue = ((usqIntptr_t) (((unsigned int) (SQ_SWAP_4_BYTES_IF_BIGENDIAN((long32At((integerReceiver + BaseHeaderSize) + (0U << 2)))))))); + goto l8; + } + l8: /* end positiveMachineIntegerValueOf: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + oop1 = positiveMachineIntegerFor(integerArgumentValue ^ integerReceiverValue); + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop1); + GIV(stackPointer) = sp1; + } + } +} + + +/* Primitive logical operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveBitXorLargeIntegers */ +EXPORT(void) +primitiveBitXorLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqLong integerArg; + usqLong integerRcvr; + sqInt oopResult; + char *sp; + + integerArg = positive64BitValueOf(longAt(GIV(stackPointer) + (0 * BytesPerWord))); + integerRcvr = positive64BitValueOf(longAt(GIV(stackPointer) + (1 * BytesPerWord))); + if (GIV(primFailCode)) { + return; + } + oopResult = positive64BitIntegerFor(integerRcvr ^ integerArg); + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oopResult); + GIV(stackPointer) = sp; + } +} + + +/* Reports bytes available at this moment. For more meaningful + results, calls to this primitive should be precedeed by a full + or incremental garbage collection. */ + + /* InterpreterPrimitives>>#primitiveBytesLeft */ +static void +primitiveBytesLeft(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aBool; + sqInt integerVal; + char *sp; + char *sp1; + + if (GIV(argumentCount) == 0) { + + /* old behavior - just return the size of free memory */ + /* begin pop:thenPushInteger: */ + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((GIV(totalFreeOldSpace) << 1) | 1)); + GIV(stackPointer) = sp; + return; + } + if (GIV(argumentCount) == 1) { + + /* new behaviour -including or excluding swap space depending on aBool */ + /* begin booleanValueOf: */ + if ((longAt(GIV(stackPointer))) == GIV(trueObj)) { + aBool = 1; + goto l1; + } + if ((longAt(GIV(stackPointer))) == GIV(falseObj)) { + aBool = 0; + goto l1; + } + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + aBool = null; + l1: /* end booleanValueOf: */; + 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)), (((usqInt)integerVal << 1) | 1)); + GIV(stackPointer) = sp1; + return; + } + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; +} + + +/* Perform a function call to a foreign function. + Only invoked from method containing explicit external call spec. + Due to this we use the pluggable prim mechanism explicitly here + (the first literal of any FFI spec'ed method is an ExternalFunction + and not an array as used in the pluggable primitive mechanism). */ + + /* InterpreterPrimitives>>#primitiveCalloutToFFI */ +static void +primitiveCalloutToFFI(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + static void *function = (void *)-1; + void (*primitiveCallout)(void); + + /* begin functionForPrimitiveCallout */ + if ((((sqInt)function)) == -1) { + function = ioLoadFunctionFrom("primitiveCallout", "SqueakFFIPrims"); + } + primitiveCallout = ((void (*)(void)) function); + if (primitiveCallout == null) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + else { + primitiveCallout(); + } +} + + +/* Primitive. Change the class of the receiver into the class of the argument + given that + the format of the receiver matches the format of the argument's class. + Fail if the + receiver or argument are SmallIntegers, or the receiver is an instance of + a compact + class and the argument isn't, or when the argument's class is compact and + the receiver + isn't, or when the format of the receiver is different from the format of + the argument's + class, or when the arguments class is fixed and the receiver's size + differs from the size + that an instance of the argument's class should have. */ + + /* InterpreterPrimitives>>#primitiveChangeClass */ +static void +primitiveChangeClass(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt arg; + sqInt argClass; + sqInt err; + sqInt i; + sqInt oop; + sqInt oop1; + sqInt rcvr; + + /* begin stackObjectValue: */ + oop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + if (oop & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = null; + goto l2; + } + arg = oop; +l2: /* end stackObjectValue: */; + /* begin stackObjectValue: */ + oop1 = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (oop1 & (tagMask())) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = null; + goto l3; + } + rcvr = oop1; +l3: /* end stackObjectValue: */; + if (GIV(primFailCode)) { + return; + } + argClass = fetchClassOfNonImm(arg); + err = changeClassOfto(rcvr, argClass); + if (err == 0) { + + /* Flush at cache because rcvr's class has changed. */ + /* begin flushAtCache */ + for (i = 1; i <= AtCacheTotalSize; i += 1) { + GIV(atCache)[i] = 0; + } + /* begin pop: */ + GIV(stackPointer) += GIV(argumentCount) * BytesPerWord; + } + else { + GIV(primFailCode) = err; + } + return; +} + + /* InterpreterPrimitives>>#primitiveClass */ +static void +primitiveClass(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt instance; + sqInt oop; + char *sp; + sqInt tagBits; + + instance = longAt(GIV(stackPointer)); + if ((GIV(argumentCount) > 0) + && (((instance & (tagMask())) == 0) + && (((longAt(instance)) & (classIndexMask())) == (isForwardedObjectClassIndexPun())))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + else { + /* begin pop:thenPush: */ + if (((tagBits = instance & (tagMask()))) != 0) { + /* begin fetchPointer:ofObject: */ + oop = longAt((GIV(classTableFirstPage) + BaseHeaderSize) + (((sqInt)((usqInt)(tagBits) << (shiftForWord()))))); + } + else { + oop = fetchClassOfNonImm(instance); + } + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + } +} + + +/* Primitive. Void the VM profile histograms. */ + + /* InterpreterPrimitives>>#primitiveClearVMProfile */ +static void +primitiveClearVMProfile(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + ioClearProfile(); + /* begin pop: */ + GIV(stackPointer) += GIV(argumentCount) * BytesPerWord; +} + + +/* When called with a single string argument, post the string to + the clipboard. When called with zero arguments, return a + string containing the current clipboard contents. */ + + /* InterpreterPrimitives>>#primitiveClipboardText */ +static void +primitiveClipboardText(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt fmt; + sqInt formatField; + usqInt newObj; + usqInt numBytes1; + sqInt numSlots; + sqInt s; + char *sp; + sqInt sz; + + if (GIV(argumentCount) == 1) { + s = longAt(GIV(stackPointer)); + if (!(((s & (tagMask())) == 0) + && (((((usqInt) (longAt(s))) >> (formatShift())) & (formatMask())) >= (firstByteFormat())))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + if (!GIV(primFailCode)) { + /* begin numBytesOfBytes: */ + fmt = (((usqInt) (longAt(s))) >> (formatShift())) & (formatMask()); + assert(fmt >= (firstByteFormat())); + sz = ((numSlotsOf(s)) << (shiftForWord())) - (fmt & 7); + clipboardWriteFromAt(sz, s + BaseHeaderSize, 0); + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + } + } + else { + sz = clipboardSize(); + /* begin allocateBytes:classIndex: */ + assert(addressCouldBeClassObj(classAtIndex(ClassByteStringCompactIndex))); + assert((instSpecOfClass(classAtIndex(ClassByteStringCompactIndex))) == (firstByteFormat())); + /* begin allocateSlots:format:classIndex: */ + numSlots = ((sz + BytesPerOop) - 1) / BytesPerOop; + formatField = (firstByteFormat()) + ((8 - sz) & (BytesPerWord - 1)); + if (numSlots >= (numSlotsMask())) { + newObj = GIV(freeStart) + BaseHeaderSize; + numBytes1 = (BaseHeaderSize + BaseHeaderSize) + ((numSlots + (numSlots & 1)) * BytesPerOop); + } + else { + newObj = GIV(freeStart); + numBytes1 = BaseHeaderSize + ((numSlots <= 1 + ? (/* begin allocationUnit */ + 8) + : (numSlots + (numSlots & 1)) * BytesPerOop)); + } + if ((GIV(freeStart) + numBytes1) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + s = allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes1, formatField, ClassByteStringCompactIndex); + goto l4; + } + if (numSlots >= (numSlotsMask())) { + + /* for header parsing we put a saturated slot count in the prepended overflow size word */ + flag("endianness"); + longAtput(GIV(freeStart), numSlots); + longAtput(GIV(freeStart) + 4, ((sqInt)((usqInt)((numSlotsMask())) << (numSlotsHalfShift())))); + long64Atput(newObj, headerForSlotsformatclassIndex(numSlotsMask(), formatField, ClassByteStringCompactIndex)); + } + else { + long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(formatField) << (formatShift()))))) + ClassByteStringCompactIndex); + } + assert((numBytes1 % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + GIV(freeStart) += numBytes1; + s = newObj; + l4: /* end allocateBytes:classIndex: */; + if (!(s)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + + clipboardReadIntoAt(sz, s + BaseHeaderSize, 0); + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), s); + GIV(stackPointer) = sp; + } +} + + +/* Take a boolean which if true turns or keeps clock logging on. Answer an + array supplying + the size of the clock logs, the address of the usecs log, the index in it, + the address of the + msecs log, and the index into it. */ + + /* InterpreterPrimitives>>#primitiveClockLogAddresses */ +EXPORT(sqInt) +primitiveClockLogAddresses(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt midx; + void *msecs; + usqInt newLargeInteger; + usqInt newLargeInteger1; + usqInt newObj; + usqInt newObj1; + usqInt numBytes; + usqInt numBytes1; + sqInt objFormat; + sqInt objFormat1; + sqInt objOop; + sqInt objOop1; + sqInt objOop2; + sqInt objOop3; + sqInt objOop4; + sqInt oop; + sqInt oop1; + sqInt oop2; + sqInt result; + sqInt runInNOut; + char *sp; + sqInt uidx; + void *usecs; + sqInt v1; + sqInt v2; + sqInt valueWord; + sqInt valueWord2; + + + /* bypass type inference which would deduce int */ + midx = 0; + msecs = 0; + uidx = 0; + usecs = 0; + if (GIV(argumentCount) != 1) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + runInNOut = (longAt(GIV(stackPointer) + (0 * BytesPerWord))) == GIV(trueObj); + ioGetClockLogSizeUsecsIdxMsecsIdx((&runInNOut), (&usecs), (&uidx), (&msecs), (&midx)); + result = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassArray) << (shiftForWord()))))), 5); + if (result == 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + /* begin pushRemappableOop: */ + assert(addressCouldBeOop(result)); + GIV(remapBuffer)[(GIV(remapBufferCount) += 1)] = result; + if (!(GIV(remapBufferCount) <= RemapBufferSize)) { + error("remapBuffer overflow"); + } + /* begin storePointerUnchecked:ofObject:withValue: */ + objOop = GIV(remapBuffer)[GIV(remapBufferCount)]; + assert(!(isOopForwarded(objOop))); + longAtput((objOop + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)runInNOut << 1) | 1)); + /* begin positive32BitIntegerFor: */ + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) (((usqInt)usecs)))) <= (MaxSmallInteger)) { + v1 = (((((usqInt)usecs)) << 1) | 1); + goto l9; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l7; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; +l7: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN((((usqInt)usecs))); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + v1 = newLargeInteger; + goto l9; + +l9: /* end positive32BitIntegerFor: */; + /* begin positive32BitIntegerFor: */ + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) (((usqInt)msecs)))) <= (MaxSmallInteger)) { + v2 = (((((usqInt)msecs)) << 1) | 1); + goto l14; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat1 = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat1 < (firstByteFormat()) + ? objFormat1 + : objFormat1 & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj1 = GIV(freeStart); + numBytes1 = BaseHeaderSize + (8); + assert((numBytes1 % (allocationUnit())) == 0); + assert((newObj1 % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes1) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes1) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger1 = 0; + goto l12; + } + } + long64Atput(newObj1, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat1) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes1; + newLargeInteger1 = newObj1; +l12: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord2 = SQ_SWAP_4_BYTES_IF_BIGENDIAN((((usqInt)msecs))); + long32Atput((newLargeInteger1 + BaseHeaderSize) + (0U << 2), valueWord2); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); + + v2 = newLargeInteger1; + goto l14; + +l14: /* end positive32BitIntegerFor: */; + if (GIV(primFailCode)) { + /* begin popRemappableOop */ + oop = GIV(remapBuffer)[GIV(remapBufferCount)]; + GIV(remapBufferCount) -= 1; + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return null; + } + /* begin storePointer:ofObject:withValue: */ + objOop3 = GIV(remapBuffer)[GIV(remapBufferCount)]; + assert(!(isForwarded(objOop3))); + if ((assert(isNonImmediate(objOop3)), + oopisGreaterThanOrEqualTo(objOop3, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((v1 & (tagMask())) == 0) + && (oopisLessThan(v1, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(objOop3))) >> (rememberedBitShift())) & 1) != 0)) { + remember(objOop3); + } + } + } + longAtput((objOop3 + BaseHeaderSize) + (1U << (shiftForWord())), v1); + /* begin storePointerUnchecked:ofObject:withValue: */ + objOop1 = GIV(remapBuffer)[GIV(remapBufferCount)]; + assert(!(isOopForwarded(objOop1))); + longAtput((objOop1 + BaseHeaderSize) + (2U << (shiftForWord())), (((usqInt)uidx << 1) | 1)); + /* begin storePointer:ofObject:withValue: */ + objOop4 = GIV(remapBuffer)[GIV(remapBufferCount)]; + assert(!(isForwarded(objOop4))); + if ((assert(isNonImmediate(objOop4)), + oopisGreaterThanOrEqualTo(objOop4, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((v2 & (tagMask())) == 0) + && (oopisLessThan(v2, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(objOop4))) >> (rememberedBitShift())) & 1) != 0)) { + remember(objOop4); + } + } + } + longAtput((objOop4 + BaseHeaderSize) + (3U << (shiftForWord())), v2); + /* begin storePointerUnchecked:ofObject:withValue: */ + objOop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; + assert(!(isOopForwarded(objOop2))); + longAtput((objOop2 + BaseHeaderSize) + (4U << (shiftForWord())), (((usqInt)midx << 1) | 1)); + /* begin pop:thenPush: */ + oop2 = GIV(remapBuffer)[GIV(remapBufferCount)]; + GIV(remapBufferCount) -= 1; + oop1 = oop2; + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop1); + GIV(stackPointer) = sp; + return 0; +} + + /* InterpreterPrimitives>>#primitiveClosureValue */ +static void +primitiveClosureValue(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt blockClosure; + sqInt closureIP; + sqInt closureMethod; + sqInt i; + sqInt numArgs; + sqInt numCopied; + sqInt object; + sqInt object1; + sqInt objOop; + sqInt oop; + sqInt oop1; + sqInt outerContext; + sqInt outerContext1; + char *sp; + char *sp1; + char *sp2; + char *sp3; + char *sp4; + char *sp5; + char *sp6; + sqInt theMethod; + + blockClosure = longAt(GIV(stackPointer) + (GIV(argumentCount) * BytesPerWord)); + /* begin quickFetchInteger:ofObject: */ + oop = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord()))))); + assert((oop & 1)); + numArgs = (oop >> 1); + if (!(GIV(argumentCount) == numArgs)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + outerContext = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord()))))); + if (!(((outerContext & (tagMask())) == 0) + && (((longAt(outerContext)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + + /* Check if the closure's method is actually a CompiledMethod. */ + closureMethod = longAt((outerContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))); + if (!(((closureMethod & (tagMask())) == 0) + && (((((usqInt) (longAt(closureMethod))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + /* begin activateNewClosureMethod:numArgs:mayContextSwitch: */ + outerContext1 = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord()))))); + assert(isContext(outerContext1)); + numCopied = (numSlotsOf(blockClosure)) - ClosureFirstCopiedValueIndex; + /* begin fetchPointer:ofObject: */ + theMethod = longAt((outerContext1 + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))); + assert(isOopCompiledMethod(theMethod)); + /* begin push: */ + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); + GIV(stackPointer) = sp1; + /* begin push: */ + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(framePointer)); + GIV(stackPointer) = sp2; + GIV(framePointer) = GIV(stackPointer); + /* begin push: */ + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), theMethod); + GIV(stackPointer) = sp3; + /* begin push: */ + object = (VMBIGENDIAN + ? ((1 + (((sqInt)((usqInt)(numArgs) << ((BytesPerWord * 8) - 8))))) + (0)) + (1U << ((BytesPerWord * 8) - 24)) + : ((1 + (((sqInt)((usqInt)(numArgs) << 8)))) + (0)) + (1U << 24)); + longAtput((sp4 = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp4; + /* begin push: */ + longAtput((sp5 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp5; + /* begin push: */ + objOop = longAt((outerContext1 + BaseHeaderSize) + (((int)((usqInt)(ReceiverIndex) << (shiftForWord()))))); + if (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop = fixFollowedFieldofObjectwithInitialValue(ReceiverIndex, outerContext1, objOop); + } + object1 = objOop; + longAtput((sp6 = GIV(stackPointer) - BytesPerWord), object1); + GIV(stackPointer) = sp6; + for (i = 0; i < numCopied; i += 1) { + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + ClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + GIV(stackPointer) = sp; + } + assert(frameIsBlockActivation(GIV(framePointer))); + assert(!(frameHasContext(GIV(framePointer)))); + /* begin quickFetchInteger:ofObject: */ + oop1 = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord()))))); + assert((oop1 & 1)); + closureIP = (oop1 >> 1); + GIV(instructionPointer) = ((theMethod + closureIP) + BaseHeaderSize) - 2; + /* begin setMethod: */ + GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + GIV(bytecodeSetSelector) = (methodUsesAlternateBytecodeSet(GIV(method)) + ? 256 + : 0); + + if (GIV(stackPointer) < GIV(stackLimit)) { + handleStackOverflowOrEventAllowContextSwitch(1); + } +} + + +/* An exact clone of primitiveClosureValue except that this version will not + check for interrupts on stack overflow. It may invoke the garbage + collector but will not switch processes. See + checkForInterruptsMayContextSwitch: */ + + /* InterpreterPrimitives>>#primitiveClosureValueNoContextSwitch */ +void +primitiveClosureValueNoContextSwitch(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt blockClosure; + sqInt closureIP; + sqInt closureMethod; + sqInt i; + sqInt numArgs; + sqInt numCopied; + sqInt object; + sqInt object1; + sqInt objOop; + sqInt oop; + sqInt oop1; + sqInt outerContext; + sqInt outerContext1; + char *sp; + char *sp1; + char *sp2; + char *sp3; + char *sp4; + char *sp5; + char *sp6; + sqInt theMethod; + + blockClosure = longAt(GIV(stackPointer) + (GIV(argumentCount) * BytesPerWord)); + /* begin quickFetchInteger:ofObject: */ + oop = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord()))))); + assert((oop & 1)); + numArgs = (oop >> 1); + if (!(GIV(argumentCount) == numArgs)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + outerContext = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord()))))); + if (!(((outerContext & (tagMask())) == 0) + && (((longAt(outerContext)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + + /* Check if the closure's method is actually a CompiledMethod. */ + closureMethod = longAt((outerContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))); + if (!(((closureMethod & (tagMask())) == 0) + && (((((usqInt) (longAt(closureMethod))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + /* begin activateNewClosureMethod:numArgs:mayContextSwitch: */ + outerContext1 = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord()))))); + assert(isContext(outerContext1)); + numCopied = (numSlotsOf(blockClosure)) - ClosureFirstCopiedValueIndex; + /* begin fetchPointer:ofObject: */ + theMethod = longAt((outerContext1 + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))); + assert(isOopCompiledMethod(theMethod)); + /* begin push: */ + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); + GIV(stackPointer) = sp1; + /* begin push: */ + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(framePointer)); + GIV(stackPointer) = sp2; + GIV(framePointer) = GIV(stackPointer); + /* begin push: */ + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), theMethod); + GIV(stackPointer) = sp3; + /* begin push: */ + object = (VMBIGENDIAN + ? ((1 + (((sqInt)((usqInt)(numArgs) << ((BytesPerWord * 8) - 8))))) + (0)) + (1U << ((BytesPerWord * 8) - 24)) + : ((1 + (((sqInt)((usqInt)(numArgs) << 8)))) + (0)) + (1U << 24)); + longAtput((sp4 = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp4; + /* begin push: */ + longAtput((sp5 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp5; + /* begin push: */ + objOop = longAt((outerContext1 + BaseHeaderSize) + (((int)((usqInt)(ReceiverIndex) << (shiftForWord()))))); + if (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop = fixFollowedFieldofObjectwithInitialValue(ReceiverIndex, outerContext1, objOop); + } + object1 = objOop; + longAtput((sp6 = GIV(stackPointer) - BytesPerWord), object1); + GIV(stackPointer) = sp6; + for (i = 0; i < numCopied; i += 1) { + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + ClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + GIV(stackPointer) = sp; + } + assert(frameIsBlockActivation(GIV(framePointer))); + assert(!(frameHasContext(GIV(framePointer)))); + /* begin quickFetchInteger:ofObject: */ + oop1 = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord()))))); + assert((oop1 & 1)); + closureIP = (oop1 >> 1); + GIV(instructionPointer) = ((theMethod + closureIP) + BaseHeaderSize) - 2; + /* begin setMethod: */ + GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + GIV(bytecodeSetSelector) = (methodUsesAlternateBytecodeSet(GIV(method)) + ? 256 + : 0); + + if (GIV(stackPointer) < GIV(stackLimit)) { + handleStackOverflowOrEventAllowContextSwitch(0); + } +} + + /* InterpreterPrimitives>>#primitiveClosureValueWithArgs */ +static void +primitiveClosureValueWithArgs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt argumentArray; + usqInt arraySize; + sqInt blockClosure; + sqInt closureIP; + sqInt closureMethod; + sqInt i; + sqInt index; + sqInt numArgs; + sqInt numCopied; + usqInt numSlots; + sqInt object; + sqInt object1; + sqInt objOop; + sqInt oop; + sqInt oop1; + sqInt outerContext; + sqInt outerContext1; + char *sp; + char *sp1; + char *sp2; + char *sp3; + char *sp4; + char *sp5; + char *sp6; + char *sp7; + sqInt theMethod; + sqInt top; + + argumentArray = longAt(GIV(stackPointer)); + if (!(((argumentArray & (tagMask())) == 0) + && (((((usqInt) (longAt(argumentArray))) >> (formatShift())) & (formatMask())) == 2))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + /* begin numSlotsOf: */ + assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); + numSlots = byteAt(argumentArray + 7); + arraySize = (numSlots == (numSlotsMask()) + ? longAt(argumentArray - BaseHeaderSize) + : numSlots); + if (!(roomToPushNArgs(arraySize))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + blockClosure = longAt(GIV(stackPointer) + (GIV(argumentCount) * BytesPerWord)); + /* begin quickFetchInteger:ofObject: */ + oop = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord()))))); + assert((oop & 1)); + numArgs = (oop >> 1); + if (!(arraySize == numArgs)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + outerContext = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord()))))); + if (!(((outerContext & (tagMask())) == 0) + && (((longAt(outerContext)) & (classIndexMask())) == ClassMethodContextCompactIndex))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + + /* Check if the closure's method is actually a CompiledMethod. */ + closureMethod = longAt((outerContext + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))); + if (!(((closureMethod & (tagMask())) == 0) + && (((((usqInt) (longAt(closureMethod))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + index = 1; + while (index <= numArgs) { + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((argumentArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << (shiftForWord())))))); + GIV(stackPointer) = sp; + index += 1; + } + /* begin activateNewClosureMethod:numArgs:mayContextSwitch: */ + outerContext1 = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureOuterContextIndex) << (shiftForWord()))))); + assert(isContext(outerContext1)); + numCopied = (numSlotsOf(blockClosure)) - ClosureFirstCopiedValueIndex; + /* begin fetchPointer:ofObject: */ + theMethod = longAt((outerContext1 + BaseHeaderSize) + (((int)((usqInt)(MethodIndex) << (shiftForWord()))))); + assert(isOopCompiledMethod(theMethod)); + /* begin push: */ + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); + GIV(stackPointer) = sp1; + /* begin push: */ + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(framePointer)); + GIV(stackPointer) = sp2; + GIV(framePointer) = GIV(stackPointer); + /* begin push: */ + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), theMethod); + GIV(stackPointer) = sp3; + /* begin push: */ + object = (VMBIGENDIAN + ? ((1 + (((sqInt)((usqInt)(numArgs) << ((BytesPerWord * 8) - 8))))) + (0)) + (1U << ((BytesPerWord * 8) - 24)) + : ((1 + (((sqInt)((usqInt)(numArgs) << 8)))) + (0)) + (1U << 24)); + longAtput((sp4 = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp4; + /* begin push: */ + longAtput((sp5 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp5; + /* begin push: */ + objOop = longAt((outerContext1 + BaseHeaderSize) + (((int)((usqInt)(ReceiverIndex) << (shiftForWord()))))); + if (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop = fixFollowedFieldofObjectwithInitialValue(ReceiverIndex, outerContext1, objOop); + } + object1 = objOop; + longAtput((sp6 = GIV(stackPointer) - BytesPerWord), object1); + GIV(stackPointer) = sp6; + for (i = 0; i < numCopied; i += 1) { + /* begin push: */ + longAtput((sp7 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + ClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + GIV(stackPointer) = sp7; + } + assert(frameIsBlockActivation(GIV(framePointer))); + assert(!(frameHasContext(GIV(framePointer)))); + /* begin quickFetchInteger:ofObject: */ + oop1 = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureStartPCIndex) << (shiftForWord()))))); + assert((oop1 & 1)); + closureIP = (oop1 >> 1); + GIV(instructionPointer) = ((theMethod + closureIP) + BaseHeaderSize) - 2; + /* begin setMethod: */ + GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + GIV(bytecodeSetSelector) = (methodUsesAlternateBytecodeSet(GIV(method)) + ? 256 + : 0); + + if (GIV(stackPointer) < GIV(stackLimit)) { + handleStackOverflowOrEventAllowContextSwitch(1); + } +} + + +/* Primitive. Compare two byte-indexed objects for equality */ + + /* InterpreterPrimitives>>#primitiveCompareBytes */ +EXPORT(void) +primitiveCompareBytes(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt arg1; + sqInt arg2; + sqInt fmt; + sqInt fmt1; + sqInt i; + sqInt len1; + sqInt len2; + usqInt numBytes; + usqInt numBytes1; + usqInt numSlots; + usqInt numSlots1; + char *sp; + char *sp1; + char *sp2; + char *sp3; + + if (!(GIV(argumentCount) == 1)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + arg1 = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + arg2 = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + if (!((((arg1 & (tagMask())) == 0) + && (((((usqInt) (longAt(arg1))) >> (formatShift())) & (formatMask())) >= (firstByteFormat()))) + && (((arg2 & (tagMask())) == 0) + && (((((usqInt) (longAt(arg2))) >> (formatShift())) & (formatMask())) >= (firstByteFormat()))))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + if (arg1 == arg2) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), GIV(trueObj)); + GIV(stackPointer) = sp; + return; + } + /* begin byteSizeOf: */ + if (arg1 & (tagMask())) { + len1 = 0; + goto l2; + } + /* begin numBytesOf: */ + fmt = (((usqInt) (longAt(arg1))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOf: */ + assert((classIndexOf(arg1)) > (isForwardedObjectClassIndexPun())); + numSlots = byteAt(arg1 + 7); + numBytes = (numSlots == (numSlotsMask()) + ? longAt(arg1 - BaseHeaderSize) + : numSlots); + numBytes = numBytes << (shiftForWord()); + if (fmt >= (firstByteFormat())) { + + /* bytes (the common case), including CompiledMethod */ + len1 = numBytes - (fmt & 7); + goto l2; + } + if (fmt <= (sixtyFourBitIndexableFormat())) { + len1 = numBytes; + goto l2; + } + if (fmt >= (firstShortFormat())) { + len1 = numBytes - (((sqInt)((usqInt)((fmt & 3)) << 1))); + goto l2; + } + len1 = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); +l2: /* end byteSizeOf: */; + /* begin byteSizeOf: */ + if (arg2 & (tagMask())) { + len2 = 0; + goto l4; + } + /* begin numBytesOf: */ + fmt1 = (((usqInt) (longAt(arg2))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOf: */ + assert((classIndexOf(arg2)) > (isForwardedObjectClassIndexPun())); + numSlots1 = byteAt(arg2 + 7); + numBytes1 = (numSlots1 == (numSlotsMask()) + ? longAt(arg2 - BaseHeaderSize) + : numSlots1); + numBytes1 = numBytes1 << (shiftForWord()); + if (fmt1 >= (firstByteFormat())) { + + /* bytes (the common case), including CompiledMethod */ + len2 = numBytes1 - (fmt1 & 7); + goto l4; + } + if (fmt1 <= (sixtyFourBitIndexableFormat())) { + len2 = numBytes1; + goto l4; + } + if (fmt1 >= (firstShortFormat())) { + len2 = numBytes1 - (((sqInt)((usqInt)((fmt1 & 3)) << 1))); + goto l4; + } + len2 = numBytes1 - (((sqInt)((usqInt)((fmt1 & 1)) << 2))); +l4: /* end byteSizeOf: */; + if (!(len1 == len2)) { + /* begin pop:thenPush: */ + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), GIV(falseObj)); + GIV(stackPointer) = sp1; + return; + } + for (i = 0; i < len1; i += 1) { + if (!((byteAt((arg1 + BaseHeaderSize) + i)) == (byteAt((arg2 + BaseHeaderSize) + i)))) { + /* begin pop:thenPush: */ + longAtput((sp2 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), GIV(falseObj)); + GIV(stackPointer) = sp2; + return; + } + } + /* begin pop:thenPush: */ + longAtput((sp3 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), GIV(trueObj)); + GIV(stackPointer) = sp3; +} + + +/* Fill the receiver, which must be an indexable non-pointer + object, with the given integer value. */ + + /* InterpreterPrimitives>>#primitiveConstantFill */ +static void +primitiveConstantFill(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqInt end; + usqLong fillValue; + sqInt format; + usqInt i; + usqInt numSlots; + usqInt numSlots1; + sqInt oddBytes; + sqInt rcvr; + usqInt slotBytes; + + /* begin primitiveConstantFillSpur */ + fillValue = positive64BitValueOf(longAt(GIV(stackPointer))); + rcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (!((!GIV(primFailCode)) + && (((rcvr & (tagMask())) == 0) + && (((format = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()))) >= (sixtyFourBitIndexableFormat()))))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l5; + } + if (format >= (firstShortFormat())) { + if (format >= (firstByteFormat())) { + if ((fillValue > 0xFF) + || (format >= (firstCompiledMethodFormat()))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l5; + } + fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24); + oddBytes = format & 7; + } + else { + if (fillValue > 0xFFFF) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l5; + } + fillValue += fillValue << 16; + oddBytes = ((sqInt)((usqInt)((format & 3)) << 1)); + } + fillValue += fillValue << 32; + } + else { + if (format == (sixtyFourBitIndexableFormat())) { + oddBytes = 0; + } + else { + if (fillValue > 0xFFFFFFFFU) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + goto l5; + } + fillValue += fillValue << 32; + oddBytes = ((sqInt)((usqInt)((format & 1)) << 2)); + } + } + /* begin addressAfter: */ + numSlots1 = byteAt(rcvr + 7); + numSlots = (numSlots1 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots1); + if (numSlots == 0) { + /* begin allocationUnit */ + slotBytes = ((sqInt) 8); + } + else { + slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); + } + end = (rcvr + BaseHeaderSize) + slotBytes; + i = rcvr + BaseHeaderSize; + while (i < end) { + long64Atput(i, fillValue); + i += 8; + } + if (oddBytes > 0) { + flag("endianness"); + fillValue = fillValue >> (8 * oddBytes); + long64Atput(i - 8, fillValue); + } + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; +l5: /* end primitiveConstantFillSpur */; + +} + + +/* Primitive. Start or stop the VM profiler. The first argument is a boolean + to switch profiling on or off. The second argument is an integer or nil. + If an integer it determines the maximum number of samples in the VM's + sample buffer. Answer the current number of samples in the buffer. */ + + /* InterpreterPrimitives>>#primitiveControlVMProfiling */ +static void +primitiveControlVMProfiling(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt bufferSize; + sqInt numSamples; + sqInt onOffBar; + char *sp; + + if (GIV(argumentCount) != 2) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + if (((onOffBar = longAt(GIV(stackPointer) + (1 * BytesPerWord)))) == GIV(trueObj)) { + onOffBar = 1; + } + else { + if (onOffBar == GIV(falseObj)) { + onOffBar = 0; + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + } + if (((bufferSize = longAt(GIV(stackPointer)))) == GIV(nilObj)) { + bufferSize = 0; + } + else { + if (!(((bufferSize & 1)) + && (((bufferSize = (bufferSize >> 1))) > 0))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + } + numSamples = ioControlNewProfile(onOffBar,bufferSize); + /* begin pop:thenPushInteger: */ + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), (((usqInt)numSamples << 1) | 1)); + GIV(stackPointer) = sp; +} + + +/* Primitive. Copy the state of the receiver from the argument. + Fail if receiver and argument are of a different class. + Fail if the receiver or argument are contexts (because of context-to-stack + mapping). Fail if receiver and argument have different lengths (for + indexable objects). + Fail if the objects are not in a fit state to be copied (e.g. married + contexts and Cogged methods) */ + + /* InterpreterPrimitives>>#primitiveCopyObject */ +static void +primitiveCopyObject(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt arg; + sqInt fmt; + sqInt i; + usqInt length; + usqInt numBytes; + usqInt numSlots; + usqInt numSlots1; + sqInt rcvr; + sqInt valuePointer; + + if (!(GIV(argumentCount) >= 1)) { + GIV(primFailCode) = PrimErrBadNumArgs; + return; + } + arg = longAt(GIV(stackPointer)); + rcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (rcvr & (tagMask())) { + GIV(primFailCode) = PrimErrBadReceiver; + return; + } + if (arg & (tagMask())) { + GIV(primFailCode) = PrimErrBadArgument; + return; + } + if (((longAt(rcvr)) & (classIndexMask())) != ((longAt(arg)) & (classIndexMask()))) { + GIV(primFailCode) = PrimErrBadArgument; + return; + } + if (isPureBitsFormat((((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()))) { + /* begin numBytesOf: */ + fmt = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOf: */ + assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); + numSlots1 = byteAt(rcvr + 7); + numBytes = (numSlots1 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots1); + numBytes = numBytes << (shiftForWord()); + if (fmt >= (firstByteFormat())) { + + /* bytes (the common case), including CompiledMethod */ + length = numBytes - (fmt & 7); + goto l4; + } + if (fmt <= (sixtyFourBitIndexableFormat())) { + length = ((sqInt) numBytes); + goto l4; + } + if (fmt >= (firstShortFormat())) { + length = numBytes - (((sqInt)((usqInt)((fmt & 3)) << 1))); + goto l4; + } + length = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); + l4: /* end numBytesOf: */; + if (!((((((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask())) == ((((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask()))) + && (length == (numBytesOf(arg))))) { + GIV(primFailCode) = PrimErrBadArgument; + return; + } + memcpy(((void *)(rcvr + BaseHeaderSize)), ((void *)(arg + BaseHeaderSize)), length); + } + else { + if (!(isAppropriateForCopyObject(rcvr))) { + GIV(primFailCode) = PrimErrBadReceiver; + return; + } + /* begin numSlotsOf: */ + assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun())); + numSlots = byteAt(rcvr + 7); + length = (numSlots == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots); + if (!((isAppropriateForCopyObject(arg)) + && (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())))))) { + GIV(primFailCode) = PrimErrBadArgument; + return; + } + for (i = 0; i < length; i += 1) { + /* begin storePointer:ofObject:withValue: */ + valuePointer = longAt((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))); + assert(!(isForwarded(rcvr))); + if ((assert(isNonImmediate(rcvr)), + oopisGreaterThanOrEqualTo(rcvr, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((valuePointer & (tagMask())) == 0) + && (oopisLessThan(valuePointer, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(rcvr))) >> (rememberedBitShift())) & 1) != 0)) { + remember(rcvr); + } + } + } + longAtput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), valuePointer); + } + } + /* begin pop: */ + GIV(stackPointer) += GIV(argumentCount) * BytesPerWord; +} + + +/* Crash the VM by indirecting through a null pointer. If the sole argument + is true crash in this thread, and if it is false crash in a new thread. If + the argument is an integer use the method that implies. + bit 0 = thread to crash in; 1 => this thread + bit 1 = crash method; 0 => indirect through null pointer; 1 => call exit */ + + /* InterpreterPrimitives>>#primitiveCrashVM */ +EXPORT(sqInt) +primitiveCrashVM(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt crashInThisThread; + + if (((longAt(GIV(stackPointer))) & 1)) { + crashInThisThread = ((longAt(GIV(stackPointer))) >> 1); + } + else { + /* begin booleanValueOf: */ + if ((longAt(GIV(stackPointer))) == GIV(trueObj)) { + crashInThisThread = 1; + goto l1; + } + if ((longAt(GIV(stackPointer))) == GIV(falseObj)) { + crashInThisThread = 0; + goto l1; + } + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + crashInThisThread = null; + l1: /* end booleanValueOf: */; + } + if (GIV(primFailCode) + || (GIV(argumentCount) != 1)) { + return (GIV(primFailCode) = PrimErrBadNumArgs); + } + crashInThisOrAnotherThread(crashInThisThread); + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + return 0; +} + + +/* Pass in a non-negative value to disable the architectures powermanager if + any, zero to enable. This is a named (not numbered) primitive in the null + module (ie the VM) + */ + + /* InterpreterPrimitives>>#primitiveDisablePowerManager */ +EXPORT(sqInt) +primitiveDisablePowerManager(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt integer; + sqInt integerPointer; + + /* begin stackIntegerValue: */ + integerPointer = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + /* begin checkedIntegerValueOf: */ + if ((integerPointer & 1)) { + integer = (integerPointer >> 1); + goto l2; + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integer = 0; + goto l2; + } +l2: /* end stackIntegerValue: */; + if (!GIV(primFailCode)) { + ioDisablePowerManager(integer); + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + } + return 0; +} + + /* InterpreterPrimitives>>#primitiveDiv */ +static void +primitiveDiv(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt quotient; + char *sp; + + quotient = doPrimitiveDivby(longAt(GIV(stackPointer) + (1 * BytesPerWord)), longAt(GIV(stackPointer))); + /* begin pop2AndPushIntegerIfOK: */ + if (!GIV(primFailCode)) { + if ((((sqInt)((((usqInt)quotient)) ^ ((((usqInt)quotient)) << 1)))) >= 0) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)quotient << 1) | 1)); + GIV(stackPointer) = sp; + } + else { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + } + } +} + + /* InterpreterPrimitives>>#primitiveDivide */ +static void +primitiveDivide(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt integerArgument; + sqInt integerPointer; + sqInt integerPointer1; + sqInt integerReceiver; + char *sp; + + /* begin stackIntegerValue: */ + integerPointer = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + /* begin checkedIntegerValueOf: */ + if ((integerPointer & 1)) { + integerReceiver = (integerPointer >> 1); + goto l1; + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerReceiver = 0; + goto l1; + } +l1: /* end stackIntegerValue: */; + /* begin stackIntegerValue: */ + integerPointer1 = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + /* begin checkedIntegerValueOf: */ + if ((integerPointer1 & 1)) { + integerArgument = (integerPointer1 >> 1); + goto l2; + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + integerArgument = 0; + goto l2; + } +l2: /* end stackIntegerValue: */; + if ((integerArgument != 0) + && ((integerReceiver % integerArgument) == 0)) { + /* begin pop2AndPushIntegerIfOK: */ + if (!GIV(primFailCode)) { + if ((((sqInt)((((usqInt)(integerReceiver / integerArgument))) ^ ((((usqInt)(integerReceiver / integerArgument))) << 1)))) >= 0) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)(integerReceiver / integerArgument) << 1) | 1)); + GIV(stackPointer) = sp; + } + else { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + } + } + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } +} + + +/* Primitive arithmetic operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveDivideLargeIntegers */ +EXPORT(void) +primitiveDivideLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqLong a; + sqInt aIsNegative; + usqLong b; + sqInt bIsNegative; + sqInt oopArg; + sqInt oopRcvr; + sqInt oopResult; + usqLong result; + char *sp; + + oopArg = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + oopRcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + aIsNegative = isNegativeIntegerValueOf(oopRcvr); + bIsNegative = isNegativeIntegerValueOf(oopArg); + a = magnitude64BitValueOf(oopRcvr); + b = magnitude64BitValueOf(oopArg); + if (GIV(primFailCode)) { + return; + } + if (!((b != 0) + && ((a % b) == 0))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + result = a / b; + oopResult = magnitude64BitIntegerForneg(result, aIsNegative != bIsNegative); + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oopResult); + GIV(stackPointer) = sp; + } +} + + +/* Primitive arithmetic operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveDivLargeIntegers */ +EXPORT(void) +primitiveDivLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqLong a; + sqInt aIsNegative; + usqLong b; + sqInt bIsNegative; + sqInt oopArg; + sqInt oopRcvr; + sqInt oopResult; + usqLong rem; + usqLong result; + char *sp; + + oopArg = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + oopRcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + aIsNegative = isNegativeIntegerValueOf(oopRcvr); + bIsNegative = isNegativeIntegerValueOf(oopArg); + a = magnitude64BitValueOf(oopRcvr); + b = magnitude64BitValueOf(oopArg); + if (b == 0) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (GIV(primFailCode)) { + return; + } + result = a / b; + if (!(a == 0)) { + if (!(bIsNegative == aIsNegative)) { + + /* Round toward negative infinity */ + rem = a % b; + if (!(rem == 0)) { + + /* This can not overflow, because b > 1, otherwise rem = 0 */ + result += 1; + } + } + } + oopResult = magnitude64BitIntegerForneg(result, bIsNegative != aIsNegative); + if (!GIV(primFailCode)) { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oopResult); + GIV(stackPointer) = sp; + } +} + + +/* Attempt to enter a CriticalSection/Mutex. If not owned, set the owner to + the current + process and answer false. If owned by the current process answer true. + Otherwise suspend the process. Answer if the receiver is owned by the + current process. + For simulation if there is an argument it is taken to be the effective + activeProcess (see Process>>effectiveProcess). */ + + /* InterpreterPrimitives>>#primitiveEnterCriticalSection */ +static void +primitiveEnterCriticalSection(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt activeProc; + sqInt criticalSection; + sqInt objOop; + sqInt objOop1; + sqInt owningProcess; + sqInt owningProcessIndex; + char *sp; + char *sp1; + char *sp2; + + if (GIV(argumentCount) > 0) { + + /* rcvr */ + criticalSection = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + activeProc = longAt(GIV(stackPointer)); + } + else { + + /* rcvr */ + criticalSection = longAt(GIV(stackPointer)); + /* begin fetchPointer:ofObject: */ + objOop1 = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SchedulerAssociation) << (shiftForWord()))))); + objOop = longAt((objOop1 + BaseHeaderSize) + (((int)((usqInt)(ValueIndex) << (shiftForWord()))))); + activeProc = longAt((objOop + BaseHeaderSize) + (((int)((usqInt)(ActiveProcessIndex) << (shiftForWord()))))); + } + + /* CriticalSections are laid out like Semaphores */ + owningProcessIndex = ExcessSignalsIndex; + owningProcess = longAt((criticalSection + BaseHeaderSize) + (((sqInt)((usqInt)(owningProcessIndex) << (shiftForWord()))))); + if (owningProcess == GIV(nilObj)) { + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(criticalSection))); + if ((assert(isNonImmediate(criticalSection)), + oopisGreaterThanOrEqualTo(criticalSection, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((activeProc & (tagMask())) == 0) + && (oopisLessThan(activeProc, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(criticalSection))) >> (rememberedBitShift())) & 1) != 0)) { + remember(criticalSection); + } + } + } + longAtput((criticalSection + BaseHeaderSize) + (((sqInt)((usqInt)(owningProcessIndex) << (shiftForWord())))), activeProc); + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), GIV(falseObj)); + GIV(stackPointer) = sp; + return; + } + if (owningProcess == activeProc) { + /* begin pop:thenPush: */ + longAtput((sp1 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), GIV(trueObj)); + GIV(stackPointer) = sp1; + return; + } + /* begin pop:thenPush: */ + longAtput((sp2 = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), GIV(falseObj)); + GIV(stackPointer) = sp2; + addLastLinktoList(activeProc, criticalSection); + transferTo(wakeHighestPriority()); +} + + /* InterpreterPrimitives>>#primitiveEqual */ +static void +primitiveEqual(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt integerArgument; + sqInt integerReceiver; + int result; + char *sp; + char *sp1; + + integerArgument = longAt(GIV(stackPointer)); + integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((integerReceiver & integerArgument) & 1) != 0) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (integerReceiver == integerArgument + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } + else { + result = (positiveMachineIntegerValueOf(integerReceiver)) == (positiveMachineIntegerValueOf(integerArgument)); + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (result + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp1; + } + } +} + + +/* Primitive comparison operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveEqualLargeIntegers */ +EXPORT(void) +primitiveEqualLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqLong integerArg; + sqLong integerRcvr; + char *sp; + + integerArg = signed64BitValueOf(longAt(GIV(stackPointer) + (0 * BytesPerWord))); + integerRcvr = signed64BitValueOf(longAt(GIV(stackPointer) + (1 * BytesPerWord))); + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (integerRcvr == integerArg + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + +/* Exit the critical section. + This may change the active process as a result. */ + + /* InterpreterPrimitives>>#primitiveExitCriticalSection */ +static void +primitiveExitCriticalSection(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt criticalSection; + sqInt owningProcess; + sqInt owningProcessIndex; + + + /* rcvr */ + criticalSection = longAt(GIV(stackPointer)); + + /* CriticalSections are laid out like Semaphores */ + owningProcessIndex = ExcessSignalsIndex; + if ((assert(!(isForwarded(criticalSection))), + (longAt((criticalSection + BaseHeaderSize) + (((int)((usqInt)(FirstLinkIndex) << (shiftForWord())))))) == GIV(nilObj))) { + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(criticalSection))); + longAtput((criticalSection + BaseHeaderSize) + (((sqInt)((usqInt)(owningProcessIndex) << (shiftForWord())))), GIV(nilObj)); + } + else { + + /* store check unnecessary because criticalSection referred to owningProcess + via its FirstLinkIndex slot before owningProcess was removed. */ + owningProcess = removeFirstLinkOfList(criticalSection); + assert(!(isOopForwarded(criticalSection))); + longAtput((criticalSection + BaseHeaderSize) + (((sqInt)((usqInt)(owningProcessIndex) << (shiftForWord())))), owningProcess); + + resumepreemptedYieldingIf(owningProcess, GIV(preemptionYields)); + } +} + + /* InterpreterPrimitives>>#primitiveExitToDebugger */ +static void +primitiveExitToDebugger(void) +{ + error("Exit to debugger at user request"); +} + + +/* Computes E raised to the receiver power. + N.B. IMO we should be able to assume the receiver is a float because this + primitive is specific to floats. eem 2/13/2017 */ + + /* InterpreterPrimitives>>#primitiveExp */ +static void +primitiveExp(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aValue; + sqInt isFloat; + sqInt oop; + double rcvr; + double result; + + /* begin stackFloatValue: */ + oop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + isFloat = ((oop & (tagMask())) == 0) + && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(oop + BaseHeaderSize, result); + rcvr = result; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l2: /* end stackFloatValue: */; + if (!GIV(primFailCode)) { + /* begin stackTopPut: */ + aValue = floatObjectOf(exp(rcvr)); + longAtPointerput(GIV(stackPointer), aValue); + } +} + + +/* Exponent part of this float. + N.B. IMO we should be able to assume the receiver is a float because this + primitive is specific to floats. eem 2/13/2017 */ + + /* InterpreterPrimitives>>#primitiveExponent */ +static void +primitiveExponent(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt isFloat; + sqInt oop; + int pwr; + double rcvr; + double result; + + pwr = 0; + /* begin stackFloatValue: */ + oop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + isFloat = ((oop & (tagMask())) == 0) + && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(oop + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end stackFloatValue: */; + if (!GIV(primFailCode)) { + + /* rcvr = frac * 2^pwr, where frac is in [0.5..1.0) */ + frexp(rcvr, (&pwr)); + longAtPointerput(GIV(stackPointer), (((usqInt)(pwr - 1) << 1) | 1)); + } +} + + +/* Set general (unspecified) primitive failure. Don't overwrite an error code + that has already been set. */ +/* Use returnTypeC: #sqInt because that's the way it is defined in sq.h. + Use no explicit return so that Slang doesn't fail an inlining type-check + when a primitive with return type void uses ^self primitiveFail to exit. */ + + /* InterpreterPrimitives>>#primitiveFail */ +sqInt +primitiveFail(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return 0; +} + + +/* Set specific primitive failure. + N.B. primitiveFailFor: PrimNoErr is expected to clear the primFailCode. */ + + /* InterpreterPrimitives>>#primitiveFailFor: */ +sqInt +primitiveFailFor(sqInt reasonCode) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return (GIV(primFailCode) = reasonCode); +} + + /* InterpreterPrimitives>>#primitiveFailureCode */ +sqInt +primitiveFailureCode(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + return GIV(primFailCode); +} + + /* InterpreterPrimitives>>#primitiveFetchNextMourner */ +static void +primitiveFetchNextMourner(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt mourner; + char *sp; + + mourner = (GIV(mournQueue) != GIV(nilObj) + ? popObjStack(GIV(mournQueue)) + : 0); + if (mourner == null) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrNotFound; + } + else { + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), mourner); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveFloatAdd */ +static void +primitiveFloatAdd(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + double arg; + sqInt argOop; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + sqInt rcvrOop; + double result; + double result1; + char *sp; + + /* begin primitiveFloatAdd:toArg: */ + rcvrOop = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + argOop = longAt(GIV(stackPointer)); + /* begin loadFloatOrIntFrom: */ + if ((rcvrOop & 1)) { + rcvr = ((double) ((rcvrOop >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = ((rcvrOop & (tagMask())) == 0) + && (((longAt(rcvrOop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvrOop + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((argOop & 1)) { + arg = ((double) ((argOop >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = ((argOop & (tagMask())) == 0) + && (((longAt(argOop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(argOop + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr + arg)); + GIV(stackPointer) = sp; + } + return; +} + + +/* Provide platform-independent access to 32-bit words comprising + a Float. Map index 1 onto the most significant word and index 2 + onto the least significant word. */ + + /* InterpreterPrimitives>>#primitiveFloatAt */ +static void +primitiveFloatAt(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt fieldIndex; + sqInt fieldIndex1; + sqInt index; + unsigned int integerValue; + unsigned int integerValue1; + usqInt newLargeInteger; + usqInt newLargeInteger1; + usqInt newObj; + usqInt newObj1; + usqInt numBytes; + usqInt numBytes1; + sqInt objFormat; + sqInt objFormat1; + sqInt rcvr; + sqInt reasonCode; + usqInt result; + char *sp; + char *sp1; + sqInt valueWord; + sqInt valueWord2; + + rcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + index = longAt(GIV(stackPointer)); + if (index == ConstOne) { + /* begin positive32BitIntegerFor: */ + fieldIndex = (VMBIGENDIAN + ? 0 + : 1); + integerValue = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << 2)))))); + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) { + result = ((integerValue << 1) | 1); + goto l6; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l4; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; + l4: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + result = ((sqInt) newLargeInteger); + goto l6; + + l6: /* end positive32BitIntegerFor: */; + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); + GIV(stackPointer) = sp; + return; + } + if (index == ConstTwo) { + /* begin positive32BitIntegerFor: */ + fieldIndex1 = (VMBIGENDIAN + ? 1 + : 0); + integerValue1 = ((sqInt) (long32At((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << 2)))))); + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) integerValue1)) <= (MaxSmallInteger)) { + result = ((integerValue1 << 1) | 1); + goto l11; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat1 = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat1 < (firstByteFormat()) + ? objFormat1 + : objFormat1 & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj1 = GIV(freeStart); + numBytes1 = BaseHeaderSize + (8); + assert((numBytes1 % (allocationUnit())) == 0); + assert((newObj1 % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes1) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes1) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger1 = 0; + goto l9; + } + } + long64Atput(newObj1, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat1) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes1; + newLargeInteger1 = newObj1; + l9: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord2 = SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue1); + long32Atput((newLargeInteger1 + BaseHeaderSize) + (0U << 2), valueWord2); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger1 + BaseHeaderSize) + (1U << 2), 0); + + result = ((sqInt) newLargeInteger1); + goto l11; + + l11: /* end positive32BitIntegerFor: */; + /* begin pop:thenPush: */ + longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); + GIV(stackPointer) = sp1; + return; + } + /* begin primitiveFailFor: */ + reasonCode = ((index & 1) + ? PrimErrBadIndex + : PrimErrBadArgument); + GIV(primFailCode) = reasonCode; +} + + +/* Provide platform-independent access to 32-bit words comprising + a Float. Map index 1 onto the most significant word and index 2 + onto the least significant word. */ + + /* InterpreterPrimitives>>#primitiveFloatAtPut */ +static void +primitiveFloatAtPut(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt fieldIndex; + sqInt fieldIndex1; + sqInt index; + sqInt oopToStore; + sqInt rcvr; + sqInt reasonCode; + char *sp; + char *sp1; + usqInt valueToStore; + + oopToStore = longAt(GIV(stackPointer)); + valueToStore = positive32BitValueOf(oopToStore); + if (GIV(primFailCode)) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + return; + } + rcvr = longAt(GIV(stackPointer) + (2 * BytesPerWord)); + index = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if ( +# if IMMUTABILITY + (/* begin isImmutable: */ + ((((usqInt) (longAt(rcvr))) >> (immutableBitShift())) & 1) != 0) +# else /* IMMUTABILITY */ + 0 +# endif /* IMMUTABILITY */ + ) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrNoModification; + return; + } + if (index == ConstOne) { + /* begin storeLong32:ofObject:withValue: */ + fieldIndex = (VMBIGENDIAN + ? 0 + : 1); + long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex) << 2))), valueToStore); + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), oopToStore); + GIV(stackPointer) = sp; + return; + } + if (index == ConstTwo) { + /* begin storeLong32:ofObject:withValue: */ + fieldIndex1 = (VMBIGENDIAN + ? 1 + : 0); + long32Atput((rcvr + BaseHeaderSize) + (((sqInt)((usqInt)(fieldIndex1) << 2))), valueToStore); + /* begin pop:thenPush: */ + longAtput((sp1 = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), oopToStore); + GIV(stackPointer) = sp1; + return; + } + /* begin primitiveFailFor: */ + reasonCode = ((index & 1) + ? PrimErrBadIndex + : PrimErrBadArgument); + GIV(primFailCode) = reasonCode; +} + + /* InterpreterPrimitives>>#primitiveFloatDivide */ +static void +primitiveFloatDivide(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + double arg; + sqInt argOop; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + sqInt rcvrOop; + double result; + double result1; + char *sp; + + /* begin primitiveFloatDivide:byArg: */ + rcvrOop = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + argOop = longAt(GIV(stackPointer)); + /* begin loadFloatOrIntFrom: */ + if ((rcvrOop & 1)) { + rcvr = ((double) ((rcvrOop >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = ((rcvrOop & (tagMask())) == 0) + && (((longAt(rcvrOop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvrOop + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((argOop & 1)) { + arg = ((double) ((argOop >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = ((argOop & (tagMask())) == 0) + && (((longAt(argOop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(argOop + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + /* begin success: */ + if (!(arg != 0.0)) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr / arg)); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveFloatEqual */ +static void +primitiveFloatEqual(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aBool; + double arg; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + double result; + double result1; + char *sp; + + /* begin primitiveFloatEqual:toArg: */ + if (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & 1)) { + rcvr = ((double) (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer) + (1 * BytesPerWord)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if (((longAt(GIV(stackPointer))) & 1)) { + arg = ((double) (((longAt(GIV(stackPointer))) >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = (((longAt(GIV(stackPointer))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto((longAt(GIV(stackPointer))) + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + aBool = rcvr == arg; + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (aBool + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveFloatGreaterOrEqual */ +static void +primitiveFloatGreaterOrEqual(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aBool; + double arg; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + double result; + double result1; + char *sp; + + /* begin primitiveFloatGreaterOrEqual:toArg: */ + if (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & 1)) { + rcvr = ((double) (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer) + (1 * BytesPerWord)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if (((longAt(GIV(stackPointer))) & 1)) { + arg = ((double) (((longAt(GIV(stackPointer))) >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = (((longAt(GIV(stackPointer))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto((longAt(GIV(stackPointer))) + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + aBool = rcvr >= arg; + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (aBool + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveFloatGreaterThan */ +static void +primitiveFloatGreaterThan(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aBool; + double arg; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + double result; + double result1; + char *sp; + + /* begin primitiveFloatGreater:thanArg: */ + if (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & 1)) { + rcvr = ((double) (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer) + (1 * BytesPerWord)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if (((longAt(GIV(stackPointer))) & 1)) { + arg = ((double) (((longAt(GIV(stackPointer))) >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = (((longAt(GIV(stackPointer))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto((longAt(GIV(stackPointer))) + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + aBool = rcvr > arg; + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (aBool + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveFloatLessOrEqual */ +static void +primitiveFloatLessOrEqual(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aBool; + double arg; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + double result; + double result1; + char *sp; + + /* begin primitiveFloatLessOrEqual:toArg: */ + if (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & 1)) { + rcvr = ((double) (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer) + (1 * BytesPerWord)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if (((longAt(GIV(stackPointer))) & 1)) { + arg = ((double) (((longAt(GIV(stackPointer))) >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = (((longAt(GIV(stackPointer))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto((longAt(GIV(stackPointer))) + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + aBool = rcvr <= arg; + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (aBool + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveFloatLessThan */ +static void +primitiveFloatLessThan(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aBool; + double arg; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + double result; + double result1; + char *sp; + + /* begin primitiveFloatLess:thanArg: */ + if (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & 1)) { + rcvr = ((double) (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer) + (1 * BytesPerWord)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if (((longAt(GIV(stackPointer))) & 1)) { + arg = ((double) (((longAt(GIV(stackPointer))) >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = (((longAt(GIV(stackPointer))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto((longAt(GIV(stackPointer))) + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + aBool = rcvr < arg; + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (aBool + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveFloatMultiply */ +static void +primitiveFloatMultiply(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + double arg; + sqInt argOop; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + sqInt rcvrOop; + double result; + double result1; + char *sp; + + /* begin primitiveFloatMultiply:byArg: */ + rcvrOop = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + argOop = longAt(GIV(stackPointer)); + /* begin loadFloatOrIntFrom: */ + if ((rcvrOop & 1)) { + rcvr = ((double) ((rcvrOop >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = ((rcvrOop & (tagMask())) == 0) + && (((longAt(rcvrOop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvrOop + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((argOop & 1)) { + arg = ((double) ((argOop >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = ((argOop & (tagMask())) == 0) + && (((longAt(argOop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(argOop + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr * arg)); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveFloatNotEqual */ +static void +primitiveFloatNotEqual(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aBool; + double arg; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + double result; + double result1; + char *sp; + + /* begin primitiveFloatEqual:toArg: */ + if (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & 1)) { + rcvr = ((double) (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = (((longAt(GIV(stackPointer) + (1 * BytesPerWord))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer) + (1 * BytesPerWord)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if (((longAt(GIV(stackPointer))) & 1)) { + arg = ((double) (((longAt(GIV(stackPointer))) >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = (((longAt(GIV(stackPointer))) & (tagMask())) == 0) + && (((longAt(longAt(GIV(stackPointer)))) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto((longAt(GIV(stackPointer))) + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + aBool = rcvr == arg; + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (!aBool + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveFloatSubtract */ +static void +primitiveFloatSubtract(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + double arg; + sqInt argOop; + sqInt isFloat; + sqInt isFloat1; + double rcvr; + sqInt rcvrOop; + double result; + double result1; + char *sp; + + /* begin primitiveFloatSubtract:fromArg: */ + rcvrOop = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + argOop = longAt(GIV(stackPointer)); + /* begin loadFloatOrIntFrom: */ + if ((rcvrOop & 1)) { + rcvr = ((double) ((rcvrOop >> 1)) ); + goto l1; + } + /* begin floatValueOf: */ + isFloat = ((rcvrOop & (tagMask())) == 0) + && (((longAt(rcvrOop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(rcvrOop + BaseHeaderSize, result); + rcvr = result; + goto l1; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l1: /* end loadFloatOrIntFrom: */; + /* begin loadFloatOrIntFrom: */ + if ((argOop & 1)) { + arg = ((double) ((argOop >> 1)) ); + goto l2; + } + /* begin floatValueOf: */ + isFloat1 = ((argOop & (tagMask())) == 0) + && (((longAt(argOop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(argOop + BaseHeaderSize, result1); + arg = result1; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + arg = 0.0; +l2: /* end loadFloatOrIntFrom: */; + if (!GIV(primFailCode)) { + /* begin pop:thenPushFloat: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), floatObjectOf(rcvr - arg)); + GIV(stackPointer) = sp; + } + return; +} + + +/* Clear the method lookup cache. This must be done after every programming + change. + */ + + /* InterpreterPrimitives>>#primitiveFlushCache */ +static void +primitiveFlushCache(void) +{ + flushMethodCache(); +} + + +/* Primitive. Flush all the existing external primitives in the image thus + forcing a reload on next invokation. + */ + + /* InterpreterPrimitives>>#primitiveFlushExternalPrimitives */ +static void +primitiveFlushExternalPrimitives(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt address; + sqInt address1; + sqInt followingWord; + sqInt followingWord1; + sqInt followingWord2; + usqInt followingWordAddress; + usqInt followingWordAddress1; + usqInt followingWordAddress2; + sqInt i; + usqInt limit; + usqInt numSlots; + usqInt numSlots1; + usqInt numSlots11; + usqInt numSlots12; + usqInt numSlots2; + usqInt numSlots3; + usqInt numSlots4; + usqInt numSlots5; + sqInt objOop; + sqInt objOop1; + sqInt objOop11; + sqInt objOop2; + sqInt oop; + sqInt prevObj; + sqInt prevObj1; + sqInt prevPrevObj; + sqInt prevPrevObj1; + usqInt slotBytes; + usqInt slotBytes1; + usqInt slotBytes2; + + /* begin flushExternalPrimitives */ + + /* After a scavenge eden is empty, futureSpace is empty, and all newSpace objects are + in pastSpace. Objects are allocated in eden. So enumerate only pastSpace and eden. */ + prevPrevObj = (prevObj = null); + assert((((pastSpace()).start)) < (((eden()).start))); + /* begin objectStartingAt: */ + address = ((pastSpace()).start); + numSlots3 = byteAt(address + 7); + objOop1 = (numSlots3 == (numSlotsMask()) + ? address + BaseHeaderSize + : address); + limit = GIV(pastSpaceStart); + while (oopisLessThan(objOop1, limit)) { + assert(isEnumerableObjectNoAssert(objOop1)); + if (((((usqInt) (longAt(objOop1))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) { + + /* This is a compiled method */ + flushExternalPrimitiveOf(objOop1); + } + + + prevPrevObj = prevObj; + prevObj = objOop1; + /* begin objectAfter:limit: */ + numSlots1 = byteAt(objOop1 + 7); + numSlots = (numSlots1 == (numSlotsMask()) + ? longAt(objOop1 - BaseHeaderSize) + : numSlots1); + if (numSlots == 0) { + /* begin allocationUnit */ + slotBytes = ((sqInt) 8); + } + else { + slotBytes = (numSlots + (numSlots & 1)) << (shiftForWord()); + } + followingWordAddress = (objOop1 + BaseHeaderSize) + slotBytes; + if (oopisGreaterThanOrEqualTo(followingWordAddress, limit)) { + objOop1 = limit; + goto l4; + } + flag("endianness"); + followingWord = longAt(followingWordAddress + 4); + objOop1 = ((((usqInt) followingWord) >> (numSlotsHalfShift())) == (numSlotsMask()) + ? followingWordAddress + BaseHeaderSize + : followingWordAddress); + l4: /* end objectAfter:limit: */; + } + /* begin objectStartingAt: */ + address1 = ((eden()).start); + numSlots4 = byteAt(address1 + 7); + objOop1 = (numSlots4 == (numSlotsMask()) + ? address1 + BaseHeaderSize + : address1); + while (oopisLessThan(objOop1, GIV(freeStart))) { + assert(isEnumerableObjectNoAssert(objOop1)); + if (((((usqInt) (longAt(objOop1))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) { + + /* This is a compiled method */ + flushExternalPrimitiveOf(objOop1); + } + + + prevPrevObj = prevObj; + prevObj = objOop1; + /* begin objectAfter:limit: */ + numSlots11 = byteAt(objOop1 + 7); + numSlots2 = (numSlots11 == (numSlotsMask()) + ? longAt(objOop1 - BaseHeaderSize) + : numSlots11); + if (numSlots2 == 0) { + /* begin allocationUnit */ + slotBytes1 = ((sqInt) 8); + } + else { + slotBytes1 = (numSlots2 + (numSlots2 & 1)) << (shiftForWord()); + } + followingWordAddress1 = (objOop1 + BaseHeaderSize) + slotBytes1; + if (oopisGreaterThanOrEqualTo(followingWordAddress1, GIV(freeStart))) { + objOop1 = GIV(freeStart); + goto l8; + } + flag("endianness"); + followingWord1 = longAt(followingWordAddress1 + 4); + objOop1 = ((((usqInt) followingWord1) >> (numSlotsHalfShift())) == (numSlotsMask()) + ? followingWordAddress1 + BaseHeaderSize + : followingWordAddress1); + l8: /* end objectAfter:limit: */; + } + /* begin allOldSpaceObjectsDo: */ + assert(isOldObject(GIV(nilObj))); + prevPrevObj1 = (prevObj1 = null); + objOop11 = GIV(nilObj); + while (1) { + assert((objOop11 % (allocationUnit())) == 0); + if (!(oopisLessThan(objOop11, GIV(endOfMemory)))) break; + assert((long64At(objOop11)) != 0); + if (isEnumerableObject(objOop11)) { + if (((((usqInt) (longAt(objOop11))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())) { + + /* This is a compiled method */ + flushExternalPrimitiveOf(objOop11); + } + + } + + prevPrevObj1 = prevObj1; + prevObj1 = objOop11; + /* begin objectAfter:limit: */ + numSlots12 = byteAt(objOop11 + 7); + numSlots5 = (numSlots12 == (numSlotsMask()) + ? longAt(objOop11 - BaseHeaderSize) + : numSlots12); + if (numSlots5 == 0) { + /* begin allocationUnit */ + slotBytes2 = ((sqInt) 8); + } + else { + slotBytes2 = (numSlots5 + (numSlots5 & 1)) << (shiftForWord()); + } + followingWordAddress2 = (objOop11 + BaseHeaderSize) + slotBytes2; + if (oopisGreaterThanOrEqualTo(followingWordAddress2, GIV(endOfMemory))) { + objOop11 = GIV(endOfMemory); + goto l13; + } + flag("endianness"); + followingWord2 = longAt(followingWordAddress2 + 4); + objOop11 = ((((usqInt) followingWord2) >> (numSlotsHalfShift())) == (numSlotsMask()) + ? followingWordAddress2 + BaseHeaderSize + : followingWordAddress2); + l13: /* end objectAfter:limit: */; + } + flushMethodCache(); + /* begin flushExternalPrimitiveTable */ + for (i = 0; i < MaxExternalPrimitiveTableSize; i += 1) { + externalPrimitiveTable[i] = 0; + } + GIV(externalPrimitiveTableFirstFreeIndex) = 0; +} + + +/* On some platforms, this primitive forces enqueued display updates to be + processed immediately. On others, it does nothing. + */ + + /* InterpreterPrimitives>>#primitiveForceDisplayUpdate */ +static void +primitiveForceDisplayUpdate(void) +{ + ioForceDisplayUpdate(); +} + + +/* On platforms that support it, this primitive prints the receiver, assumed + to be a Form, to the default printer. + */ + + /* InterpreterPrimitives>>#primitiveFormPrint */ +static void +primitiveFormPrint(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt bitsArray; + sqInt bitsArraySize; + sqInt depth; + sqInt fmt; + sqInt h; + double hScale; + sqInt isFloat; + sqInt isFloat1; + sqInt landscapeFlag; + usqInt numBytes; + usqInt numSlots; + sqInt ok; + sqInt oop; + sqInt oop1; + int pixelsPerWord; + sqInt rcvr; + double result; + double result1; + double vScale; + sqInt w; + sqInt wordsPerLine; + + /* begin booleanValueOf: */ + if ((longAt(GIV(stackPointer))) == GIV(trueObj)) { + landscapeFlag = 1; + goto l2; + } + if ((longAt(GIV(stackPointer))) == GIV(falseObj)) { + landscapeFlag = 0; + goto l2; + } + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + landscapeFlag = null; +l2: /* end booleanValueOf: */; + /* begin floatValueOf: */ + oop = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + isFloat = ((oop & (tagMask())) == 0) + && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(oop + BaseHeaderSize, result); + vScale = result; + goto l5; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + vScale = 0.0; +l5: /* end floatValueOf: */; + /* begin floatValueOf: */ + oop1 = longAt(GIV(stackPointer) + (2 * BytesPerWord)); + isFloat1 = ((oop1 & (tagMask())) == 0) + && (((longAt(oop1)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat1) { + fetchFloatAtinto(oop1 + BaseHeaderSize, result1); + hScale = result1; + goto l6; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + hScale = 0.0; +l6: /* end floatValueOf: */; + rcvr = longAt(GIV(stackPointer) + (3 * BytesPerWord)); + if (!((((rcvr & (tagMask())) == 0) + && (((((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask())) <= 5)) + && ((lengthOfformat(rcvr, (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()))) >= 4))) { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + } + if (!GIV(primFailCode)) { + bitsArray = longAt((rcvr + BaseHeaderSize) + (0U << (shiftForWord()))); + w = fetchIntegerofObject(1, rcvr); + h = fetchIntegerofObject(2, rcvr); + depth = fetchIntegerofObject(3, rcvr); + if (!((w > 0) + && (h > 0))) { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + } + pixelsPerWord = 32 / depth; + wordsPerLine = (w + (pixelsPerWord - 1)) / pixelsPerWord; + if (((bitsArray & (tagMask())) == 0) + && (isPureBitsFormat((((usqInt) (longAt(bitsArray))) >> (formatShift())) & (formatMask())))) { + /* begin numBytesOf: */ + fmt = (((usqInt) (longAt(bitsArray))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOf: */ + assert((classIndexOf(bitsArray)) > (isForwardedObjectClassIndexPun())); + numSlots = byteAt(bitsArray + 7); + numBytes = (numSlots == (numSlotsMask()) + ? longAt(bitsArray - BaseHeaderSize) + : numSlots); + numBytes = numBytes << (shiftForWord()); + if (fmt >= (firstByteFormat())) { + + /* bytes (the common case), including CompiledMethod */ + bitsArraySize = numBytes - (fmt & 7); + goto l4; + } + if (fmt <= (sixtyFourBitIndexableFormat())) { + bitsArraySize = numBytes; + goto l4; + } + if (fmt >= (firstShortFormat())) { + bitsArraySize = numBytes - (((sqInt)((usqInt)((fmt & 3)) << 1))); + goto l4; + } + bitsArraySize = numBytes - (((sqInt)((usqInt)((fmt & 1)) << 2))); + l4: /* end numBytesOf: */; + /* begin success: */ + if (!(bitsArraySize == ((wordsPerLine * h) * 4))) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + } + else { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + } + } + if (!GIV(primFailCode)) { + ok = ioFormPrint(bitsArray + BaseHeaderSize, w, h, depth, hScale, vScale, landscapeFlag); + /* begin success: */ + if (!ok) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + } + if (!GIV(primFailCode)) { + /* begin pop: */ + GIV(stackPointer) += 3 * BytesPerWord; + } +} + + +/* Fractional part of this float. + N.B. IMO we should be able to assume the receiver is a float because this + primitive is specific to floats. eem 2/13/2017 */ + + /* InterpreterPrimitives>>#primitiveFractionalPart */ +static void +primitiveFractionalPart(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt aValue; + sqInt isFloat; + sqInt oop; + double rcvr; + double result; + double trunc; + + /* begin stackFloatValue: */ + oop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + isFloat = ((oop & (tagMask())) == 0) + && (((longAt(oop)) & (classIndexMask())) == ClassFloatCompactIndex); + if (isFloat) { + fetchFloatAtinto(oop + BaseHeaderSize, result); + rcvr = result; + goto l2; + } + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + rcvr = 0.0; +l2: /* end stackFloatValue: */; + if (!GIV(primFailCode)) { + /* begin stackTopPut: */ + aValue = floatObjectOf(modf(rcvr, (&trunc))); + longAtPointerput(GIV(stackPointer), aValue); + } +} + + /* InterpreterPrimitives>>#primitiveFullClosureValue */ +static void +primitiveFullClosureValue(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt blockClosure; + sqInt closureMethod; + sqInt i; + sqInt methodHeader; + sqInt numArgs; + sqInt numCopied; + sqInt numTemps; + sqInt object; + sqInt object1; + sqInt objOop; + sqInt oop; + char *sp; + char *sp1; + char *sp2; + char *sp3; + char *sp4; + char *sp5; + char *sp6; + char *sp7; + sqInt theMethod; + + blockClosure = longAt(GIV(stackPointer) + (GIV(argumentCount) * BytesPerWord)); + /* begin quickFetchInteger:ofObject: */ + oop = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord()))))); + assert((oop & 1)); + numArgs = (oop >> 1); + if (!(GIV(argumentCount) == numArgs)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + closureMethod = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord()))))); + if (!(((closureMethod & (tagMask())) == 0) + && (((((usqInt) (longAt(closureMethod))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + /* begin activateNewFullClosureMethod:numArgs:mayContextSwitch: */ + numCopied = (numSlotsOf(blockClosure)) - FullClosureFirstCopiedValueIndex; + /* begin fetchPointer:ofObject: */ + theMethod = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord()))))); + assert(isOopCompiledMethod(theMethod)); + /* begin push: */ + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); + GIV(stackPointer) = sp2; + /* begin push: */ + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(framePointer)); + GIV(stackPointer) = sp3; + GIV(framePointer) = GIV(stackPointer); + /* begin push: */ + longAtput((sp4 = GIV(stackPointer) - BytesPerWord), theMethod); + GIV(stackPointer) = sp4; + /* begin push: */ + object = (VMBIGENDIAN + ? ((1 + (((sqInt)((usqInt)(numArgs) << ((BytesPerWord * 8) - 8))))) + (0)) + (1U << ((BytesPerWord * 8) - 24)) + : ((1 + (((sqInt)((usqInt)(numArgs) << 8)))) + (0)) + (1U << 24)); + longAtput((sp5 = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp5; + /* begin push: */ + longAtput((sp6 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp6; + /* begin push: */ + objOop = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureReceiverIndex) << (shiftForWord()))))); + if (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop = fixFollowedFieldofObjectwithInitialValue(FullClosureReceiverIndex, blockClosure, objOop); + } + object1 = objOop; + longAtput((sp7 = GIV(stackPointer) - BytesPerWord), object1); + GIV(stackPointer) = sp7; + for (i = 0; i < numCopied; i += 1) { + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + GIV(stackPointer) = sp; + } + assert(frameIsBlockActivation(GIV(framePointer))); + assert(!(frameHasContext(GIV(framePointer)))); + /* begin methodHeaderOf: */ + assert(isCompiledMethod(theMethod)); + /* begin fetchPointer:ofObject: */ + methodHeader = longAt((theMethod + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); + numTemps = (((usqInt) methodHeader) >> MethodHeaderTempCountShift) & 0x3F; + for (i = ((numArgs + numCopied) + 1); i <= numTemps; i += 1) { + /* begin push: */ + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp1; + } + GIV(instructionPointer) = ((theMethod + ((LiteralStart + ((assert((methodHeader & 1)), +((methodHeader >> 1)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize) - 1; + /* begin setMethod: */ + GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + GIV(bytecodeSetSelector) = (methodUsesAlternateBytecodeSet(GIV(method)) + ? 256 + : 0); + + if (GIV(stackPointer) < GIV(stackLimit)) { + handleStackOverflowOrEventAllowContextSwitch(1); + } +} + + +/* An exact clone of primitiveFullClosureValue except that this version will + not check for interrupts on stack overflow. It may invoke the garbage + collector but will not switch processes. See + checkForInterruptsMayContextSwitch: */ + + /* InterpreterPrimitives>>#primitiveFullClosureValueNoContextSwitch */ +void +primitiveFullClosureValueNoContextSwitch(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt blockClosure; + sqInt closureMethod; + sqInt i; + sqInt methodHeader; + sqInt numArgs; + sqInt numCopied; + sqInt numTemps; + sqInt object; + sqInt object1; + sqInt objOop; + sqInt oop; + char *sp; + char *sp1; + char *sp2; + char *sp3; + char *sp4; + char *sp5; + char *sp6; + char *sp7; + sqInt theMethod; + + blockClosure = longAt(GIV(stackPointer) + (GIV(argumentCount) * BytesPerWord)); + /* begin quickFetchInteger:ofObject: */ + oop = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord()))))); + assert((oop & 1)); + numArgs = (oop >> 1); + if (!(GIV(argumentCount) == numArgs)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + closureMethod = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord()))))); + if (!(((closureMethod & (tagMask())) == 0) + && (((((usqInt) (longAt(closureMethod))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + /* begin activateNewFullClosureMethod:numArgs:mayContextSwitch: */ + numCopied = (numSlotsOf(blockClosure)) - FullClosureFirstCopiedValueIndex; + /* begin fetchPointer:ofObject: */ + theMethod = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord()))))); + assert(isOopCompiledMethod(theMethod)); + /* begin push: */ + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); + GIV(stackPointer) = sp2; + /* begin push: */ + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(framePointer)); + GIV(stackPointer) = sp3; + GIV(framePointer) = GIV(stackPointer); + /* begin push: */ + longAtput((sp4 = GIV(stackPointer) - BytesPerWord), theMethod); + GIV(stackPointer) = sp4; + /* begin push: */ + object = (VMBIGENDIAN + ? ((1 + (((sqInt)((usqInt)(numArgs) << ((BytesPerWord * 8) - 8))))) + (0)) + (1U << ((BytesPerWord * 8) - 24)) + : ((1 + (((sqInt)((usqInt)(numArgs) << 8)))) + (0)) + (1U << 24)); + longAtput((sp5 = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp5; + /* begin push: */ + longAtput((sp6 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp6; + /* begin push: */ + objOop = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureReceiverIndex) << (shiftForWord()))))); + if (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop = fixFollowedFieldofObjectwithInitialValue(FullClosureReceiverIndex, blockClosure, objOop); + } + object1 = objOop; + longAtput((sp7 = GIV(stackPointer) - BytesPerWord), object1); + GIV(stackPointer) = sp7; + for (i = 0; i < numCopied; i += 1) { + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + GIV(stackPointer) = sp; + } + assert(frameIsBlockActivation(GIV(framePointer))); + assert(!(frameHasContext(GIV(framePointer)))); + /* begin methodHeaderOf: */ + assert(isCompiledMethod(theMethod)); + /* begin fetchPointer:ofObject: */ + methodHeader = longAt((theMethod + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); + numTemps = (((usqInt) methodHeader) >> MethodHeaderTempCountShift) & 0x3F; + for (i = ((numArgs + numCopied) + 1); i <= numTemps; i += 1) { + /* begin push: */ + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp1; + } + GIV(instructionPointer) = ((theMethod + ((LiteralStart + ((assert((methodHeader & 1)), +((methodHeader >> 1)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize) - 1; + /* begin setMethod: */ + GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + GIV(bytecodeSetSelector) = (methodUsesAlternateBytecodeSet(GIV(method)) + ? 256 + : 0); + + if (GIV(stackPointer) < GIV(stackLimit)) { + handleStackOverflowOrEventAllowContextSwitch(0); + } +} + + /* InterpreterPrimitives>>#primitiveFullClosureValueWithArgs */ +static void +primitiveFullClosureValueWithArgs(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt argumentArray; + usqInt arraySize; + sqInt blockClosure; + sqInt closureMethod; + sqInt i; + sqInt index; + sqInt methodHeader; + sqInt numArgs; + sqInt numCopied; + usqInt numSlots; + sqInt numTemps; + sqInt object; + sqInt object1; + sqInt objOop; + sqInt oop; + char *sp; + char *sp1; + char *sp2; + char *sp3; + char *sp4; + char *sp5; + char *sp6; + char *sp7; + char *sp8; + sqInt theMethod; + sqInt top; + + argumentArray = longAt(GIV(stackPointer)); + if (!(((argumentArray & (tagMask())) == 0) + && (((((usqInt) (longAt(argumentArray))) >> (formatShift())) & (formatMask())) == 2))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + /* begin numSlotsOf: */ + assert((classIndexOf(argumentArray)) > (isForwardedObjectClassIndexPun())); + numSlots = byteAt(argumentArray + 7); + arraySize = (numSlots == (numSlotsMask()) + ? longAt(argumentArray - BaseHeaderSize) + : numSlots); + if (!(roomToPushNArgs(arraySize))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + blockClosure = longAt(GIV(stackPointer) + (GIV(argumentCount) * BytesPerWord)); + /* begin quickFetchInteger:ofObject: */ + oop = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(ClosureNumArgsIndex) << (shiftForWord()))))); + assert((oop & 1)); + numArgs = (oop >> 1); + if (!(arraySize == numArgs)) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + closureMethod = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord()))))); + if (!(((closureMethod & (tagMask())) == 0) + && (((((usqInt) (longAt(closureMethod))) >> (formatShift())) & (formatMask())) >= (firstCompiledMethodFormat())))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + index = 1; + while (index <= numArgs) { + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), longAt((argumentArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - 1)) << (shiftForWord())))))); + GIV(stackPointer) = sp; + index += 1; + } + /* begin activateNewFullClosureMethod:numArgs:mayContextSwitch: */ + numCopied = (numSlotsOf(blockClosure)) - FullClosureFirstCopiedValueIndex; + /* begin fetchPointer:ofObject: */ + theMethod = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureCompiledBlockIndex) << (shiftForWord()))))); + assert(isOopCompiledMethod(theMethod)); + /* begin push: */ + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); + GIV(stackPointer) = sp2; + /* begin push: */ + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), GIV(framePointer)); + GIV(stackPointer) = sp3; + GIV(framePointer) = GIV(stackPointer); + /* begin push: */ + longAtput((sp4 = GIV(stackPointer) - BytesPerWord), theMethod); + GIV(stackPointer) = sp4; + /* begin push: */ + object = (VMBIGENDIAN + ? ((1 + (((sqInt)((usqInt)(numArgs) << ((BytesPerWord * 8) - 8))))) + (0)) + (1U << ((BytesPerWord * 8) - 24)) + : ((1 + (((sqInt)((usqInt)(numArgs) << 8)))) + (0)) + (1U << 24)); + longAtput((sp5 = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp5; + /* begin push: */ + longAtput((sp6 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp6; + /* begin push: */ + objOop = longAt((blockClosure + BaseHeaderSize) + (((int)((usqInt)(FullClosureReceiverIndex) << (shiftForWord()))))); + if (((objOop & (tagMask())) == 0) + && (((longAt(objOop)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) { + objOop = fixFollowedFieldofObjectwithInitialValue(FullClosureReceiverIndex, blockClosure, objOop); + } + object1 = objOop; + longAtput((sp7 = GIV(stackPointer) - BytesPerWord), object1); + GIV(stackPointer) = sp7; + for (i = 0; i < numCopied; i += 1) { + /* begin push: */ + longAtput((sp8 = GIV(stackPointer) - BytesPerWord), longAt((blockClosure + BaseHeaderSize) + (((sqInt)((usqInt)((i + FullClosureFirstCopiedValueIndex)) << (shiftForWord())))))); + GIV(stackPointer) = sp8; + } + assert(frameIsBlockActivation(GIV(framePointer))); + assert(!(frameHasContext(GIV(framePointer)))); + /* begin methodHeaderOf: */ + assert(isCompiledMethod(theMethod)); + /* begin fetchPointer:ofObject: */ + methodHeader = longAt((theMethod + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); + numTemps = (((usqInt) methodHeader) >> MethodHeaderTempCountShift) & 0x3F; + for (i = ((numArgs + numCopied) + 1); i <= numTemps; i += 1) { + /* begin push: */ + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp1; + } + GIV(instructionPointer) = ((theMethod + ((LiteralStart + ((assert((methodHeader & 1)), +((methodHeader >> 1)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize) - 1; + /* begin setMethod: */ + GIV(method) = theMethod; + assert(isOopCompiledMethod(GIV(method))); + GIV(bytecodeSetSelector) = (methodUsesAlternateBytecodeSet(GIV(method)) + ? 256 + : 0); + + if (GIV(stackPointer) < GIV(stackLimit)) { + handleStackOverflowOrEventAllowContextSwitch(1); + } +} + + +/* Fetch the system attribute with the given integer ID. The + result is a string, which will be empty if the attribute is not + defined. */ + + /* InterpreterPrimitives>>#primitiveGetAttribute */ +static void +primitiveGetAttribute(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt attr; + sqInt integerPointer; + sqInt s; + char *sp; + sqInt sz; + + sz = 0; + /* begin stackIntegerValue: */ + integerPointer = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + /* begin checkedIntegerValueOf: */ + if ((integerPointer & 1)) { + attr = (integerPointer >> 1); + goto l1; + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + attr = 0; + goto l1; + } +l1: /* end stackIntegerValue: */; + if (!GIV(primFailCode)) { + sz = attributeSize(attr); + } + if (!GIV(primFailCode)) { + s = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassByteString) << (shiftForWord()))))), sz); + getAttributeIntoLength(attr, s + BaseHeaderSize, sz); + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), s); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveGetImmutability */ +#if IMMUTABILITY +static void +primitiveGetImmutability(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt rcvr; + char *sp; + sqInt trueOrFalse; + + rcvr = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + /* begin pop:thenPushBool: */ + trueOrFalse = (rcvr & (tagMask())) + || (((((usqInt) (longAt(rcvr))) >> (immutableBitShift())) & 1) != 0); + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (trueOrFalse + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; +} +#endif /* IMMUTABILITY */ + + +/* Primitive. Answer the VM's current log directory */ + + /* InterpreterPrimitives>>#primitiveGetLogDirectory */ +EXPORT(sqInt) +primitiveGetLogDirectory(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt i; + char*ptr; + char *sp; + sqInt stringOop; + sqInt sz; + + ptr = ioGetLogDirectory(); + if (ptr == null) { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + return null; + } + sz = strlen(ptr); + stringOop = instantiateClassindexableSize(splObj(ClassByteString), sz); + for (i = 0; i < sz; i += 1) { + byteAtput((stringOop + BaseHeaderSize) + i, ptr[i]); + } + /* begin pop: */ + GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), stringOop); + GIV(stackPointer) = sp; + return 0; +} + + +/* Primitive. Return the next input event from the VM event queue. */ + + /* InterpreterPrimitives>>#primitiveGetNextEvent */ +static void +primitiveGetNextEvent(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt arg; + sqIntptr_t eventTypeIs; + sqIntptr_t evtBuf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + sqInt i; + sqIntptr_t value; + + arg = longAt(GIV(stackPointer)); + if (!((((arg & (tagMask())) == 0) + && (((((usqInt) (longAt(arg))) >> (formatShift())) & (formatMask())) == 2)) + && ((slotSizeOf(arg)) == 8))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + return; + } + ioGetNextEvent(((sqInputEvent*) evtBuf)); + if (GIV(primFailCode)) { + return; + } + eventTypeIs = evtBuf[0]; + /* begin storeInteger:ofObject:withValue: */ + if ((((sqInt)((((usqInt)(evtBuf[0]))) ^ ((((usqInt)(evtBuf[0]))) << 1)))) >= 0) { + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(arg))); + longAtput((arg + BaseHeaderSize) + (0U << (shiftForWord())), (((usqInt)(evtBuf[0]) << 1) | 1)); + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (GIV(primFailCode)) { + return; + } + if (eventTypeIs == 6) { + + /* Event is Complex, assume evtBuf is populated correctly and return */ + for (i = 1; i <= 7; i += 1) { + value = evtBuf[i]; + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(arg))); + if ((assert(isNonImmediate(arg)), + oopisGreaterThanOrEqualTo(arg, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(arg))) >> (rememberedBitShift())) & 1) != 0)) { + remember(arg); + } + } + } + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), value); + } + } + else { + + /* Event time stamp */ + /* begin storeInteger:ofObject:withValue: */ + if ((((sqInt)((((usqInt)((evtBuf[1]) & MillisecondClockMask))) ^ ((((usqInt)((evtBuf[1]) & MillisecondClockMask))) << 1)))) >= 0) { + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(arg))); + longAtput((arg + BaseHeaderSize) + (1U << (shiftForWord())), (((usqInt)((evtBuf[1]) & MillisecondClockMask) << 1) | 1)); + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (GIV(primFailCode)) { + return; + } + for (i = 2; i <= 7; i += 1) { + value = evtBuf[i]; + if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { + /* begin storeInteger:ofObject:withValue: */ + if ((((sqInt)((((usqInt)value)) ^ ((((usqInt)value)) << 1)))) >= 0) { + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(arg))); + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), (((usqInt)value << 1) | 1)); + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + } + else { + value = positiveMachineIntegerFor(value); + /* begin storePointer:ofObject:withValue: */ + assert(!(isForwarded(arg))); + if ((assert(isNonImmediate(arg)), + oopisGreaterThanOrEqualTo(arg, GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((value & (tagMask())) == 0) + && (oopisLessThan(value, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(arg))) >> (rememberedBitShift())) & 1) != 0)) { + remember(arg); + } + } + } + longAtput((arg + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), value); + } + } + } + if (!GIV(primFailCode)) { + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + } +} + + +/* Primitive. Answer the OS window's label */ + + /* InterpreterPrimitives>>#primitiveGetWindowLabel */ +EXPORT(sqInt) +primitiveGetWindowLabel(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt i; + sqInt labelOop; + char*ptr; + char *sp; + sqInt sz; + + ptr = ioGetWindowLabel(); + if (ptr == null) { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + return null; + } + sz = strlen(ptr); + labelOop = instantiateClassindexableSize(splObj(ClassByteString), sz); + for (i = 0; i < sz; i += 1) { + byteAtput((labelOop + BaseHeaderSize) + i, ptr[i]); + } + /* begin pop: */ + GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), labelOop); + GIV(stackPointer) = sp; + return 0; +} + + +/* Primitive. Answer the OS window's size (extent) */ + + /* InterpreterPrimitives>>#primitiveGetWindowSize */ +EXPORT(sqInt) +primitiveGetWindowSize(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt classObj; + sqInt h; + sqInt knownClassIndex; + usqInt newObj; + usqInt numBytes; + sqInt numSlots; + sqInt object; + sqInt objFormat; + usqInt pointResult; + char *sp; + sqInt w; + + w = ioGetWindowWidth(); + h = ioGetWindowHeight(); + /* begin pop: */ + GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; + /* begin push: */ + classObj = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassPoint) << (shiftForWord()))))); + numSlots = YIndex + 1; + assert((rawHashBitsOf(classObj)) != 0); + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + knownClassIndex = (long32At(classObj + 4)) & (identityHashHalfWordMask()); + /* begin instSpecOfClassFormat: */ + objFormat = (((usqInt) (((longAt((classObj + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) >> 1))) >> (fixedFieldsFieldWidth())) & (formatMask()); + assert((numSlots >= 0) + && (knownClassIndex != 0)); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(knownClassIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(numSlots < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + ((numSlots <= 1 + ? 8 + : (numSlots + (numSlots & 1)) * BytesPerOop)); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + pointResult = 0; + goto l3; + } + } + long64Atput(newObj, (((((usqLong) numSlots)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + knownClassIndex); + GIV(freeStart) += numBytes; + pointResult = newObj; +l3: /* end eeInstantiateSmallClass:numSlots: */; + /* begin storePointerUnchecked:ofObject:withValue: */ + assert(!(isOopForwarded(pointResult))); + 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())))), (((usqInt)h << 1) | 1)); + object = pointResult; + longAtput((sp = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp; + return 0; +} + + /* InterpreterPrimitives>>#primitiveGreaterOrEqual */ +static void +primitiveGreaterOrEqual(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt integerArgument; + sqInt integerReceiver; + char *sp; + + integerArgument = longAt(GIV(stackPointer)); + integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((integerReceiver & integerArgument) & 1) != 0) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (integerReceiver >= integerArgument + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } +} + + +/* Primitive comparison operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveGreaterOrEqualLargeIntegers */ +EXPORT(void) +primitiveGreaterOrEqualLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqLong integerArg; + sqLong integerRcvr; + char *sp; + + integerArg = signed64BitValueOf(longAt(GIV(stackPointer) + (0 * BytesPerWord))); + integerRcvr = signed64BitValueOf(longAt(GIV(stackPointer) + (1 * BytesPerWord))); + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (integerRcvr >= integerArg + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveGreaterThan */ +static void +primitiveGreaterThan(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt integerArgument; + sqInt integerReceiver; + char *sp; + + integerArgument = longAt(GIV(stackPointer)); + integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (((integerReceiver & integerArgument) & 1) != 0) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (integerReceiver > integerArgument + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } +} + + +/* Primitive comparison operations for large integers in 64 bit range */ + + /* InterpreterPrimitives>>#primitiveGreaterThanLargeIntegers */ +EXPORT(void) +primitiveGreaterThanLargeIntegers(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqLong integerArg; + sqLong integerRcvr; + char *sp; + + integerArg = signed64BitValueOf(longAt(GIV(stackPointer) + (0 * BytesPerWord))); + integerRcvr = signed64BitValueOf(longAt(GIV(stackPointer) + (1 * BytesPerWord))); + if (!GIV(primFailCode)) { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (integerRcvr > integerArg + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveGrowMemoryByAtLeast */ +static void +primitiveGrowMemoryByAtLeast(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt ammount; + sqInt segSize; + char *sp; + + ammount = longAt(GIV(stackPointer)); + if (!((ammount & 1))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + return; + } + segSize = growOldSpaceByAtLeast((ammount >> 1)); + if (segSize == null) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrNoMemory; + } + else { + /* begin pop:thenPushInteger: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)segSize << 1) | 1)); + GIV(stackPointer) = sp; + } +} + + +/* Answer the heartbeat frequency in beats per second. If the argument is + true, reset the frequency measure. */ + + /* InterpreterPrimitives>>#primitiveHeartbeatFrequency */ +EXPORT(sqInt) +primitiveHeartbeatFrequency(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + unsigned int integerValue; + usqInt newLargeInteger; + usqInt newObj; + usqInt numBytes; + sqInt objFormat; + sqInt oop; + sqInt reset; + char *sp; + sqInt valueWord; + + reset = (GIV(argumentCount) == 1) + && ((longAt(GIV(stackPointer))) == GIV(trueObj)); + /* begin pop:thenPush: */ + integerValue = ioHeartbeatFrequency(reset); + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) { + oop = ((integerValue << 1) | 1); + goto l5; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l4; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; +l4: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + oop = newLargeInteger; + goto l5; + +l5: /* end positive32BitIntegerFor: */; + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + + +/* Return the value of the high resolution clock if this system has any. The + exact frequency of the high res clock is undefined specifically so that we + can use processor dependent instructions (like RDTSC). The only use for + the high res clock is for profiling where we can allocate time based on + sub-msec resolution of the high res clock. If no high-resolution counter + is available, the platform should return zero. + */ + + /* InterpreterPrimitives>>#primitiveHighResClock */ +EXPORT(sqInt) +primitiveHighResClock(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt object; + char *sp; + + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + /* begin push: */ + object = positive64BitIntegerFor(ioHighResClock()); + longAtput((sp = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp; + return 0; +} + + +/* is the receiver/first argument the same object as the (last) argument?. + pop argumentCount because this can be used as a mirror primitive. */ + + /* InterpreterPrimitives>>#primitiveIdentical */ +static void +primitiveIdentical(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt otherObject; + char *sp; + sqInt thisObject; + + otherObject = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + thisObject = longAt(GIV(stackPointer)); + if ((((otherObject & (tagMask())) == 0) + && (((longAt(otherObject)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))) + || ((GIV(argumentCount) > 1) + && (((thisObject & (tagMask())) == 0) + && (((longAt(thisObject)) & (classIndexMask())) == (isForwardedObjectClassIndexPun()))))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + } + else { + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (thisObject == otherObject + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + } +} + + /* InterpreterPrimitives>>#primitiveIdentityHash */ +static void +primitiveIdentityHash(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt hash; + sqInt hash1; + sqInt integerVal; + char *sp; + sqInt thisReceiver; + + thisReceiver = longAt(GIV(stackPointer)); + if ((thisReceiver & (tagMask())) + || ((GIV(argumentCount) > 0) + && (((longAt(thisReceiver)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0))) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + else { + /* begin pop:thenPushInteger: */ + hash = (long32At(thisReceiver + 4)) & (identityHashHalfWordMask()); + if (hash == 0) { + + /* would like to assert + self assert: (coInterpreter addressCouldBeClassObj: objOop) not + but instance-specific behaviors that are instances of themselves may + fail this test. */ + /* begin newHashBitsOf: */ + hash1 = (newObjectHash()) & (identityHashHalfWordMask()); + /* begin setHashBitsOf:to: */ + assert(((hash1 >= 0) && (hash1 <= (identityHashHalfWordMask())))); + long32Atput(thisReceiver + 4, ((((long32At(thisReceiver + 4)) | (identityHashHalfWordMask())) - (identityHashHalfWordMask()))) + hash1); + hash = hash1; + } + integerVal = hash; + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (((usqInt)integerVal << 1) | 1)); + GIV(stackPointer) = sp; + } +} + + +/* Answer an integer identifying the type of image. The image version number + may identify the format of the image (e.g. 32 or 64-bit word size) or + specific requirements + of the image (e.g. block closure support required). + + This is a named (not numbered) primitive in the null module (ie the VM) + */ + + /* InterpreterPrimitives>>#primitiveImageFormatVersion */ +EXPORT(sqInt) +primitiveImageFormatVersion(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + usqInt newLargeInteger; + usqInt newObj; + usqInt numBytes; + sqInt objFormat; + sqInt oop; + char *sp; + sqInt valueWord; + + /* begin pop:thenPush: */ + /* begin maybeInlinePositive32BitIntegerFor: */ + assert(!((hasSixtyFourBitImmediates()))); + if ((((unsigned int) 6521)) <= (MaxSmallInteger)) { + oop = (((usqInt)6521 << 1) | 1); + goto l5; + } + /* begin eeInstantiateSmallClassIndex:format:numSlots: */ + objFormat = (firstByteFormat()) + ((8 - 4) & (BytesPerWord - 1)); + assert(ClassLargePositiveIntegerCompactIndex != 0); + assert(((objFormat < (firstByteFormat()) + ? objFormat + : objFormat & (byteFormatMask()))) == (instSpecOfClass(knownClassAtIndex(ClassLargePositiveIntegerCompactIndex)))); + /* begin allocateSmallNewSpaceSlots:format:classIndex: */ + assert(1 < (numSlotsMask())); + newObj = GIV(freeStart); + numBytes = BaseHeaderSize + (8); + assert((numBytes % (allocationUnit())) == 0); + assert((newObj % (allocationUnit())) == 0); + if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) { + if (!GIV(needGCFlag)) { + /* begin scheduleScavenge */ + GIV(needGCFlag) = 1; + forceInterruptCheck(); + } + if ((GIV(freeStart) + numBytes) > (((eden()).limit))) { + error("no room in eden for allocateSmallNewSpaceSlots:format:classIndex:"); + newLargeInteger = 0; + goto l4; + } + } + long64Atput(newObj, (((((usqLong) 1)) << (numSlotsFullShift())) + (((sqInt)((usqInt)(objFormat) << (formatShift()))))) + ClassLargePositiveIntegerCompactIndex); + GIV(freeStart) += numBytes; + newLargeInteger = newObj; +l4: /* end eeInstantiateSmallClassIndex:format:numSlots: */; + + /* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */ + /* eem 4/28/2016 questionable; they should never be read */ + /* begin storeLong32:ofObject:withValue: */ + valueWord = SQ_SWAP_4_BYTES_IF_BIGENDIAN(6521); + long32Atput((newLargeInteger + BaseHeaderSize) + (0U << 2), valueWord); + /* begin storeLong32:ofObject:withValue: */ + long32Atput((newLargeInteger + BaseHeaderSize) + (1U << 2), 0); + + oop = newLargeInteger; + goto l5; + +l5: /* end positive32BitIntegerFor: */; + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + + +/* When called with a single string argument, record the string as the + current image file name. When called with zero arguments, return a string + containing the current image file name. + */ + + /* InterpreterPrimitives>>#primitiveImageName */ +static void +primitiveImageName(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt classOop; + sqInt ok; + sqInt okToRename; + sqInt s; + void *sCRIfn; + char *sp; + sqInt sz; + + if (GIV(argumentCount) == 1) { + + /* If the security plugin can be loaded, use it to check for rename permission. + If not, assume it's ok */ + sCRIfn = ioLoadFunctionFrom("secCanRenameImage", "SecurityPlugin"); + if (sCRIfn != 0) { + okToRename = ((sqInt (*)(void))sCRIfn)(); + if (!okToRename) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + } + s = longAt(GIV(stackPointer)); + /* begin assertClassOf:is: */ + classOop = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassByteString) << (shiftForWord()))))); + /* begin isNonImmediate: */ + ok = (s & (tagMask())) == 0; + if (ok) { + /* begin isClassOfNonImm:equalTo: */ + assert(isNonImmediate(s)); + ok = ((longAt(s)) & (classIndexMask())) == ((long32At(classOop + 4)) & (identityHashHalfWordMask())); + } + /* begin success: */ + if (!ok) { + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + } + if (!GIV(primFailCode)) { + sz = stSizeOf(s); + imageNamePutLength(s + BaseHeaderSize, sz); + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + } + } + else { + sz = imageNameSize(); + s = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassByteString) << (shiftForWord()))))), sz); + imageNameGetLength(s + BaseHeaderSize, sz); + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), s); + GIV(stackPointer) = sp; + } +} + + +/* For a Smalllnteger, answer itself. + For a Character, answer its code as an unsigned integer. + For a SmallFloat, answer the signed, but unadjusted bit pattern (so as to + keep the result a SmallInteger). + This is a good value for an immediate's hash. */ + + /* InterpreterPrimitives>>#primitiveImmediateAsInteger */ +static void +primitiveImmediateAsInteger(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *sp; + usqInt value; + + value = 0; + oop = longAt(GIV(stackPointer)); + if ((oop & 1)) { + value = (oop >> 1); + } + else { + if ((oop & (tagMask())) == (characterTag())) { + value = ((usqInt) (((usqInt)oop))) >> (numTagBits()); + } + else { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadReceiver; + return; + + } + } + /* begin pop:thenPushInteger: */ + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), ((value << 1) | 1)); + GIV(stackPointer) = sp; +} + + +/* Register the input semaphore. If the argument is not a + Semaphore, unregister the current input semaphore. */ + + /* InterpreterPrimitives>>#primitiveInputSemaphore */ +static void +primitiveInputSemaphore(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt arg; + + arg = longAt(GIV(stackPointer)); + if ((arg & 1)) { + + /* If arg is integer, then use it as an index + into the external objects array and install it + as the new event semaphore */ + ioSetInputSemaphore((arg >> 1)); + if (!GIV(primFailCode)) { + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + } + return; + } + if (TheInputSemaphore == null) { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + return; + } + if ((arg == GIV(nilObj)) + || (((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == (rawHashBitsOf(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassSemaphore) << (shiftForWord())))))))))) { + /* begin splObj:put: */ + assert(!(isForwarded(GIV(specialObjectsOop)))); + if ((assert(isNonImmediate(GIV(specialObjectsOop))), + oopisGreaterThanOrEqualTo(GIV(specialObjectsOop), GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((arg & (tagMask())) == 0) + && (oopisLessThan(arg, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(GIV(specialObjectsOop)))) >> (rememberedBitShift())) & 1) != 0)) { + remember(GIV(specialObjectsOop)); + } + } + } + longAtput((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(TheInputSemaphore) << (shiftForWord())))), arg); + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + } + else { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + } +} + + +/* Return an integer indicating the reason for the most recent input + interrupt. + */ + + /* InterpreterPrimitives>>#primitiveInputWord */ +static void +primitiveInputWord(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + /* begin pop:thenPushInteger: */ + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (((usqInt)0 << 1) | 1)); + GIV(stackPointer) = sp; +} + + +/* Return the 32bit signed integer contents of a words receiver */ + + /* InterpreterPrimitives>>#primitiveIntegerAt */ +static void +primitiveIntegerAt(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt addr; + sqInt fmt; + sqInt index; + int intValue; + usqInt numSlots; + usqInt numSlots1; + sqInt rcvr; + sqInt result; + char *sp; + sqInt sz; + + index = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + if (!((index & 1))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + return; + } + rcvr = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + if (!(((rcvr & (tagMask())) == 0) + && (((((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask())) == (firstLongFormat())))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrInappropriate; + return; + } + index = (index >> 1); + /* begin lengthOf:format: */ + fmt = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOfAny: */ + numSlots1 = byteAt(rcvr + 7); + numSlots = (numSlots1 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots1); + if (fmt <= 5) { + sz = numSlots; + goto l6; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + sz = (numSlots << (shiftForWord())) - (fmt & 7); + goto l6; + } + if (fmt >= (firstShortFormat())) { + sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); + goto l6; + } + if (fmt >= (firstLongFormat())) { + sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); + goto l6; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + sz = ((usqInt) numSlots) >> 1; + goto l6; + } + sz = 0; +l6: /* end lengthOf:format: */; + if (!((index >= 1) + && (index <= sz))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadIndex; + return; + } + + /* for zero indexing */ + addr = (rcvr + BaseHeaderSize) + ((index - 1) * 4); + intValue = intAt(addr); + /* begin signed32BitIntegerFor: */ + if ((((sqInt)((((usqInt)intValue)) ^ ((((usqInt)intValue)) << 1)))) >= 0) { + result = (((usqInt)intValue << 1) | 1); + goto l4; + } + result = noInlineSigned32BitIntegerGutsFor(intValue); + goto l4; + +l4: /* end signed32BitIntegerFor: */; + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), result); + GIV(stackPointer) = sp; +} + + +/* Return the 32bit signed integer contents of a words receiver */ + + /* InterpreterPrimitives>>#primitiveIntegerAtPut */ +static void +primitiveIntegerAtPut(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt addr; + sqInt fmt; + sqInt index; + sqInt integerPointer; + usqInt numSlots; + usqInt numSlots1; + sqInt rcvr; + char *sp; + sqInt sz; + int value; + sqInt valueOop; + + valueOop = longAt(GIV(stackPointer) + (0 * BytesPerWord)); + /* begin stackIntegerValue: */ + integerPointer = longAt(GIV(stackPointer) + (1 * BytesPerWord)); + /* begin checkedIntegerValueOf: */ + if ((integerPointer & 1)) { + index = (integerPointer >> 1); + goto l6; + } + else { + /* begin primitiveFail */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + index = 0; + goto l6; + } +l6: /* end stackIntegerValue: */; + /* begin signed32BitValueOf: */ + if ((valueOop & 1)) { + value = (valueOop >> 1); + goto l9; + } + value = noInlineSigned32BitValueGutsOf(valueOop); + goto l9; + +l9: /* end signed32BitValueOf: */; + if (GIV(primFailCode)) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + return; + } + rcvr = longAt(GIV(stackPointer) + (2 * BytesPerWord)); + if (!(((rcvr & (tagMask())) == 0) + && (((((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask())) == (firstLongFormat())))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrInappropriate; + return; + } + if ( +# if IMMUTABILITY + (/* begin isImmutable: */ + ((((usqInt) (longAt(rcvr))) >> (immutableBitShift())) & 1) != 0) +# else /* IMMUTABILITY */ + 0 +# endif /* IMMUTABILITY */ + ) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrNoModification; + return; + } + /* begin lengthOf:format: */ + fmt = (((usqInt) (longAt(rcvr))) >> (formatShift())) & (formatMask()); + /* begin numSlotsOfAny: */ + numSlots1 = byteAt(rcvr + 7); + numSlots = (numSlots1 == (numSlotsMask()) + ? longAt(rcvr - BaseHeaderSize) + : numSlots1); + if (fmt <= 5) { + sz = numSlots; + goto l8; + } + if (fmt >= (firstByteFormat())) { + + /* bytes, including CompiledMethod */ + sz = (numSlots << (shiftForWord())) - (fmt & 7); + goto l8; + } + if (fmt >= (firstShortFormat())) { + sz = (numSlots << ((shiftForWord()) - 1)) - (fmt & 3); + goto l8; + } + if (fmt >= (firstLongFormat())) { + sz = (numSlots << ((shiftForWord()) - 2)) - (fmt & 1); + goto l8; + } + if (fmt == (sixtyFourBitIndexableFormat())) { + sz = ((usqInt) numSlots) >> 1; + goto l8; + } + sz = 0; +l8: /* end lengthOf:format: */; + if (!((index >= 1) + && (index <= sz))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadIndex; + return; + } + + /* for zero indexing */ + addr = (rcvr + BaseHeaderSize) + ((index - 1) * 4); + value = intAtput(addr, value); + /* begin pop:thenPush: */ + longAtput((sp = GIV(stackPointer) + ((3 - 1) * BytesPerWord)), valueOop); + GIV(stackPointer) = sp; +} + + +/* Primitive. Answer the number of interrupt checks per milliseconds that we + execute on this machine. This can be used to adjust the sub-msecs profiler + to check (roughly) + n times per millisecond. + */ + + /* InterpreterPrimitives>>#primitiveInterruptChecksPerMSec */ +EXPORT(sqInt) +primitiveInterruptChecksPerMSec(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt oop; + char *sp; + + if (!(GIV(argumentCount) == 0)) { + /* begin success: */ + + /* Don't overwrite an error code that has already been set. */ + if (!GIV(primFailCode)) { + GIV(primFailCode) = 1; + } + + return null; + } + /* begin pop:thenPush: */ + oop = (((usqInt)(ioHeartbeatMilliseconds()) << 1) | 1); + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), oop); + GIV(stackPointer) = sp; + return 0; +} + + +/* Register the user interrupt semaphore. If the argument is + not a Semaphore, unregister the current interrupt + semaphore. */ + + /* InterpreterPrimitives>>#primitiveInterruptSemaphore */ +static void +primitiveInterruptSemaphore(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt arg; + + arg = longAt(GIV(stackPointer)); + if ((arg == GIV(nilObj)) + || (((arg & (tagMask())) == 0) + && (((longAt(arg)) & (classIndexMask())) == (rawHashBitsOf(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(ClassSemaphore) << (shiftForWord())))))))))) { + /* begin splObj:put: */ + assert(!(isForwarded(GIV(specialObjectsOop)))); + if ((assert(isNonImmediate(GIV(specialObjectsOop))), + oopisGreaterThanOrEqualTo(GIV(specialObjectsOop), GIV(oldSpaceStart)))) { + + /* most stores into young objects */ + if (((arg & (tagMask())) == 0) + && (oopisLessThan(arg, GIV(newSpaceLimit)))) { + /* begin possibleRootStoreInto: */ + if (!(((((usqInt) (longAt(GIV(specialObjectsOop)))) >> (rememberedBitShift())) & 1) != 0)) { + remember(GIV(specialObjectsOop)); + } + } + } + longAtput((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(TheInterruptSemaphore) << (shiftForWord())))), arg); + /* begin pop: */ + GIV(stackPointer) += 1 * BytesPerWord; + } + else { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadArgument; + } +} + + +/* Primitive. 'Invoke' an object like a function, sending the special message + run: originalSelector with: arguments in: aReceiver. + */ + + /* InterpreterPrimitives>>#primitiveInvokeObjectAsMethod */ +static void +primitiveInvokeObjectAsMethod(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt errorCode; + sqInt i; + sqInt i1; + sqInt lookupClassTag; + sqInt methodHeader; + sqInt methodHeader1; + sqInt numArgs; + sqInt numTemps; + sqInt object; + sqInt rcvr; + sqInt runArgs; + sqInt runReceiver; + char *sp; + char *sp1; + char *sp11; + char *sp2; + char *sp21; + char *sp3; + char *sp31; + char *sp4; + char *sp5; + char *sp6; + char *sp7; + sqInt table; + sqInt tagBits; + sqInt top; + sqInt top1; + sqInt valuePointer; + + /* begin eeInstantiateClassIndex:format:numSlots: */ + assert((GIV(argumentCount) >= 0) + && (ClassArrayCompactIndex != 0)); + assert((2) == (instSpecOfClass(knownClassAtIndex(ClassArrayCompactIndex)))); + runArgs = allocateNewSpaceSlotsformatclassIndex(GIV(argumentCount), 2, ClassArrayCompactIndex); + + for (i = (GIV(argumentCount) - 1); i >= 0; i += -1) { + /* begin storePointerUnchecked:ofObject:withValue: */ + top1 = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + valuePointer = top1; + assert(!(isOopForwarded(runArgs))); + longAtput((runArgs + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))), valuePointer); + } + /* begin popStack */ + top = longAt(GIV(stackPointer)); + GIV(stackPointer) += BytesPerWord; + runReceiver = top; + /* begin push: */ + longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp; + /* begin push: */ + longAtput((sp1 = GIV(stackPointer) - BytesPerWord), GIV(messageSelector)); + GIV(stackPointer) = sp1; + /* begin push: */ + longAtput((sp2 = GIV(stackPointer) - BytesPerWord), runArgs); + GIV(stackPointer) = sp2; + /* begin push: */ + longAtput((sp3 = GIV(stackPointer) - BytesPerWord), runReceiver); + GIV(stackPointer) = sp3; + /* begin fetchPointer:ofObject: */ + GIV(messageSelector) = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(SelectorRunWithIn) << (shiftForWord()))))); + GIV(argumentCount) = 3; + if (((tagBits = GIV(newMethod) & (tagMask()))) != 0) { + lookupClassTag = ((tagBits & 1) != 0 + ? 1 + : tagBits); + } + else { + /* begin classIndexOf: */ + lookupClassTag = (longAt(GIV(newMethod))) & (classIndexMask()); + } + findNewMethodInClassTag(lookupClassTag); + /* begin executeNewMethod */ + if (primitiveFunctionPointer != 0) { + if ((((usqIntptr_t) primitiveFunctionPointer)) <= MaxQuickPrimitiveIndex) { + externalQuickPrimitiveResponse(); + goto l16; + } + /* begin slowPrimitiveResponse */ + assert(!(isOopForwarded(stackValue(GIV(argumentCount))))); + assert((remapBufferCount()) == 0); + /* begin initPrimCall */ + GIV(primFailCode) = 0; + dispatchFunctionPointer(primitiveFunctionPointer); + assert(maybeLeakCheckExternalPrimCall(GIV(newMethod))); + /* begin maybeRetryPrimitiveOnFailure */ + if (GIV(primFailCode)) { + retryPrimitiveOnFailure(); + } + /* begin maybeFailForLastObjectOverwrite */ + if (checkAllocFiller) { + if (((freeStart()) < GIV(scavengeThreshold)) + && ((longAt(freeStart())) != (freeStart()))) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrWritePastObject; + } + } + if (GIV(nextProfileTick) > 0) { + checkProfileTick(GIV(newMethod)); + } + /* begin successful */ + !GIV(primFailCode); + if (!GIV(primFailCode)) { + goto l16; + } + } + /* begin activateNewMethod */ + assert(isCompiledMethod(GIV(newMethod))); + /* begin fetchPointer:ofObject: */ + methodHeader1 = longAt((GIV(newMethod) + BaseHeaderSize) + (((int)((usqInt)(HeaderIndex) << (shiftForWord()))))); + numTemps = (((usqInt) methodHeader1) >> MethodHeaderTempCountShift) & 0x3F; + /* begin argumentCountOfMethodHeader: */ + numArgs = (((usqInt) methodHeader1) >> MethodHeaderArgCountShift) & 15; + + /* could new rcvr be set at point of send? */ + rcvr = longAt(GIV(stackPointer) + (numArgs * BytesPerWord)); + assert(!(isOopForwarded(rcvr))); + /* begin push: */ + longAtput((sp11 = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer)); + GIV(stackPointer) = sp11; + /* begin push: */ + longAtput((sp21 = GIV(stackPointer) - BytesPerWord), GIV(framePointer)); + GIV(stackPointer) = sp21; + GIV(framePointer) = GIV(stackPointer); + /* begin push: */ + longAtput((sp31 = GIV(stackPointer) - BytesPerWord), GIV(newMethod)); + GIV(stackPointer) = sp31; + /* begin setMethod:methodHeader: */ + GIV(method) = GIV(newMethod); + assert(isOopCompiledMethod(GIV(method))); + assert((methodHeaderOf(GIV(method))) == methodHeader1); + GIV(bytecodeSetSelector) = ((((int) methodHeader1)) < 0 + ? 256 + : 0); + + /* begin push: */ + object = (VMBIGENDIAN + ? ((1 + (((sqInt)((usqInt)(numArgs) << ((BytesPerWord * 8) - 8))))) + (0)) + (0) + : ((1 + (((sqInt)((usqInt)(numArgs) << 8)))) + (0)) + (0)); + longAtput((sp4 = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp4; + /* begin push: */ + longAtput((sp5 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp5; + /* begin push: */ + longAtput((sp6 = GIV(stackPointer) - BytesPerWord), rcvr); + GIV(stackPointer) = sp6; + for (i1 = (numArgs + 1); i1 <= numTemps; i1 += 1) { + /* begin push: */ + longAtput((sp7 = GIV(stackPointer) - BytesPerWord), GIV(nilObj)); + GIV(stackPointer) = sp7; + } + GIV(instructionPointer) = ((GIV(newMethod) + ((LiteralStart + ((assert((methodHeader1 & 1)), +((methodHeader1 >> 1)) & AlternateHeaderNumLiteralsMask))) * BytesPerOop)) + BaseHeaderSize) - 1; + if ((/* begin alternateHeaderHasPrimitiveFlag: */ + methodHeader1 & AlternateHeaderHasPrimFlag)) { + + /* Skip the CallPrimitive bytecode, if it's there, and store the error code if the method starts + with a long store temp. Strictly no need to skip the store because it's effectively a noop. */ + GIV(instructionPointer) += 3; + if (GIV(primFailCode) != 0) { + if ((byteAt(GIV(instructionPointer) + 1)) == (((((int) methodHeader1)) < 0 + ? AltLongStoreBytecode + : LongStoreBytecode))) { + /* begin getErrorObjectFromPrimFailCode */ + if (GIV(primFailCode) > 0) { + /* begin splObj: */ + table = longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((int)((usqInt)(PrimErrTableIndex) << (shiftForWord()))))); + if (GIV(primFailCode) <= (numSlotsOf(table))) { + /* begin fetchPointer:ofObject: */ + errorCode = longAt((table + BaseHeaderSize) + (((sqInt)((usqInt)((GIV(primFailCode) - 1)) << (shiftForWord()))))); + goto l9; + } + } + errorCode = (((usqInt)GIV(primFailCode) << 1) | 1); + l9: /* end getErrorObjectFromPrimFailCode */; + longAtPointerput(GIV(stackPointer), errorCode); + } + GIV(primFailCode) = 0; + } + } + methodHeader = methodHeader1; + if (GIV(stackPointer) < GIV(stackLimit)) { + handleStackOverflowOrEventAllowContextSwitch(canContextSwitchIfActivatingheader(GIV(newMethod), methodHeader)); + } +l16: /* end executeNewMethod */; + /* begin initPrimCall */ + GIV(primFailCode) = 0; +} + + +/* Answer if running on a big endian machine. */ + + /* InterpreterPrimitives>>#primitiveIsBigEnder */ +EXPORT(sqInt) +primitiveIsBigEnder(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + char *sp; + + /* begin pop:thenPushBool: */ + longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), (VMBIGENDIAN + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; + return 0; +} + + +/* Answer if the receiver is pinned, i.e. immobile. */ + + /* InterpreterPrimitives>>#primitiveIsPinned */ +static void +primitiveIsPinned(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt obj; + char *sp; + sqInt trueOrFalse; + + obj = longAt(GIV(stackPointer)); + if ((obj & (tagMask())) + || (((longAt(obj)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))) == 0)) { + /* begin primitiveFailFor: */ + GIV(primFailCode) = PrimErrBadReceiver; + return; + } + /* begin pop:thenPushBool: */ + trueOrFalse = ((((usqInt) (longAt(obj))) >> (pinnedBitShift())) & 1) != 0; + longAtput((sp = GIV(stackPointer) + (((GIV(argumentCount) + 1) - 1) * BytesPerWord)), (trueOrFalse + ? GIV(trueObj) + : GIV(falseObj))); + GIV(stackPointer) = sp; +} + + +/* Primitive. Answer whether the OS window is currently partially or fully + obscured. + */ + + /* InterpreterPrimitives>>#primitiveIsWindowObscured */ +EXPORT(sqInt) +primitiveIsWindowObscured(void) +{ DECL_MAYBE_SQ_GLOBAL_STRUCT + sqInt object; + char *sp; + sqInt trueOrFalse; + + /* begin pop: */ + GIV(stackPointer) += (GIV(argumentCount) + 1) * BytesPerWord; + /* begin pushBool: */ + trueOrFalse = ioIsWindowObscured(); + /* begin push: */ + object = (trueOrFalse + ? GIV(trueObj) + : GIV(falseObj)); + longAtput((sp = GIV(stackPointer) - BytesPerWord), object); + GIV(stackPointer) = sp; + return 0; +} + + +/* Obsolete on virtually all platforms; old style input polling code. + Return the next keycode and remove it from the input buffer. The low byte + is the 8-bit ISO character. The next four bits are the Smalltalk modifier + bits